diff options
author | Peter Williams <peterw@ximian.com> | 2002-08-02 01:08:55 +0800 |
---|---|---|
committer | Peter Williams <peterw@src.gnome.org> | 2002-08-02 01:08:55 +0800 |
commit | 0598c3fb26ddfc0be4d212776bb2875e76e7c111 (patch) | |
tree | 6ec06861eebbb741d4d32ae916cf03d1939f921f | |
parent | c89f5e6986b6f4ea6d5ee5104e0b052e6916d081 (diff) | |
download | gsoc2013-evolution-0598c3fb26ddfc0be4d212776bb2875e76e7c111.tar.gz gsoc2013-evolution-0598c3fb26ddfc0be4d212776bb2875e76e7c111.tar.zst gsoc2013-evolution-0598c3fb26ddfc0be4d212776bb2875e76e7c111.zip |
If the value was unset, initialize it to now.
2002-08-01 Peter Williams <peterw@ximian.com>
* filter-datespec.c (activate_specified): If the value was unset,
initialize it to now.
svn path=/trunk/; revision=17670
-rw-r--r-- | filter/ChangeLog | 5 | ||||
-rw-r--r-- | filter/filter-datespec.c | 22 |
2 files changed, 16 insertions, 11 deletions
diff --git a/filter/ChangeLog b/filter/ChangeLog index dde50f03db..72e57bd460 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,8 @@ +2002-08-01 Peter Williams <peterw@ximian.com> + + * filter-datespec.c (activate_specified): If the value was unset, + initialize it to now. + 2002-07-31 Ettore Perazzoli <ettore@ximian.com> * filter-option.c (xml_create): Remove unused variable. diff --git a/filter/filter-datespec.c b/filter/filter-datespec.c index dd8f02614e..ae0683e0f2 100644 --- a/filter/filter-datespec.c +++ b/filter/filter-datespec.c @@ -313,18 +313,18 @@ activate_specified (GtkMenuItem *item, FilterDatespec *fds) PRIV (fds)->selected_type = FDST_SPECIFIED; /* Set the calendar's time */ + + if (fds->value < 1) + fds->value = time (NULL); + + /* gmtime? */ + seltime = localtime (&(fds->value)); - if (fds->value > 0) { - /* gmtime? */ - seltime = localtime (&(fds->value)); - - gtk_calendar_select_month (GTK_CALENDAR (PRIV (fds)->date_chooser), - seltime->tm_mon, - seltime->tm_year + 1900); - gtk_calendar_select_day (GTK_CALENDAR (PRIV (fds)->date_chooser), - seltime->tm_mday); - /* free seltime?? */ - } + gtk_calendar_select_month (GTK_CALENDAR (PRIV (fds)->date_chooser), + seltime->tm_mon, + seltime->tm_year + 1900); + gtk_calendar_select_day (GTK_CALENDAR (PRIV (fds)->date_chooser), + seltime->tm_mday); gtk_box_pack_start (GTK_BOX (PRIV (fds)->gd->vbox), PRIV (fds)->date_chooser, |