diff options
Diffstat (limited to 'tests/test-glib-properties-server.c')
-rw-r--r-- | tests/test-glib-properties-server.c | 28 |
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; |