aboutsummaryrefslogtreecommitdiff
path: root/src/indicator-datetime.c
diff options
context:
space:
mode:
authorkarl-qdh <karl@qdh.org.uk>2011-03-06 17:08:13 +0000
committerkarl-qdh <karl@qdh.org.uk>2011-03-06 17:08:13 +0000
commit7823baf6ae4d84d7796bd003f2c3f0bb0122d126 (patch)
treeecf5cda1a466a6abafded366799a698e728fea22 /src/indicator-datetime.c
parent9485b01a79c5a7ebe563986295acf24f6ce7df1a (diff)
downloadayatana-indicator-datetime-7823baf6ae4d84d7796bd003f2c3f0bb0122d126.tar.gz
ayatana-indicator-datetime-7823baf6ae4d84d7796bd003f2c3f0bb0122d126.tar.bz2
ayatana-indicator-datetime-7823baf6ae4d84d7796bd003f2c3f0bb0122d126.zip
Tried using uint but still segfaulting in variant code
Diffstat (limited to 'src/indicator-datetime.c')
-rw-r--r--src/indicator-datetime.c9
1 files changed, 8 insertions, 1 deletions
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);