diff options
author | Wolfgang Ulbrich <[email protected]> | 2016-02-11 07:46:29 +0100 |
---|---|---|
committer | Wolfgang Ulbrich <[email protected]> | 2016-02-12 07:04:31 +0100 |
commit | 7637a037898508dc5bec48b93b1d89edb6609588 (patch) | |
tree | a7a347be18d3fdaaa88e7e699609e7da8eb268b5 | |
parent | 9081a2ee5cb1e173bfbd191e9630b11be299d081 (diff) | |
download | mate-panel-7637a037898508dc5bec48b93b1d89edb6609588.tar.bz2 mate-panel-7637a037898508dc5bec48b93b1d89edb6609588.tar.xz |
Gtk+3 notification-area: don't use deprecated GtkAlignment
taken from:
https://git.gnome.org/browse/gnome-panel/commit/?id=4367578
-rw-r--r-- | applets/notification_area/na-tray.c | 13 |
1 files 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); } |