Merge lp:~kamstrup/libdbusmenu/build-fix-gtk3 into lp:libdbusmenu/0.6

Proposed by Mikkel Kamstrup Erlandsen
Status: Merged
Approved by: Ted Gould
Approved revision: 352
Merged at revision: 352
Proposed branch: lp:~kamstrup/libdbusmenu/build-fix-gtk3
Merge into: lp:libdbusmenu/0.6
Diff against target: 29 lines (+10/-0)
1 file modified
libdbusmenu-gtk/genericmenuitem.c (+10/-0)
To merge this branch: bzr merge lp:~kamstrup/libdbusmenu/build-fix-gtk3
Reviewer Review Type Date Requested Status
Ted Gould (community) Approve
Review via email: mp+88669@code.launchpad.net

Description of the change

Fix build with gtk3 by ifdeffing the GtkBox/HBox construction in genericmenuitem.c

To post a comment you must log in.
Revision history for this message
Ted Gould (ted) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libdbusmenu-gtk/genericmenuitem.c'
2--- libdbusmenu-gtk/genericmenuitem.c 2011-10-05 18:59:21 +0000
3+++ libdbusmenu-gtk/genericmenuitem.c 2012-01-16 12:04:23 +0000
4@@ -241,7 +241,12 @@
5 /* We need to put the child into a new box and
6 make the box the child of the menu item. Basically
7 we're inserting a box in the middle. */
8+ #ifdef HAVE_GTK3
9+ GtkWidget * hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,
10+ get_toggle_space(GTK_WIDGET(menu_item)));
11+ #else
12 GtkWidget * hbox = gtk_hbox_new(FALSE, get_toggle_space(GTK_WIDGET(menu_item)));
13+ #endif
14 g_object_ref(child);
15 gtk_container_remove(GTK_CONTAINER(menu_item), child);
16 gtk_box_pack_start(GTK_BOX(hbox), child, FALSE, FALSE, 0);
17@@ -457,7 +462,12 @@
18 /* We need to put the child into a new box and
19 make the box the child of the menu item. Basically
20 we're inserting a box in the middle. */
21+ #ifdef HAVE_GTK3
22+ GtkWidget * hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,
23+ get_toggle_space(GTK_WIDGET(menu_item)));
24+ #else
25 GtkWidget * hbox = gtk_hbox_new(FALSE, get_toggle_space(GTK_WIDGET(menu_item)));
26+ #endif
27 g_object_ref(child);
28 gtk_container_remove(GTK_CONTAINER(menu_item), child);
29 gtk_box_pack_end(GTK_BOX(hbox), child, TRUE, TRUE, 0);

Subscribers

People subscribed via source and target branches