From 82d5ac92dacbd76fa446f3115866b56da730f0ec Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 25 Feb 2009 10:44:12 +0000 Subject: ** Fix for bug #559027 2009-02-25 Milan Crha ** Fix for bug #559027 * e-dateedit.c: (on_date_entry_focus_out): Do not set date for 'None' value. svn path=/trunk/; revision=37323 --- widgets/misc/ChangeLog | 7 +++++++ widgets/misc/e-dateedit.c | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'widgets/misc') diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index d81e52d0a1..0cd6767fd5 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,10 @@ +2009-02-25 Milan Crha + + ** Fix for bug #559027 + + * e-dateedit.c: (on_date_entry_focus_out): + Do not set date for 'None' value. + 2009-02-12 Milan Crha ** Part of fix for bug #404232 diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c index fabc6aa614..5bb175aad2 100644 --- a/widgets/misc/e-dateedit.c +++ b/widgets/misc/e-dateedit.c @@ -1639,9 +1639,11 @@ on_date_entry_focus_out (GtkEntry *entry, e_date_edit_set_date (dedit,tmp_tm.tm_year,tmp_tm.tm_mon,tmp_tm.tm_mday); gtk_widget_grab_focus (GTK_WIDGET (entry)); return FALSE; - } else { - e_date_edit_get_date (dedit,&tmp_tm.tm_year,&tmp_tm.tm_mon,&tmp_tm.tm_mday); + } else if (e_date_edit_get_date (dedit,&tmp_tm.tm_year,&tmp_tm.tm_mon,&tmp_tm.tm_mday)) { e_date_edit_set_date (dedit,tmp_tm.tm_year,tmp_tm.tm_mon,tmp_tm.tm_mday); + } else { + dedit->priv->date_set_to_none = TRUE; + e_date_edit_update_date_entry (dedit); } return FALSE; } -- cgit