From ed81260ccf822b7f60497dfe8fde6eedbfdc2ae0 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 31 Aug 2012 13:13:22 +0200 Subject: Bug #682678 - Entering the end date for a recurring event is very difficult --- calendar/gui/dialogs/comp-editor.c | 17 ++++++++++------- calendar/gui/dialogs/recurrence-page.c | 6 +++++- 2 files changed, 15 insertions(+), 8 deletions(-) (limited to 'calendar/gui') diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index 31fdf6f6b3..78505c2428 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -2626,14 +2626,17 @@ comp_editor_set_changed (CompEditor *editor, g_return_if_fail (IS_COMP_EDITOR (editor)); - if ((editor->priv->changed ? 1 : 0) == (changed ? 1 : 0)) - return; - - editor->priv->changed = changed; + /* always process below changes, because other parts of + the editor listen for 'changed' notifications to update + its widgets, thus do it even the value actually didn't change + */ + if ((editor->priv->changed ? 1 : 0) != (changed ? 1 : 0)) { + editor->priv->changed = changed; - action = comp_editor_get_action (editor, "save"); - g_return_if_fail (action != NULL); - gtk_action_set_sensitive (action, changed); + action = comp_editor_get_action (editor, "save"); + g_return_if_fail (action != NULL); + gtk_action_set_sensitive (action, changed); + } show_warning = changed && !editor->priv->warned && diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c index e5e3144fdd..64bbb946c5 100644 --- a/calendar/gui/dialogs/recurrence-page.c +++ b/calendar/gui/dialogs/recurrence-page.c @@ -1000,6 +1000,10 @@ fill_component (RecurrencePage *rpage, if (!ok) e_date_edit_set_date (E_DATE_EDIT (priv->ending_date_edit), dtstart.value->year, dtstart.value->month, dtstart.value->day); + else { + /* to have the date shown in "normalized" format */ + e_date_edit_set_date (E_DATE_EDIT (priv->ending_date_edit), tt.year, tt.month, tt.day); + } } e_cal_component_free_datetime (&dtstart); @@ -1465,7 +1469,7 @@ make_ending_until_special (RecurrencePage *rpage) } g_signal_connect_swapped ( - de, "changed", + e_date_edit_get_entry (de), "focus-out-event", G_CALLBACK (comp_editor_page_changed), rpage); /* Make sure the EDateEdit widget uses our timezones to get the -- cgit