aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-gtk
diff options
context:
space:
mode:
authorMikkel Kamstrup Erlandsen <mikkel.kamstrup@gmail.com>2012-01-16 12:57:11 +0100
committerMikkel Kamstrup Erlandsen <mikkel.kamstrup@gmail.com>2012-01-16 12:57:11 +0100
commit145fba945cdc582ccdf5dc483acb7f170325549b (patch)
tree300457c5ec3746b18a91be094c05c6a1bda415ae /libdbusmenu-gtk
parent0845cb4986d649c38e7f9b9784af76539bfb2dea (diff)
downloadlibdbusmenu-145fba945cdc582ccdf5dc483acb7f170325549b.tar.gz
libdbusmenu-145fba945cdc582ccdf5dc483acb7f170325549b.tar.bz2
libdbusmenu-145fba945cdc582ccdf5dc483acb7f170325549b.zip
Fix build with gtk3 by ifdeffing the GtkBox/HBox construction in genericmenuitem.c
Diffstat (limited to 'libdbusmenu-gtk')
-rw-r--r--libdbusmenu-gtk/genericmenuitem.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libdbusmenu-gtk/genericmenuitem.c b/libdbusmenu-gtk/genericmenuitem.c
index ef77a2e..098de67 100644
--- a/libdbusmenu-gtk/genericmenuitem.c
+++ b/libdbusmenu-gtk/genericmenuitem.c
@@ -241,7 +241,12 @@ set_label (GtkMenuItem * menu_item, const gchar * in_label)
/* We need to put the child into a new box and
make the box the child of the menu item. Basically
we're inserting a box in the middle. */
+ #ifdef HAVE_GTK3
+ GtkWidget * hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,
+ get_toggle_space(GTK_WIDGET(menu_item)));
+ #else
GtkWidget * hbox = gtk_hbox_new(FALSE, get_toggle_space(GTK_WIDGET(menu_item)));
+ #endif
g_object_ref(child);
gtk_container_remove(GTK_CONTAINER(menu_item), child);
gtk_box_pack_start(GTK_BOX(hbox), child, FALSE, FALSE, 0);
@@ -457,7 +462,12 @@ genericmenuitem_set_image (Genericmenuitem * menu_item, GtkWidget * image)
/* We need to put the child into a new box and
make the box the child of the menu item. Basically
we're inserting a box in the middle. */
+ #ifdef HAVE_GTK3
+ GtkWidget * hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,
+ get_toggle_space(GTK_WIDGET(menu_item)));
+ #else
GtkWidget * hbox = gtk_hbox_new(FALSE, get_toggle_space(GTK_WIDGET(menu_item)));
+ #endif
g_object_ref(child);
gtk_container_remove(GTK_CONTAINER(menu_item), child);
gtk_box_pack_end(GTK_BOX(hbox), child, TRUE, TRUE, 0);