aboutsummaryrefslogtreecommitdiff
path: root/src/datetime-service.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-07-07 16:24:17 -0500
committerTed Gould <ted@gould.cx>2010-07-07 16:24:17 -0500
commitcfef5b08bd7812d6f97854f157ab0227a9cdfd03 (patch)
tree0186280c6d2fa2f8dc0ba3e4491bed64f7909826 /src/datetime-service.c
parent33799d8b1d8417218688a7d2599c24bc14e04e4c (diff)
downloadayatana-indicator-datetime-cfef5b08bd7812d6f97854f157ab0227a9cdfd03.tar.gz
ayatana-indicator-datetime-cfef5b08bd7812d6f97854f157ab0227a9cdfd03.tar.bz2
ayatana-indicator-datetime-cfef5b08bd7812d6f97854f157ab0227a9cdfd03.zip
Make date and time menu items.
Diffstat (limited to 'src/datetime-service.c')
-rw-r--r--src/datetime-service.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/datetime-service.c b/src/datetime-service.c
index ee29a7a..99a24f5 100644
--- a/src/datetime-service.c
+++ b/src/datetime-service.c
@@ -14,12 +14,32 @@ static GMainLoop * mainloop = NULL;
static DbusmenuServer * server = NULL;
static DbusmenuMenuitem * root = NULL;
+/* Items */
+static DbusmenuMenuitem * date = NULL;
+static DbusmenuMenuitem * calendar = NULL;
+
/* Does the work to build the default menu, really calls out
to other functions but this is the core to clean up the
main function. */
static void
build_menus (DbusmenuMenuitem * root)
{
+ if (date == NULL) {
+ date = dbusmenu_menuitem_new();
+ dbusmenu_menuitem_property_set (date, DBUSMENU_MENUITEM_PROP_LABEL, _("No date yet..."));
+ dbusmenu_menuitem_property_set_bool(date, DBUSMENU_MENUITEM_PROP_ENABLED, FALSE);
+ dbusmenu_menuitem_child_append(root, date);
+ //update_label(self);
+ }
+
+ if (calendar == NULL) {
+ calendar = dbusmenu_menuitem_new();
+ dbusmenu_menuitem_property_set (calendar, DBUSMENU_MENUITEM_PROP_LABEL, _("Open Calendar"));
+ /* insensitive until we check for available apps */
+ dbusmenu_menuitem_property_set_bool(calendar, DBUSMENU_MENUITEM_PROP_ENABLED, FALSE);
+ dbusmenu_menuitem_child_append(root, calendar);
+ // queue checking for apps
+ }
return;
}