aboutsummaryrefslogtreecommitdiff
path: root/src/datetime-service.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-03-30 11:25:45 -0500
committerTed Gould <ted@gould.cx>2011-03-30 11:25:45 -0500
commit0e435a010c1350df7de029725ba9e721d543ccf5 (patch)
tree6e744489238280e2255c18bb1fd3ee9a025b12c6 /src/datetime-service.c
parent88d10f2b5102676f9498a700ef290b42953664f1 (diff)
downloadayatana-indicator-datetime-0e435a010c1350df7de029725ba9e721d543ccf5.tar.gz
ayatana-indicator-datetime-0e435a010c1350df7de029725ba9e721d543ccf5.tar.bz2
ayatana-indicator-datetime-0e435a010c1350df7de029725ba9e721d543ccf5.zip
Update the appointments in the idle loop so we can get those signals returned promptly!
Diffstat (limited to 'src/datetime-service.c')
-rw-r--r--src/datetime-service.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/datetime-service.c b/src/datetime-service.c
index 6042e94..6820bb9 100644
--- a/src/datetime-service.c
+++ b/src/datetime-service.c
@@ -276,6 +276,13 @@ activate_cb (DbusmenuMenuitem * menuitem, guint timestamp, const gchar *command)
}
static gboolean
+update_appointment_menu_items_idle (gpointer user_data)
+{
+ update_appointment_menu_items(user_data);
+ return FALSE;
+}
+
+static gboolean
month_changed_cb (DbusmenuMenuitem * menuitem, gchar *name, GVariant *variant, guint timestamp)
{
start_time_appointments = (time_t)g_variant_get_uint32(variant);
@@ -286,7 +293,7 @@ month_changed_cb (DbusmenuMenuitem * menuitem, gchar *name, GVariant *variant, g
ones yet and we don't want to confuse the
user. */
dbusmenu_menuitem_property_remove(menuitem, CALENDAR_MENUITEM_PROP_MARKS);
- update_appointment_menu_items(NULL);
+ g_idle_add(update_appointment_menu_items_idle, NULL);
return TRUE;
}
@@ -296,7 +303,7 @@ day_selected_cb (DbusmenuMenuitem * menuitem, gchar *name, GVariant *variant, gu
start_time_appointments = (time_t)g_variant_get_uint32(variant);
g_debug("Received day-selected with timestamp: %d -> %s",(int)start_time_appointments, ctime(&start_time_appointments));
- update_appointment_menu_items(NULL);
+ g_idle_add(update_appointment_menu_items_idle, NULL);
return TRUE;
}