diff options
author | Ted Gould <ted@gould.cx> | 2011-03-30 14:49:07 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2011-03-30 14:49:07 -0500 |
commit | cdf13963033711cd14d01e1a47958f861f6ff21d (patch) | |
tree | d90def008132813b1f3f1993ddba2ec5811ba88a | |
parent | 49ffaa6c41cee3855f5101cdbe0220e225f59ac0 (diff) | |
download | ayatana-indicator-datetime-cdf13963033711cd14d01e1a47958f861f6ff21d.tar.gz ayatana-indicator-datetime-cdf13963033711cd14d01e1a47958f861f6ff21d.tar.bz2 ayatana-indicator-datetime-cdf13963033711cd14d01e1a47958f861f6ff21d.zip |
Disable the appointments on date or month change to make it show that they're being updated and aren't currently valid
-rw-r--r-- | src/datetime-service.c | 13 |
1 files changed, 13 insertions, 0 deletions
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)); |