aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-gtk/genericmenuitem.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2012-01-26 13:50:22 -0600
committerTed Gould <ted@gould.cx>2012-01-26 13:50:22 -0600
commit8e1916d4a397b766f81f4ac426888971746d0484 (patch)
tree9f0f5340ad8b223c5dbea1e0ddf498053ecfbf68 /libdbusmenu-gtk/genericmenuitem.c
parent144708e6667818d48e3bbd9403e447079e8a5c56 (diff)
parent310990fdddef125e167e6ea28ab84d25110005b2 (diff)
downloadlibdbusmenu-8e1916d4a397b766f81f4ac426888971746d0484.tar.gz
libdbusmenu-8e1916d4a397b766f81f4ac426888971746d0484.tar.bz2
libdbusmenu-8e1916d4a397b766f81f4ac426888971746d0484.zip
Update to trunk
Diffstat (limited to 'libdbusmenu-gtk/genericmenuitem.c')
-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);