aboutsummaryrefslogtreecommitdiff
path: root/tests/test-libappindicator-dbus-server.c
diff options
context:
space:
mode:
authorKen VanDine <ken.vandine@canonical.com>2010-02-11 14:44:24 -0500
committerKen VanDine <ken.vandine@canonical.com>2010-02-11 14:44:24 -0500
commit4102c4d56e73cab5b733efb9a5a28a4eaed8b81d (patch)
treec09cebf6b4b84b04fe7a0d31083296258a83f977 /tests/test-libappindicator-dbus-server.c
parentc9d339ff50253e87e51045acf896a9663f582144 (diff)
parentf7b909ce3b94c2afb8e8b8a31b63f579c8bcb92e (diff)
downloadlibayatana-appindicator-4102c4d56e73cab5b733efb9a5a28a4eaed8b81d.tar.gz
libayatana-appindicator-4102c4d56e73cab5b733efb9a5a28a4eaed8b81d.tar.bz2
libayatana-appindicator-4102c4d56e73cab5b733efb9a5a28a4eaed8b81d.zip
releasing version 0.0.13-0ubuntu10.0.13-0ubuntu1
Diffstat (limited to 'tests/test-libappindicator-dbus-server.c')
-rw-r--r--tests/test-libappindicator-dbus-server.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/test-libappindicator-dbus-server.c b/tests/test-libappindicator-dbus-server.c
index cc072aa..76f0e50 100644
--- a/tests/test-libappindicator-dbus-server.c
+++ b/tests/test-libappindicator-dbus-server.c
@@ -23,7 +23,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
-#include <glib.h>
+#include <gtk/gtk.h>
#include <libappindicator/app-indicator.h>
#include "test-defines.h"
@@ -39,13 +39,19 @@ kill_func (gpointer userdata)
gint
main (gint argc, gchar * argv[])
{
- g_type_init();
+ gtk_init(&argc, &argv);
g_debug("DBus ID: %s", dbus_connection_get_server_id(dbus_g_connection_get_connection(dbus_g_bus_get(DBUS_BUS_SESSION, NULL))));
AppIndicator * ci = app_indicator_new (TEST_ID, TEST_ICON_NAME, TEST_CATEGORY);
- app_indicator_set_status (ci, TEST_STATE);
- app_indicator_set_attention_icon (ci, TEST_ATTENTION_ICON_NAME);
+ app_indicator_set_status (ci, TEST_STATE);
+ app_indicator_set_attention_icon (ci, TEST_ATTENTION_ICON_NAME);
+
+ GtkMenu * menu = GTK_MENU(gtk_menu_new());
+ GtkMenuItem * item = GTK_MENU_ITEM(gtk_menu_item_new_with_label("Label"));
+ gtk_menu_shell_append(GTK_MENU_SHELL(menu), GTK_WIDGET(item));
+
+ app_indicator_set_menu(ci, menu);
g_timeout_add_seconds(2, kill_func, NULL);