diff options
author | Milan Crha <mcrha@redhat.com> | 2009-10-16 02:15:31 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2009-10-16 02:15:31 +0800 |
commit | 79242432b23fe7def50b7119e61d8570a3558c1c (patch) | |
tree | a5beef0f9fcdf7cdb0a457d3714469aec19db707 /calendar | |
parent | c442d00f9325bd84f28ed5965a7b2fc512b9b3b7 (diff) | |
download | gsoc2013-evolution-79242432b23fe7def50b7119e61d8570a3558c1c.tar gsoc2013-evolution-79242432b23fe7def50b7119e61d8570a3558c1c.tar.gz gsoc2013-evolution-79242432b23fe7def50b7119e61d8570a3558c1c.tar.bz2 gsoc2013-evolution-79242432b23fe7def50b7119e61d8570a3558c1c.tar.lz gsoc2013-evolution-79242432b23fe7def50b7119e61d8570a3558c1c.tar.xz gsoc2013-evolution-79242432b23fe7def50b7119e61d8570a3558c1c.tar.zst gsoc2013-evolution-79242432b23fe7def50b7119e61d8570a3558c1c.zip |
Bug #404227 - Over-aggressive appointment editor date check
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/gui/dialogs/event-page.c | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c index 83f783a365..35a4719a77 100644 --- a/calendar/gui/dialogs/event-page.c +++ b/calendar/gui/dialogs/event-page.c @@ -2415,6 +2415,22 @@ times_updated (EventPage *epage, gboolean adjust_end_time) notify_dates_changed (epage, &start_tt, &end_tt); } +static gboolean +safe_to_process_date_changed_signal (GtkWidget *dedit_widget) +{ + EDateEdit *dedit; + GtkWidget *entry; + + g_return_val_if_fail (dedit_widget != NULL, FALSE); + + dedit = E_DATE_EDIT (dedit_widget); + g_return_val_if_fail (dedit != NULL, FALSE); + + entry = e_date_edit_get_entry (dedit); + + return !entry || !GTK_WIDGET_HAS_FOCUS (entry); +} + /* Callback used when the start date widget change. We check that the * start date < end date and we set the "all day event" button as appropriate. */ @@ -2422,6 +2438,9 @@ static void start_date_changed_cb (GtkWidget *dedit, EventPage *epage) { + if (!safe_to_process_date_changed_signal (dedit)) + return; + hour_minute_changed (epage); times_updated (epage, TRUE); } @@ -2433,6 +2452,10 @@ static void end_date_changed_cb (GtkWidget *dedit, EventPage *epage) { + if (!safe_to_process_date_changed_signal (dedit)) { + return; + } + times_updated (epage, FALSE); } @@ -2771,9 +2794,9 @@ init_widgets (EventPage *epage) e_buffer_tagger_connect (GTK_TEXT_VIEW (priv->description)); /* Start and end times */ - g_signal_connect((priv->start_time), "changed", + g_signal_connect (priv->start_time, "changed", G_CALLBACK (start_date_changed_cb), epage); - g_signal_connect((priv->end_time), "changed", + g_signal_connect (priv->end_time, "changed", G_CALLBACK (end_date_changed_cb), epage); /* Categories */ |