diff options
-rw-r--r-- | src/datetime-service.c | 2 | ||||
-rw-r--r-- | src/indicator-datetime.c | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/datetime-service.c b/src/datetime-service.c index ffaafb0..b097217 100644 --- a/src/datetime-service.c +++ b/src/datetime-service.c @@ -284,7 +284,7 @@ month_changed_cb (DbusmenuMenuitem * menuitem, GVariant *variant, guint timestam // * Check what our current month/year are // * Set some globals so when we-re-run update appointment menu items it gets the right start date // * update appointment menu items - g_debug("Received month changed : %s", g_variant_get_string(variant, NULL)); + g_debug("Received month changed : %d", g_variant_get_uint32(variant)); return TRUE; } diff --git a/src/indicator-datetime.c b/src/indicator-datetime.c index 0d10579..944b33d 100644 --- a/src/indicator-datetime.c +++ b/src/indicator-datetime.c @@ -1197,7 +1197,14 @@ month_changed_cb (IdoCalendarMenuItem *ido, DbusmenuMenuitem * item = DBUSMENU_MENUITEM (user_data); ido_calendar_menu_item_get_date(ido, &y, &m, &d); g_sprintf(datestring, "%d-%d-%d", y, m, d); - GVariant *variant = g_variant_new_string(datestring); + struct tm date; + date.tm_mday = d; + date.tm_mon = m; + date.tm_year = y; + date.tm_hour = 0; + date.tm_min = 0; + guint selecteddate = (guint)mktime(&date); + GVariant *variant = g_variant_new_uint32(selecteddate); guint timestamp = (guint)time(NULL); dbusmenu_menuitem_handle_event(DBUSMENU_MENUITEM(item), "month-changed", variant, timestamp); g_debug("Got month changed signal: %s", datestring); |