From 7637a037898508dc5bec48b93b1d89edb6609588 Mon Sep 17 00:00:00 2001 From: Wolfgang Ulbrich Date: Thu, 11 Feb 2016 07:46:29 +0100 Subject: Gtk+3 notification-area: don't use deprecated GtkAlignment taken from: https://git.gnome.org/browse/gnome-panel/commit/?id=4367578 --- applets/notification_area/na-tray.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/applets/notification_area/na-tray.c b/applets/notification_area/na-tray.c index 9db9703b..996bd693 100644 --- a/applets/notification_area/na-tray.c +++ b/applets/notification_area/na-tray.c @@ -53,7 +53,9 @@ struct _NaTrayPrivate TraysScreen *trays_screen; GtkWidget *box; +#if !GTK_CHECK_VERSION (3, 0, 0) GtkWidget *frame; +#endif guint idle_redraw_id; @@ -608,21 +610,22 @@ na_tray_init (NaTray *tray) priv->screen = NULL; priv->orientation = GTK_ORIENTATION_HORIZONTAL; - priv->frame = gtk_alignment_new (0.5, 0.5, 1.0, 1.0); - gtk_container_add (GTK_CONTAINER (tray), priv->frame); - gtk_widget_show (priv->frame); - #if GTK_CHECK_VERSION (3, 0, 0) priv->box = gtk_box_new (priv->orientation, ICON_SPACING); g_signal_connect (priv->box, "draw", G_CALLBACK (na_tray_draw_box), NULL); + gtk_container_add (GTK_CONTAINER (tray), priv->box); #else + priv->frame = gtk_alignment_new (0.5, 0.5, 1.0, 1.0); + gtk_container_add (GTK_CONTAINER (tray), priv->frame); + gtk_widget_show (priv->frame); + priv->box = g_object_new (na_box_get_type (), NULL); g_signal_connect (priv->box, "expose-event", G_CALLBACK (na_tray_expose_box), tray); gtk_box_set_spacing (GTK_BOX (priv->box), ICON_SPACING); -#endif gtk_container_add (GTK_CONTAINER (priv->frame), priv->box); +#endif gtk_widget_show (priv->box); } -- cgit v1.2.1