diff options
author | karl-qdh <karl@qdh.org.uk> | 2011-03-29 14:23:29 +0100 |
---|---|---|
committer | karl-qdh <karl@qdh.org.uk> | 2011-03-29 14:23:29 +0100 |
commit | 26fddf955899a2751b140a8c5a75f6861509b66e (patch) | |
tree | 793f7fbd33f26814d8386b3d8e2a273da7c3b182 /src/indicator-datetime.c | |
parent | 37128f74bece1fea1d16503593546ce936568ae1 (diff) | |
download | ayatana-indicator-datetime-26fddf955899a2751b140a8c5a75f6861509b66e.tar.gz ayatana-indicator-datetime-26fddf955899a2751b140a8c5a75f6861509b66e.tar.bz2 ayatana-indicator-datetime-26fddf955899a2751b140a8c5a75f6861509b66e.zip |
Adding tedg's suggested change to the property sending, no change in signals being received by the other side.
Diffstat (limited to 'src/indicator-datetime.c')
-rw-r--r-- | src/indicator-datetime.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/src/indicator-datetime.c b/src/indicator-datetime.c index b47f1af..71b174c 100644 --- a/src/indicator-datetime.c +++ b/src/indicator-datetime.c @@ -1155,14 +1155,28 @@ calendar_prop_change_cb (DbusmenuMenuitem * mi, gchar * prop, GVariant *value, I { g_debug("Changing calendar property"); if (!g_strcmp0(prop, CALENDAR_MENUITEM_PROP_MARK)) { - ido_calendar_menu_item_mark_day (IDO_CALENDAR_MENU_ITEM (mi_data), g_variant_get_int16(value)); - g_debug("Marked day: %d", g_variant_get_int16(value)); + GVariantIter iter; + GVariant *day; + gchar *key; + + g_variant_iter_init (&iter, value); + while (g_variant_iter_loop (&iter, "{i}", &key, &day)) { + ido_calendar_menu_item_mark_day (IDO_CALENDAR_MENU_ITEM (mi_data), g_variant_get_int32(day)); + g_debug("Marked day: %d", g_variant_get_int32(day)); + } } else if (!g_strcmp0(prop, CALENDAR_MENUITEM_PROP_UNMARK)) { - ido_calendar_menu_item_unmark_day (IDO_CALENDAR_MENU_ITEM (mi_data), g_variant_get_int16(value)); - g_debug("Unmarked day: %d", g_variant_get_int16(value)); + GVariantIter iter; + GVariant *day; + gchar *key; + + g_variant_iter_init (&iter, value); + while (g_variant_iter_loop (&iter, "{i}", &key, &day)) { + ido_calendar_menu_item_unmark_day (IDO_CALENDAR_MENU_ITEM (mi_data), g_variant_get_int32(day)); + g_debug("Unmarked day: %d", g_variant_get_int32(day)); + } } else if (!g_strcmp0(prop, CALENDAR_MENUITEM_PROP_CLEAR_MARKS)) { - g_debug("Cleared Marks"); ido_calendar_menu_item_clear_marks (IDO_CALENDAR_MENU_ITEM (mi_data)); + g_debug("Cleared Marks"); } else if (!g_strcmp0(prop, CALENDAR_MENUITEM_PROP_SET_DATE)) { gsize size = 3; const gint * array = g_variant_get_fixed_array(value, &size, sizeof(gint)); |