diff options
author | Ted Gould <ted@canonical.com> | 2009-11-23 14:55:06 -0600 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-11-23 14:55:06 -0600 |
commit | 59b0398609ef5ce6ee991c633eb84c3b55a42ac3 (patch) | |
tree | b81beec36b41653eb49717110b3655515a5637c3 /tests/test-simple-app.c | |
parent | 97388871ba0a4669792bead5878ec1eec24a2118 (diff) | |
parent | 2c04418795e644efafc0204656dd575844ba0976 (diff) | |
download | libayatana-appindicator-59b0398609ef5ce6ee991c633eb84c3b55a42ac3.tar.gz libayatana-appindicator-59b0398609ef5ce6ee991c633eb84c3b55a42ac3.tar.bz2 libayatana-appindicator-59b0398609ef5ce6ee991c633eb84c3b55a42ac3.zip |
Adding more fun. Now we're cookin'!
Diffstat (limited to 'tests/test-simple-app.c')
-rw-r--r-- | tests/test-simple-app.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/test-simple-app.c b/tests/test-simple-app.c new file mode 100644 index 0000000..9e779ec --- /dev/null +++ b/tests/test-simple-app.c @@ -0,0 +1,32 @@ + +#include <dbus/dbus-glib.h> +#include <dbus/dbus-glib-lowlevel.h> +#include <glib.h> +#include <libcustomindicator/custom-indicator.h> + +static GMainLoop * mainloop = NULL; + +int +main (int argc, char ** argv) +{ + g_type_init(); + + DbusmenuServer * dms = dbusmenu_server_new("/menu"); + DbusmenuMenuitem * dmi = dbusmenu_menuitem_new(); + dbusmenu_menuitem_property_set(dmi, "label", "Bob"); + + CustomIndicator * ci = CUSTOM_INDICATOR(g_object_new(CUSTOM_INDICATOR_TYPE, + "id", "test-application", + "status-enum", CUSTOM_INDICATOR_STATUS_ACTIVE, + "icon-name", "system-shutdown", + "menu-object", dms, + NULL)); + + mainloop = g_main_loop_new(NULL, FALSE); + g_main_loop_run(mainloop); + + g_object_unref(G_OBJECT(ci)); + g_debug("Quiting"); + + return 0; +} |