aboutsummaryrefslogtreecommitdiffstats
path: root/filter/filter-datespec.c
diff options
context:
space:
mode:
authorPeter Williams <peterw@ximian.com>2002-08-02 01:08:55 +0800
committerPeter Williams <peterw@src.gnome.org>2002-08-02 01:08:55 +0800
commit0598c3fb26ddfc0be4d212776bb2875e76e7c111 (patch)
tree6ec06861eebbb741d4d32ae916cf03d1939f921f /filter/filter-datespec.c
parentc89f5e6986b6f4ea6d5ee5104e0b052e6916d081 (diff)
downloadgsoc2013-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
Diffstat (limited to 'filter/filter-datespec.c')
-rw-r--r--filter/filter-datespec.c22
1 files changed, 11 insertions, 11 deletions
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,