aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-05-19 12:41:30 -0500
committerTed Gould <ted@gould.cx>2010-05-19 12:41:30 -0500
commite66edab185ed5f916dc15628956d89f87ab10b44 (patch)
tree0292660bd18e9e44c20793e7cbb8b8a2377c60fb /src
parent69996154dbde58371e67ab88b8eb16dd5decca2d (diff)
downloadayatana-indicator-datetime-e66edab185ed5f916dc15628956d89f87ab10b44.tar.gz
ayatana-indicator-datetime-e66edab185ed5f916dc15628956d89f87ab10b44.tar.bz2
ayatana-indicator-datetime-e66edab185ed5f916dc15628956d89f87ab10b44.zip
Now we have a menu, whoo ha!
Diffstat (limited to 'src')
-rw-r--r--src/datetime-service.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/datetime-service.c b/src/datetime-service.c
index da4cd87..d2e2b3e 100644
--- a/src/datetime-service.c
+++ b/src/datetime-service.c
@@ -4,10 +4,22 @@
#include <glib/gi18n.h>
+#include <libdbusmenu-glib/server.h>
+#include <libdbusmenu-glib/menuitem.h>
+
#include "dbus-shared.h"
static IndicatorService * service = NULL;
static GMainLoop * mainloop = NULL;
+static DbusmenuServer * server = NULL;
+static DbusmenuMenuitem * root = NULL;
+
+static void
+build_menus (DbusmenuMenuitem * root)
+{
+
+ return;
+}
static void
service_shutdown (IndicatorService * service, gpointer user_data)
@@ -22,6 +34,7 @@ main (int argc, char ** argv)
{
g_type_init();
+ /* Acknowledging the service init and setting up the interface */
service = indicator_service_new_version(SERVICE_NAME, SERVICE_VERSION);
g_signal_connect(service, INDICATOR_SERVICE_SIGNAL_SHUTDOWN, G_CALLBACK(service_shutdown), NULL);
@@ -31,10 +44,18 @@ main (int argc, char ** argv)
bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
textdomain (GETTEXT_PACKAGE);
+ /* Building the base menu */
+ server = dbusmenu_server_new(MENU_OBJ);
+ root = dbusmenu_menuitem_new();
+ dbusmenu_server_set_root(server, root);
+ build_menus(root);
+
mainloop = g_main_loop_new(NULL, FALSE);
g_main_loop_run(mainloop);
g_object_unref(G_OBJECT(service));
+ g_object_unref(G_OBJECT(server));
+ g_object_unref(G_OBJECT(root));
return 0;
}