aboutsummaryrefslogtreecommitdiff
path: root/tests/test-glib-layout-server.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-02-05 10:54:42 -0800
committerTed Gould <ted@gould.cx>2010-02-05 10:54:42 -0800
commit873763b18e85fe2d53f847e00d5207e4926bb619 (patch)
tree833014e2b5bea30c53b5e3660e3a47180be1faa8 /tests/test-glib-layout-server.c
parenta207ebb4db1921fe122a9c78b97f17e7ec175a29 (diff)
parent0f6f4c9cdd83d80dfd77fbedcc9a9468cb16eaae (diff)
downloadlibdbusmenu-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.c4
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;
}