aboutsummaryrefslogtreecommitdiff
path: root/tests/test-glib-properties-server.c
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-08-04 16:34:08 +0100
committerTed Gould <ted@canonical.com>2009-08-04 16:34:08 +0100
commitf5c8526e3bb73345242ea37c337562182351020b (patch)
tree432cb5de765f8484daa87646c0a60d3bac6b3f4f /tests/test-glib-properties-server.c
parentec5c382624da19a1a83d1e75d21f74778df01f38 (diff)
parent92f690257a45e81b86b39fc77ce1fe10c7b4908a (diff)
downloadlibdbusmenu-f5c8526e3bb73345242ea37c337562182351020b.tar.gz
libdbusmenu-f5c8526e3bb73345242ea37c337562182351020b.tar.bz2
libdbusmenu-f5c8526e3bb73345242ea37c337562182351020b.zip
Merging in the development branches
Diffstat (limited to 'tests/test-glib-properties-server.c')
-rw-r--r--tests/test-glib-properties-server.c28
1 files changed, 26 insertions, 2 deletions
diff --git a/tests/test-glib-properties-server.c b/tests/test-glib-properties-server.c
index 477f951..8dad37f 100644
--- a/tests/test-glib-properties-server.c
+++ b/tests/test-glib-properties-server.c
@@ -1,3 +1,24 @@
+/*
+A test for libdbusmenu to ensure its quality.
+
+Copyright 2009 Canonical Ltd.
+
+Authors:
+ Ted Gould <ted@canonical.com>
+
+This program is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License version 3, as published
+by the Free Software Foundation.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranties of
+MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
+PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along
+with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
#include <glib.h>
#include <dbus/dbus.h>
@@ -40,7 +61,7 @@ layout2menuitem (proplayout_t * layout)
}
}
- g_debug("Layout to menu return: 0x%X", (unsigned int)local);
+ /* g_debug("Layout to menu return: 0x%X", (unsigned int)local); */
return local;
}
@@ -57,7 +78,9 @@ timer_func (gpointer data)
}
g_debug("Updating to Layout %d", layouton);
- dbusmenu_server_set_root(server, layout2menuitem(&layouts[layouton]));
+ DbusmenuMenuitem * mi = layout2menuitem(&layouts[layouton]);
+ dbusmenu_server_set_root(server, mi);
+ g_object_unref(G_OBJECT(mi));
layouton++;
return TRUE;
@@ -78,6 +101,7 @@ main (int argc, char ** argv)
mainloop = g_main_loop_new(NULL, FALSE);
g_main_loop_run(mainloop);
+ g_object_unref(G_OBJECT(server));
g_debug("Quiting");
return 0;