diff options
author | Ted Gould <ted@gould.cx> | 2010-02-05 10:54:42 -0800 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-02-05 10:54:42 -0800 |
commit | 873763b18e85fe2d53f847e00d5207e4926bb619 (patch) | |
tree | 833014e2b5bea30c53b5e3660e3a47180be1faa8 /tests/test-glib-layout-server.c | |
parent | a207ebb4db1921fe122a9c78b97f17e7ec175a29 (diff) | |
parent | 0f6f4c9cdd83d80dfd77fbedcc9a9468cb16eaae (diff) | |
download | libdbusmenu-873763b18e85fe2d53f847e00d5207e4926bb619.tar.gz libdbusmenu-873763b18e85fe2d53f847e00d5207e4926bb619.tar.bz2 libdbusmenu-873763b18e85fe2d53f847e00d5207e4926bb619.zip |
Fix IDs to handle the root ID of zero better and to handle merging of properties if items are reused.
Diffstat (limited to 'tests/test-glib-layout-server.c')
-rw-r--r-- | tests/test-glib-layout-server.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test-glib-layout-server.c b/tests/test-glib-layout-server.c index 40dd048..111e164 100644 --- a/tests/test-glib-layout-server.c +++ b/tests/test-glib-layout-server.c @@ -41,7 +41,7 @@ layout2menuitem (layout_t * layout) if (layout->submenu != NULL) { guint count; - for (count = 0; layout->submenu[count].id != 0; count++) { + for (count = 0; layout->submenu[count].id != -1; count++) { DbusmenuMenuitem * child = layout2menuitem(&layout->submenu[count]); if (child != NULL) { dbusmenu_menuitem_child_append(local, child); @@ -60,7 +60,7 @@ static GMainLoop * mainloop = NULL; static gboolean timer_func (gpointer data) { - if (layouts[layouton].id == 0) { + if (layouts[layouton].id == -1) { g_main_loop_quit(mainloop); return FALSE; } |