From cdf13963033711cd14d01e1a47958f861f6ff21d Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 30 Mar 2011 14:49:07 -0500 Subject: Disable the appointments on date or month change to make it show that they're being updated and aren't currently valid --- src/datetime-service.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/datetime-service.c b/src/datetime-service.c index 85139ed..91e9d81 100644 --- a/src/datetime-service.c +++ b/src/datetime-service.c @@ -293,6 +293,13 @@ 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); + + GList * appointment; + for (appointment = appointments; appointment != NULL; appointment = g_list_next(appointment)) { + DbusmenuMenuitem * mi = DBUSMENU_MENUITEM(appointment->data); + dbusmenu_menuitem_property_set_bool(mi, DBUSMENU_MENUITEM_PROP_ENABLED, FALSE); + } + g_idle_add(update_appointment_menu_items_idle, NULL); return TRUE; } @@ -322,6 +329,12 @@ day_selected_cb (DbusmenuMenuitem * menuitem, gchar *name, GVariant *variant, gu } } + GList * appointment; + for (appointment = appointments; appointment != NULL; appointment = g_list_next(appointment)) { + DbusmenuMenuitem * mi = DBUSMENU_MENUITEM(appointment->data); + dbusmenu_menuitem_property_set_bool(mi, DBUSMENU_MENUITEM_PROP_ENABLED, FALSE); + } + start_time_appointments = new_time; g_debug("Received day-selected with timestamp: %d -> %s",(int)start_time_appointments, ctime(&start_time_appointments)); -- cgit v1.2.3