summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGlynn Foster <glynn.foster@sun.com>2005-01-07 01:55:11 +0000
committerGlynn Foster <gman@src.gnome.org>2005-01-07 01:55:11 +0000
commit4643fbc3e75d5789500198938395de4def9a3ec0 (patch)
tree32f087be5266fd6b85c0708057839fe3c65f7bca /src
parent0c8bca0103f5dce5cea83d3a12d45719036521ea (diff)
Pre-load the year, because gtk_calendar* is dumb and you need to select
2005-01-07 Glynn Foster <glynn.foster@sun.com> * 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.
Diffstat (limited to 'src')
-rw-r--r--src/option.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/option.c b/src/option.c
index 0b89297..f6fe4b2 100644
--- a/src/option.c
+++ b/src/option.c
@@ -23,6 +23,7 @@
*/
#include "option.h"
+#include <time.h>
/* 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 (&current_time);
+ t = localtime (&current_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;
}