From 4643fbc3e75d5789500198938395de4def9a3ec0 Mon Sep 17 00:00:00 2001 From: Glynn Foster Date: Fri, 7 Jan 2005 01:55:11 +0000 Subject: Pre-load the year, because gtk_calendar* is dumb and you need to select 2005-01-07 Glynn Foster * src/option.c: Pre-load the year, because gtk_calendar* is dumb and you need to select the year to change the month. Fixes #162297. --- ChangeLog | 6 ++++++ src/option.c | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 37248927..fad929fa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-01-07 Glynn Foster + + * src/option.c: Pre-load the year, because gtk_calendar* is + dumb and you need to select the year to change the month. Fixes + #162297. + 2004-12-21 Glynn Foster * configure.in: Post bump release. diff --git a/src/option.c b/src/option.c index 0b892973..f6fe4b26 100644 --- a/src/option.c +++ b/src/option.c @@ -23,6 +23,7 @@ */ #include "option.h" +#include /* General Options */ gchar *zenity_general_dialog_title; @@ -713,11 +714,17 @@ zenity_calendar_pre_callback (GOptionContext *context, gpointer data, GError **error) { + struct tm *t; + time_t current_time; + + time (¤t_time); + t = localtime (¤t_time); + zenity_calendar_active = FALSE; zenity_calendar_date_format = NULL; zenity_calendar_day = 0; zenity_calendar_month = 0; - zenity_calendar_year = 0; + zenity_calendar_year = t->tm_year + 1900; return TRUE; } -- cgit