[evolution] Bug #682678 - Entering the end date for a recurring event is very difficult



commit ed81260ccf822b7f60497dfe8fde6eedbfdc2ae0
Author: Milan Crha <mcrha redhat com>
Date:   Fri Aug 31 13:13:22 2012 +0200

    Bug #682678 - Entering the end date for a recurring event is very difficult

 calendar/gui/dialogs/comp-editor.c     |   19 +++++++++++--------
 calendar/gui/dialogs/recurrence-page.c |    6 +++++-
 2 files changed, 16 insertions(+), 9 deletions(-)
---
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 31fdf6f..78505c2 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 e5e3144..64bbb94 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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]