summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-01-21 11:04:15 +0300
committermonsta <[email protected]>2016-01-21 11:04:15 +0300
commit96b5bb54f5fb342c5612310a525ac7a6a38ec085 (patch)
treee82c9787cf0278b625fb25183d3c42599a093cf3 /src
parent00fcef892ced55719b1a7373a769cb05fa325c9a (diff)
downloadmate-indicator-applet-96b5bb54f5fb342c5612310a525ac7a6a38ec085.tar.bz2
mate-indicator-applet-96b5bb54f5fb342c5612310a525ac7a6a38ec085.tar.xz
[GTK+3] fix deprecated usage of GtkHBox and GtkVBox
Diffstat (limited to 'src')
-rw-r--r--src/applet-main.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/applet-main.c b/src/applet-main.c
index beeb2eb..7cbc18a 100644
--- a/src/applet-main.c
+++ b/src/applet-main.c
@@ -285,7 +285,11 @@ entry_added (IndicatorObject * io, IndicatorObjectEntry * entry, GtkWidget * men
GtkWidget * menuitem = gtk_menu_item_new();
GtkWidget * box = (packdirection == GTK_PACK_DIRECTION_LTR) ?
- gtk_hbox_new(FALSE, 3) : gtk_vbox_new(FALSE, 3);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 3) : gtk_box_new(GTK_ORIENTATION_VERTICAL, 3);
+#else
+ gtk_hbox_new(FALSE, 3) : gtk_vbox_new(FALSE, 3);
+#endif
g_object_set_data (G_OBJECT (menuitem), "indicator", io);
g_object_set_data (G_OBJECT (menuitem), "box", box);
@@ -688,7 +692,11 @@ reorient_box_cb (GtkWidget *menuitem, gpointer data)
{
GtkWidget *from = g_object_get_data(G_OBJECT(menuitem), "box");
GtkWidget *to = (packdirection == GTK_PACK_DIRECTION_LTR) ?
- gtk_hbox_new(FALSE, 0) : gtk_vbox_new(FALSE, 0);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0) : gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
+#else
+ gtk_hbox_new(FALSE, 0) : gtk_vbox_new(FALSE, 0);
+#endif
g_object_set_data(G_OBJECT(from), "to", to);
gtk_container_foreach(GTK_CONTAINER(from), (GtkCallback)swap_orient_cb,
from);