diff options
author | Michael Terry <mike@mterry.name> | 2011-02-25 13:36:03 -0500 |
---|---|---|
committer | Michael Terry <mike@mterry.name> | 2011-02-25 13:36:03 -0500 |
commit | 938ba5dcc001f0f68e4c147fdf64817a2b9e91b0 (patch) | |
tree | 861f021b29a5d86e4f3cbda25ee8205d0cdeee45 | |
parent | 6d8cd56957cbd5123748085448b1b340bf8c4d1c (diff) | |
parent | d0e5a69a026bc879759cde57f8ba324c67b6b37a (diff) | |
download | ayatana-indicator-datetime-938ba5dcc001f0f68e4c147fdf64817a2b9e91b0.tar.gz ayatana-indicator-datetime-938ba5dcc001f0f68e4c147fdf64817a2b9e91b0.tar.bz2 ayatana-indicator-datetime-938ba5dcc001f0f68e4c147fdf64817a2b9e91b0.zip |
add in some fixes from karl's branch
-rw-r--r-- | src/datetime-service.c | 7 | ||||
-rw-r--r-- | src/indicator-datetime.c | 5 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/datetime-service.c b/src/datetime-service.c index d3cfafb..6303a98 100644 --- a/src/datetime-service.c +++ b/src/datetime-service.c @@ -222,6 +222,7 @@ update_current_timezone (void) { check_timezone_sync(); + if (error != NULL) g_error_free(error); return; } @@ -303,9 +304,9 @@ check_for_calendar (gpointer user_data) g_signal_connect(G_OBJECT(add_appointment), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(activate_cb), "evolution -c calendar"); dbusmenu_menuitem_child_add_position (root, add_appointment, 3); - // Update the calendar items every 30 minutes if it updates the first time + // Update the calendar items every 5 minutes if it updates the first time if (update_appointment_menu_items(NULL)) - g_timeout_add_seconds(60*30, update_appointment_menu_items, NULL); + g_timeout_add_seconds(60*5, update_appointment_menu_items, NULL); // Connect to event::month-changed g_signal_connect(calendar, "event::month-changed", G_CALLBACK(month_changed_cb), NULL); @@ -671,6 +672,8 @@ update_appointment_menu_items (gpointer user_data) { if (i == 4) break; // See above FIXME regarding query result limit i++; } + + if (gerror != NULL) g_error_free(gerror); g_object_unref(allobjects); g_debug("End of objects"); return TRUE; diff --git a/src/indicator-datetime.c b/src/indicator-datetime.c index 54e029e..2099929 100644 --- a/src/indicator-datetime.c +++ b/src/indicator-datetime.c @@ -1186,11 +1186,12 @@ month_changed_cb (IdoCalendarMenuItem *ido, { 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(ido), "event::month-changed", variant, timestamp); + dbusmenu_menuitem_handle_event(DBUSMENU_MENUITEM(item), "event::month-changed", variant, timestamp); g_debug("Got month changed signal: %s", datestring); } @@ -1217,7 +1218,7 @@ new_calendar_item (DbusmenuMenuitem * newitem, self->priv->ido_calendar = ido; dbusmenu_gtkclient_newitem_base(DBUSMENU_GTKCLIENT(client), newitem, GTK_MENU_ITEM(ido), parent); - g_signal_connect(ido, "month-changed", G_CALLBACK(month_changed_cb), NULL); + g_signal_connect_after(ido, "month-changed", G_CALLBACK(month_changed_cb), (gpointer)newitem); return TRUE; } |