Merge lp:~ted/libdbusmenu/reorder-test-fix into lp:libdbusmenu/0.5

Proposed by Ted Gould
Status: Merged
Merged at revision: not available
Proposed branch: lp:~ted/libdbusmenu/reorder-test-fix
Merge into: lp:libdbusmenu/0.5
Diff against target: 56 lines
2 files modified
libdbusmenu-gtk/menu.c (+8/-0)
tests/test-gtk-reorder-server.c (+1/-1)
To merge this branch: bzr merge lp:~ted/libdbusmenu/reorder-test-fix
Reviewer Review Type Date Requested Status
Cody Russell (community) Approve
Review via email: mp+12876@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Ted Gould (ted) wrote :

Fixing our test. Now it works :)

Revision history for this message
Cody Russell (bratsche) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libdbusmenu-gtk/menu.c'
2--- libdbusmenu-gtk/menu.c 2009-10-02 01:44:05 +0000
3+++ libdbusmenu-gtk/menu.c 2009-10-05 15:30:21 +0000
4@@ -213,7 +213,9 @@
5 static void
6 root_child_added (DbusmenuMenuitem * root, DbusmenuMenuitem * child, guint position, DbusmenuGtkMenu * menu)
7 {
8+ #ifdef MASSIVEDEBUGGING
9 g_debug("Root new child");
10+ #endif
11 DbusmenuGtkMenuPrivate * priv = DBUSMENU_GTKMENU_GET_PRIVATE(menu);
12
13 g_signal_connect(G_OBJECT(child), DBUSMENU_MENUITEM_SIGNAL_REALIZED, G_CALLBACK(child_realized), menu);
14@@ -240,7 +242,9 @@
15 static void
16 root_child_moved (DbusmenuMenuitem * root, DbusmenuMenuitem * child, guint newposition, guint oldposition, DbusmenuGtkMenu * menu)
17 {
18+ #ifdef MASSIVEDEBUGGING
19 g_debug("Root child moved");
20+ #endif
21 DbusmenuGtkMenuPrivate * priv = DBUSMENU_GTKMENU_GET_PRIVATE(menu);
22 gtk_menu_reorder_child(GTK_MENU(menu), GTK_WIDGET(dbusmenu_gtkclient_menuitem_get(priv->client, child)), newposition);
23 return;
24@@ -250,7 +254,9 @@
25 static void
26 root_child_delete (DbusmenuMenuitem * root, DbusmenuMenuitem * child, DbusmenuGtkMenu * menu)
27 {
28+ #ifdef MASSIVEDEBUGGING
29 g_debug("Root child deleted");
30+ #endif
31 DbusmenuGtkMenuPrivate * priv = DBUSMENU_GTKMENU_GET_PRIVATE(menu);
32 GtkWidget * item = GTK_WIDGET(dbusmenu_gtkclient_menuitem_get(priv->client, child));
33 if (item != NULL) {
34@@ -268,7 +274,9 @@
35 static void
36 child_realized (DbusmenuMenuitem * child, gpointer userdata)
37 {
38+ #ifdef MASSIVEDEBUGGING
39 g_debug("Root child realized");
40+ #endif
41 g_return_if_fail(DBUSMENU_IS_GTKMENU(userdata));
42
43 DbusmenuGtkMenu * menu = DBUSMENU_GTKMENU(userdata);
44
45=== modified file 'tests/test-gtk-reorder-server.c'
46--- tests/test-gtk-reorder-server.c 2009-09-30 21:53:08 +0000
47+++ tests/test-gtk-reorder-server.c 2009-10-05 15:30:21 +0000
48@@ -66,7 +66,7 @@
49 for (i = 0; i < NUMBER_ENTRIES; i++) {
50 g_debug("Putting entry '%d' at position '%d'", i, ordering[test][i]);
51 dbusmenu_menuitem_child_reorder(root, entries[i], ordering[test][i]);
52- dbusmenu_menuitem_property_set(entries[i], "label", names[i]);
53+ dbusmenu_menuitem_property_set(entries[i], "label", names[ordering[test][i]]);
54 }
55
56 test++;

Subscribers

People subscribed via source and target branches