aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-gtk/genericmenuitem.c
diff options
context:
space:
mode:
authorKen VanDine <ken.vandine@canonical.com>2012-01-31 10:07:09 -0500
committerKen VanDine <ken.vandine@canonical.com>2012-01-31 10:07:09 -0500
commitc22d308ee469e5e253e694ec812a3d4ab5318ff7 (patch)
tree0f489d0586d6c5701c663893e64d01190819e23e /libdbusmenu-gtk/genericmenuitem.c
parent5447fecdeb4a3dda31d951555420105fd31b178e (diff)
parentd4a56efd670ae2432da8be9932df365c75ea0d72 (diff)
downloadlibdbusmenu-c22d308ee469e5e253e694ec812a3d4ab5318ff7.tar.gz
libdbusmenu-c22d308ee469e5e253e694ec812a3d4ab5318ff7.tar.bz2
libdbusmenu-c22d308ee469e5e253e694ec812a3d4ab5318ff7.zip
* New upstream release.
* Add property for accessible descriptions * Use insert/remove signals on GTK3 build * Change icon data to be a byte stream instead of base64 * Adjust GTK3 include path to match other libs * Don't get objects from boolean values (LP: #870742) * Fix depreactions on GTK3 (LP: #917115)
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);