diff options
author | karl-qdh <karl@qdh.org.uk> | 2011-03-08 13:18:50 +0000 |
---|---|---|
committer | karl-qdh <karl@qdh.org.uk> | 2011-03-08 13:18:50 +0000 |
commit | 3bd841330e0299c54031218e3fc20f911ba7e952 (patch) | |
tree | b7203cae26a1e2cfc6f7c0fe1d7e0ccc3cf3bece /src/datetime-service.c | |
parent | 7823baf6ae4d84d7796bd003f2c3f0bb0122d126 (diff) | |
download | ayatana-indicator-datetime-3bd841330e0299c54031218e3fc20f911ba7e952.tar.gz ayatana-indicator-datetime-3bd841330e0299c54031218e3fc20f911ba7e952.tar.bz2 ayatana-indicator-datetime-3bd841330e0299c54031218e3fc20f911ba7e952.zip |
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.
Diffstat (limited to 'src/datetime-service.c')
-rw-r--r-- | src/datetime-service.c | 15 |
1 files changed, 10 insertions, 5 deletions
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; } |