aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}