From 46dd4414b9aae78bd569810238fa5106307a83eb Mon Sep 17 00:00:00 2001 From: Damon Chaplin Date: Tue, 23 Oct 2001 21:38:27 +0000 Subject: clear the struct tm fields to keep purify happy. 2001-10-23 Damon Chaplin * e-dateedit.c (e_date_edit_check_date_changed): (e_date_edit_check_time_changed): clear the struct tm fields to keep purify happy. svn path=/trunk/; revision=13959 --- widgets/misc/ChangeLog | 6 ++++++ widgets/misc/e-dateedit.c | 11 +++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index 3766e0e45f..2f061b66f1 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,9 @@ +2001-10-23 Damon Chaplin + + * e-dateedit.c (e_date_edit_check_date_changed): + (e_date_edit_check_time_changed): clear the struct tm fields to keep + purify happy. + 2001-10-22 Damon Chaplin * e-cell-date-edit.c (e_cell_date_edit_set_popup_values): diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c index 86cee024e2..ccc605980a 100644 --- a/widgets/misc/e-dateedit.c +++ b/widgets/misc/e-dateedit.c @@ -1685,10 +1685,14 @@ e_date_edit_check_date_changed (EDateEdit *dedit) priv = dedit->priv; + tmp_tm.tm_year = 0; + tmp_tm.tm_mon = 0; + tmp_tm.tm_mday = 0; + date_text = gtk_entry_get_text (GTK_ENTRY (priv->date_entry)); - if (field_set_to_none (date_text)) + if (field_set_to_none (date_text)) { none = TRUE; - else if (!e_date_edit_parse_date (dedit, date_text, &tmp_tm)) { + } else if (!e_date_edit_parse_date (dedit, date_text, &tmp_tm)) { valid = FALSE; tmp_tm.tm_year = 0; tmp_tm.tm_mon = 0; @@ -1719,6 +1723,9 @@ e_date_edit_check_time_changed (EDateEdit *dedit) priv = dedit->priv; + tmp_tm.tm_hour = 0; + tmp_tm.tm_min = 0; + time_text = gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (priv->time_combo)->entry)); if (field_set_to_none (time_text)) none = TRUE; -- cgit