From 9485b01a79c5a7ebe563986295acf24f6ce7df1a Mon Sep 17 00:00:00 2001 From: karl-qdh Date: Sun, 6 Mar 2011 14:28:05 +0000 Subject: Hooking up the signals from the calendar and getting it working on service side --- src/indicator-datetime.c | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) (limited to 'src/indicator-datetime.c') diff --git a/src/indicator-datetime.c b/src/indicator-datetime.c index 7953883..0d10579 100644 --- a/src/indicator-datetime.c +++ b/src/indicator-datetime.c @@ -1102,6 +1102,9 @@ indicator_prop_change_cb (DbusmenuMenuitem * mi, gchar * prop, GVariant *value, ido_calendar_menu_item_unmark_day (IDO_CALENDAR_MENU_ITEM (mi_data), g_variant_get_int16(value)); } else if (!g_strcmp0(prop, CALENDAR_MENUITEM_PROP_CLEAR_MARKS)) { ido_calendar_menu_item_clear_marks (IDO_CALENDAR_MENU_ITEM (mi_data)); + } else if (!g_strcmp0(prop, CALENDAR_MENUITEM_PROP_SET_DATE)) { + // TODO This needs to be an array of 3 ints + //ido_calendar_menu_item_set_date (IDO_CALENDAR_MENU_ITEM (mi_data), ); } else { g_warning("Indicator Item property '%s' unknown", prop); } @@ -1196,10 +1199,42 @@ month_changed_cb (IdoCalendarMenuItem *ido, g_sprintf(datestring, "%d-%d-%d", y, m, d); GVariant *variant = g_variant_new_string(datestring); guint timestamp = (guint)time(NULL); - dbusmenu_menuitem_handle_event(DBUSMENU_MENUITEM(item), "event::month-changed", variant, timestamp); + dbusmenu_menuitem_handle_event(DBUSMENU_MENUITEM(item), "month-changed", variant, timestamp); g_debug("Got month changed signal: %s", datestring); } +static void +day_selected_cb (IdoCalendarMenuItem *ido, + guint day, + gpointer user_data) +{ + gchar datestring[20]; + guint d,m,y; + 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); + guint timestamp = (guint)time(NULL); + dbusmenu_menuitem_handle_event(DBUSMENU_MENUITEM(item), "day-selected", variant, timestamp); + g_debug("Got day-selected signal: %s", datestring); +} + +static void +day_selected_double_click_cb (IdoCalendarMenuItem *ido, + guint day, + gpointer user_data) +{ + gchar datestring[20]; + guint d,m,y; + 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); + guint timestamp = (guint)time(NULL); + dbusmenu_menuitem_handle_event(DBUSMENU_MENUITEM(item), "day-selected-double-click", variant, timestamp); + g_debug("Got day-selected-double-click signal: %s", datestring); +} + static gboolean new_calendar_item (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, @@ -1231,6 +1266,11 @@ new_calendar_item (DbusmenuMenuitem * newitem, dbusmenu_gtkclient_newitem_base(DBUSMENU_GTKCLIENT(client), newitem, GTK_MENU_ITEM(ido), parent); g_signal_connect_after(ido, "month-changed", G_CALLBACK(month_changed_cb), (gpointer)newitem); + dbusmenu_gtkclient_newitem_base(DBUSMENU_GTKCLIENT(client), newitem, GTK_MENU_ITEM(ido), parent); + g_signal_connect_after(ido, "day-selected", G_CALLBACK(day_selected_cb), (gpointer)newitem); + dbusmenu_gtkclient_newitem_base(DBUSMENU_GTKCLIENT(client), newitem, GTK_MENU_ITEM(ido), parent); + g_signal_connect_after(ido, "day-selected-double-click", G_CALLBACK(day_selected_double_click_cb), (gpointer)newitem); + return TRUE; } -- cgit v1.2.3 From 7823baf6ae4d84d7796bd003f2c3f0bb0122d126 Mon Sep 17 00:00:00 2001 From: karl-qdh Date: Sun, 6 Mar 2011 17:08:13 +0000 Subject: Tried using uint but still segfaulting in variant code --- src/datetime-service.c | 2 +- src/indicator-datetime.c | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'src/indicator-datetime.c') 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); -- cgit v1.2.3 From 3bd841330e0299c54031218e3fc20f911ba7e952 Mon Sep 17 00:00:00 2001 From: karl-qdh Date: Tue, 8 Mar 2011 13:18:50 +0000 Subject: Fixed incorrect year in tm struct for indicator-datetime.c:month_changed_cb, still receiving a segfault in datetime-service.c when we try to use the variant. Checked the variant value over dbus and its fine. --- src/datetime-service.c | 15 ++++++++++----- src/indicator-datetime.c | 21 +++++++++------------ 2 files changed, 19 insertions(+), 17 deletions(-) (limited to 'src/indicator-datetime.c') diff --git a/src/datetime-service.c b/src/datetime-service.c index b097217..78e695d 100644 --- a/src/datetime-service.c +++ b/src/datetime-service.c @@ -82,6 +82,7 @@ static GList * appointments = NULL; static GList * dconflocations = NULL; static GList * comp_instances = NULL; static gboolean updating_appointments = FALSE; +//static time_t start_time_appointments = NULL; GSettings *conf; @@ -279,12 +280,16 @@ activate_cb (DbusmenuMenuitem * menuitem, guint timestamp, const gchar *command) static gboolean month_changed_cb (DbusmenuMenuitem * menuitem, GVariant *variant, guint timestamp) { - // BLOCKED: Get string from the variant causes segfault in glib - // TODO: * Decode the month/year from the string we received - // * 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 + // BLOCKED: get type, then get type as string from the variant causes segfault in glib + // TODO: * 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 : %d", g_variant_get_uint32(variant)); + if (g_variant_get_type(variant) != G_VARIANT_TYPE_UINT32) + g_debug("Variant type is not uint32"); + else + g_debug("Received month changed with timestamp: %d", g_variant_get_uint32(variant)); + + //start_time_appointments = (time_t)g_variant_get_uint32(variant); + //update_appointment_menu_items(NULL); return TRUE; } diff --git a/src/indicator-datetime.c b/src/indicator-datetime.c index 944b33d..86eeed6 100644 --- a/src/indicator-datetime.c +++ b/src/indicator-datetime.c @@ -1192,24 +1192,21 @@ static void month_changed_cb (IdoCalendarMenuItem *ido, gpointer user_data) { - gchar datestring[20]; guint d,m,y; 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); - struct tm date; + struct tm date = {0}; date.tm_mday = d; - date.tm_mon = m; - date.tm_year = y; - date.tm_hour = 0; - date.tm_min = 0; + date.tm_mon = m + 1; // Month is always off by one + date.tm_year = y - 1900; guint selecteddate = (guint)mktime(&date); + g_debug("Got month changed signal: %s", asctime(&date)); + g_debug("Selected date %d from %d-%d-%d", selecteddate, d, m, y); 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); } - +/* The following needs ido changes to be merged static void day_selected_cb (IdoCalendarMenuItem *ido, guint day, @@ -1241,7 +1238,7 @@ day_selected_double_click_cb (IdoCalendarMenuItem *ido, dbusmenu_menuitem_handle_event(DBUSMENU_MENUITEM(item), "day-selected-double-click", variant, timestamp); g_debug("Got day-selected-double-click signal: %s", datestring); } - +*/ static gboolean new_calendar_item (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, @@ -1274,9 +1271,9 @@ new_calendar_item (DbusmenuMenuitem * newitem, dbusmenu_gtkclient_newitem_base(DBUSMENU_GTKCLIENT(client), newitem, GTK_MENU_ITEM(ido), parent); g_signal_connect_after(ido, "month-changed", G_CALLBACK(month_changed_cb), (gpointer)newitem); dbusmenu_gtkclient_newitem_base(DBUSMENU_GTKCLIENT(client), newitem, GTK_MENU_ITEM(ido), parent); - g_signal_connect_after(ido, "day-selected", G_CALLBACK(day_selected_cb), (gpointer)newitem); + /*g_signal_connect_after(ido, "day-selected", G_CALLBACK(day_selected_cb), (gpointer)newitem); dbusmenu_gtkclient_newitem_base(DBUSMENU_GTKCLIENT(client), newitem, GTK_MENU_ITEM(ido), parent); - g_signal_connect_after(ido, "day-selected-double-click", G_CALLBACK(day_selected_double_click_cb), (gpointer)newitem); + g_signal_connect_after(ido, "day-selected-double-click", G_CALLBACK(day_selected_double_click_cb), (gpointer)newitem);*/ return TRUE; } -- cgit v1.2.3 From 7d8535da7bd004bf6aa16ea0a52d2a4052614860 Mon Sep 17 00:00:00 2001 From: karl-qdh Date: Tue, 8 Mar 2011 15:44:28 +0000 Subject: Fixed calendar browsing with month-changed and removed bogus off by one error --- src/datetime-service.c | 5 +++-- src/indicator-datetime.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src/indicator-datetime.c') diff --git a/src/datetime-service.c b/src/datetime-service.c index 2db414f..46b31ef 100644 --- a/src/datetime-service.c +++ b/src/datetime-service.c @@ -283,8 +283,9 @@ month_changed_cb (DbusmenuMenuitem * menuitem, gchar *name, GVariant *variant, g // BLOCKED: get type, then get type as string from the variant causes segfault in glib // TODO: * 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 with timestamp: %d", g_variant_get_uint32(variant)); start_time_appointments = (time_t)g_variant_get_uint32(variant); + + g_debug("Received month changed with timestamp: %d -> %s",(int)start_time_appointments, ctime(&start_time_appointments)); update_appointment_menu_items(NULL); return TRUE; } @@ -678,7 +679,7 @@ update_appointment_menu_items (gpointer user_data) else strftime(right, 20, "%a %l:%M %p", due); - g_debug("Appointment time: %s, for date", right, asctime(&due)); + g_debug("Appointment time: %s, for date %s", right, asctime(due)); dbusmenu_menuitem_property_set (item, APPOINTMENT_MENUITEM_PROP_RIGHT, right); // Now we pull out the URI for the calendar event and try to create a URI that'll work when we execute evolution diff --git a/src/indicator-datetime.c b/src/indicator-datetime.c index 86eeed6..07be8de 100644 --- a/src/indicator-datetime.c +++ b/src/indicator-datetime.c @@ -1197,7 +1197,7 @@ month_changed_cb (IdoCalendarMenuItem *ido, ido_calendar_menu_item_get_date(ido, &y, &m, &d); struct tm date = {0}; date.tm_mday = d; - date.tm_mon = m + 1; // Month is always off by one + date.tm_mon = m; date.tm_year = y - 1900; guint selecteddate = (guint)mktime(&date); g_debug("Got month changed signal: %s", asctime(&date)); -- cgit v1.2.3 From 3cf4b8aea38d62a047b609d13909d79d5c246d65 Mon Sep 17 00:00:00 2001 From: karl-qdh Date: Mon, 14 Mar 2011 09:59:55 +0000 Subject: Fixing ted's comments --- src/datetime-service.c | 10 +++++++--- src/indicator-datetime.c | 38 ++++++++++++++++++++++++-------------- 2 files changed, 31 insertions(+), 17 deletions(-) (limited to 'src/indicator-datetime.c') diff --git a/src/datetime-service.c b/src/datetime-service.c index 46b31ef..5616d1c 100644 --- a/src/datetime-service.c +++ b/src/datetime-service.c @@ -548,7 +548,6 @@ update_appointment_menu_items (gpointer user_data) time_t t1, t2; gchar *ad; GList *l; - //GList *allobjects = NULL; GSList *g; GError *gerror = NULL; gint i; @@ -560,7 +559,11 @@ update_appointment_menu_items (gpointer user_data) else time(&t1); - t2 = t1 + (time_t) (7 * 24 * 60 * 60); /* 7 days ahead of now, we actually need number_of_days_in_this_month */ + /* TODO: 7 days ahead of now, we actually need number_of_days_in_this_month + * so we call "mark-day" for all remaining days in this month + * N.B. Ideally we want any/all dates which are later than today to be marked. + */ + t2 = t1 + (time_t) (7 * 24 * 60 * 60); // TODO Remove all highlights from the calendar widget @@ -619,7 +622,8 @@ update_appointment_menu_items (gpointer user_data) } gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, &width, &height); - // Sometimes these give negative numbers, sometimes large numbers which look like timestampss + // Sometimes these give negative numbers, sometimes large numbers which look like timestamps + // is there a buffer overwrite causing it? if (width <= 0) width = 12; if (height <= 0) height = 12; if (width > 30) width = 12; diff --git a/src/indicator-datetime.c b/src/indicator-datetime.c index 07be8de..cf61d25 100644 --- a/src/indicator-datetime.c +++ b/src/indicator-datetime.c @@ -1103,8 +1103,9 @@ indicator_prop_change_cb (DbusmenuMenuitem * mi, gchar * prop, GVariant *value, } else if (!g_strcmp0(prop, CALENDAR_MENUITEM_PROP_CLEAR_MARKS)) { ido_calendar_menu_item_clear_marks (IDO_CALENDAR_MENU_ITEM (mi_data)); } else if (!g_strcmp0(prop, CALENDAR_MENUITEM_PROP_SET_DATE)) { - // TODO This needs to be an array of 3 ints - //ido_calendar_menu_item_set_date (IDO_CALENDAR_MENU_ITEM (mi_data), ); + gint *array = g_variant_get_fixed_array(value, 3, sizeof(gint)); + // TODO: Needs ido branch merged - lp:~karl-qdh/ido/select-activate-set-date + //ido_calendar_menu_item_set_date (IDO_CALENDAR_MENU_ITEM (mi_data), array[0], array[1], array[2]); } else { g_warning("Indicator Item property '%s' unknown", prop); } @@ -1201,26 +1202,30 @@ month_changed_cb (IdoCalendarMenuItem *ido, date.tm_year = y - 1900; guint selecteddate = (guint)mktime(&date); g_debug("Got month changed signal: %s", asctime(&date)); - g_debug("Selected date %d from %d-%d-%d", selecteddate, d, m, y); GVariant *variant = g_variant_new_uint32(selecteddate); guint timestamp = (guint)time(NULL); dbusmenu_menuitem_handle_event(DBUSMENU_MENUITEM(item), "month-changed", variant, timestamp); } -/* The following needs ido changes to be merged + +// TODO: Needs ido branch merged - lp:~karl-qdh/ido/select-activate-set-date +/* static void day_selected_cb (IdoCalendarMenuItem *ido, guint day, gpointer user_data) { - gchar datestring[20]; guint d,m,y; 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 = {0}; + date.tm_mday = d; + date.tm_mon = m; + date.tm_year = y - 1900; + guint selecteddate = (guint)mktime(&date); + g_debug("Got day selected signal: %s", asctime(&date)); + GVariant *variant = g_variant_new_uint32(selecteddate); guint timestamp = (guint)time(NULL); dbusmenu_menuitem_handle_event(DBUSMENU_MENUITEM(item), "day-selected", variant, timestamp); - g_debug("Got day-selected signal: %s", datestring); } static void @@ -1228,17 +1233,22 @@ day_selected_double_click_cb (IdoCalendarMenuItem *ido, guint day, gpointer user_data) { - gchar datestring[20]; guint d,m,y; 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 = {0}; + date.tm_mday = d; + date.tm_mon = m; + date.tm_year = y - 1900; + guint selecteddate = (guint)mktime(&date); + g_debug("Got day selected double click signal: %s", asctime(&date)); + GVariant *variant = g_variant_new_uint32(selecteddate); guint timestamp = (guint)time(NULL); dbusmenu_menuitem_handle_event(DBUSMENU_MENUITEM(item), "day-selected-double-click", variant, timestamp); - g_debug("Got day-selected-double-click signal: %s", datestring); } */ + + static gboolean new_calendar_item (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, @@ -1270,9 +1280,9 @@ new_calendar_item (DbusmenuMenuitem * newitem, dbusmenu_gtkclient_newitem_base(DBUSMENU_GTKCLIENT(client), newitem, GTK_MENU_ITEM(ido), parent); g_signal_connect_after(ido, "month-changed", G_CALLBACK(month_changed_cb), (gpointer)newitem); - dbusmenu_gtkclient_newitem_base(DBUSMENU_GTKCLIENT(client), newitem, GTK_MENU_ITEM(ido), parent); + + // TODO: Needs ido branch merged - lp:~karl-qdh/ido/select-activate-set-date /*g_signal_connect_after(ido, "day-selected", G_CALLBACK(day_selected_cb), (gpointer)newitem); - dbusmenu_gtkclient_newitem_base(DBUSMENU_GTKCLIENT(client), newitem, GTK_MENU_ITEM(ido), parent); g_signal_connect_after(ido, "day-selected-double-click", G_CALLBACK(day_selected_double_click_cb), (gpointer)newitem);*/ return TRUE; -- cgit v1.2.3 From 139938582ae1356e2b884d8904da33697bd2bcff Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 14 Mar 2011 21:40:24 -0500 Subject: Commenting out value as we're not using it yet. --- src/indicator-datetime.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/indicator-datetime.c') diff --git a/src/indicator-datetime.c b/src/indicator-datetime.c index d48cb55..83ae161 100644 --- a/src/indicator-datetime.c +++ b/src/indicator-datetime.c @@ -1154,9 +1154,9 @@ indicator_prop_change_cb (DbusmenuMenuitem * mi, gchar * prop, GVariant *value, } else if (!g_strcmp0(prop, CALENDAR_MENUITEM_PROP_CLEAR_MARKS)) { ido_calendar_menu_item_clear_marks (IDO_CALENDAR_MENU_ITEM (mi_data)); } else if (!g_strcmp0(prop, CALENDAR_MENUITEM_PROP_SET_DATE)) { - gint *array = g_variant_get_fixed_array(value, 3, sizeof(gint)); + // const gint * array = g_variant_get_fixed_array(value, NULL, sizeof(gint)); // TODO: Needs ido branch merged - lp:~karl-qdh/ido/select-activate-set-date - //ido_calendar_menu_item_set_date (IDO_CALENDAR_MENU_ITEM (mi_data), array[0], array[1], array[2]); + // ido_calendar_menu_item_set_date (IDO_CALENDAR_MENU_ITEM (mi_data), array[0], array[1], array[2]); } else { g_warning("Indicator Item property '%s' unknown", prop); } -- cgit v1.2.3 From 05e4b574ec953bd6b509f0b623de0cf520ce1598 Mon Sep 17 00:00:00 2001 From: karl-qdh Date: Tue, 15 Mar 2011 09:55:23 +0000 Subject: Fixed missed build error, caused by sync problems between netbook and laptop. --- src/datetime-service.c | 6 ++---- src/indicator-datetime.c | 7 ++++--- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'src/indicator-datetime.c') diff --git a/src/datetime-service.c b/src/datetime-service.c index 13dc057..62fa435 100644 --- a/src/datetime-service.c +++ b/src/datetime-service.c @@ -551,7 +551,7 @@ update_appointment_menu_items (gpointer user_data) GSList *g; GError *gerror = NULL; gint i; - gint width, height; + gint width = 0, height = 0; ESourceList * sources = NULL; if (start_time_appointments > 0) @@ -621,9 +621,7 @@ update_appointment_menu_items (gpointer user_data) } } - gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, &width, &height); - // Sometimes these give negative numbers, sometimes large numbers which look like timestamps - // is there a buffer overwrite causing it? + gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, &width, &height); if (width <= 0) width = 12; if (height <= 0) height = 12; if (width > 30) width = 12; diff --git a/src/indicator-datetime.c b/src/indicator-datetime.c index cf61d25..6f69dac 100644 --- a/src/indicator-datetime.c +++ b/src/indicator-datetime.c @@ -762,7 +762,7 @@ setup_timer (IndicatorDatetime * self, GDateTime * datetime) if (self->priv->show_seconds || (self->priv->time_mode == SETTINGS_TIME_CUSTOM && self->priv->custom_show_seconds)) { - self->priv->timer = g_timeout_add_seconds(1, timer_func, self); + self->priv->timer = g_timeout_add_full(G_PRIORITY_HIGH, 865, timer_func, self, NULL); } else { if (datetime == NULL) { datetime = g_date_time_new_now_local(); @@ -1103,9 +1103,10 @@ indicator_prop_change_cb (DbusmenuMenuitem * mi, gchar * prop, GVariant *value, } else if (!g_strcmp0(prop, CALENDAR_MENUITEM_PROP_CLEAR_MARKS)) { ido_calendar_menu_item_clear_marks (IDO_CALENDAR_MENU_ITEM (mi_data)); } else if (!g_strcmp0(prop, CALENDAR_MENUITEM_PROP_SET_DATE)) { - gint *array = g_variant_get_fixed_array(value, 3, sizeof(gint)); + gsize size = 3; + const gint * array = g_variant_get_fixed_array(value, &size, sizeof(gint)); // TODO: Needs ido branch merged - lp:~karl-qdh/ido/select-activate-set-date - //ido_calendar_menu_item_set_date (IDO_CALENDAR_MENU_ITEM (mi_data), array[0], array[1], array[2]); + ido_calendar_menu_item_set_date (IDO_CALENDAR_MENU_ITEM (mi_data), array[0], array[1], array[2]); } else { g_warning("Indicator Item property '%s' unknown", prop); } -- cgit v1.2.3