From a1f5f7ee6c95e51a046c8a0e95e385efd0c6eb90 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Thu, 20 Sep 2001 19:35:08 +0000 Subject: [PATCH] Use the current day, as well as the current month and year. Thu Sep 20 15:31:35 2001 Owen Taylor * gtk/gtkcalendar.c (gtk_calendar_init): Use the current day, as well as the current month and year. --- ChangeLog | 5 +++++ ChangeLog.pre-2-0 | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-2 | 5 +++++ ChangeLog.pre-2-4 | 5 +++++ ChangeLog.pre-2-6 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ docs/Changes-2.0.txt | 3 +++ gtk/gtkcalendar.c | 2 +- 9 files changed, 39 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 23a0947cb5..b8f4b4d3e1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Sep 20 15:31:35 2001 Owen Taylor + + * gtk/gtkcalendar.c (gtk_calendar_init): Use the current + day, as well as the current month and year. + Thu Sep 20 15:10:30 2001 Owen Taylor * gtk/gtkdialog.c (gtk_dialog_init): Automatically set diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 23a0947cb5..b8f4b4d3e1 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,8 @@ +Thu Sep 20 15:31:35 2001 Owen Taylor + + * gtk/gtkcalendar.c (gtk_calendar_init): Use the current + day, as well as the current month and year. + Thu Sep 20 15:10:30 2001 Owen Taylor * gtk/gtkdialog.c (gtk_dialog_init): Automatically set diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 23a0947cb5..b8f4b4d3e1 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +Thu Sep 20 15:31:35 2001 Owen Taylor + + * gtk/gtkcalendar.c (gtk_calendar_init): Use the current + day, as well as the current month and year. + Thu Sep 20 15:10:30 2001 Owen Taylor * gtk/gtkdialog.c (gtk_dialog_init): Automatically set diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 23a0947cb5..b8f4b4d3e1 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,8 @@ +Thu Sep 20 15:31:35 2001 Owen Taylor + + * gtk/gtkcalendar.c (gtk_calendar_init): Use the current + day, as well as the current month and year. + Thu Sep 20 15:10:30 2001 Owen Taylor * gtk/gtkdialog.c (gtk_dialog_init): Automatically set diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 23a0947cb5..b8f4b4d3e1 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,8 @@ +Thu Sep 20 15:31:35 2001 Owen Taylor + + * gtk/gtkcalendar.c (gtk_calendar_init): Use the current + day, as well as the current month and year. + Thu Sep 20 15:10:30 2001 Owen Taylor * gtk/gtkdialog.c (gtk_dialog_init): Automatically set diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 23a0947cb5..b8f4b4d3e1 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +Thu Sep 20 15:31:35 2001 Owen Taylor + + * gtk/gtkcalendar.c (gtk_calendar_init): Use the current + day, as well as the current month and year. + Thu Sep 20 15:10:30 2001 Owen Taylor * gtk/gtkdialog.c (gtk_dialog_init): Automatically set diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 23a0947cb5..b8f4b4d3e1 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +Thu Sep 20 15:31:35 2001 Owen Taylor + + * gtk/gtkcalendar.c (gtk_calendar_init): Use the current + day, as well as the current month and year. + Thu Sep 20 15:10:30 2001 Owen Taylor * gtk/gtkdialog.c (gtk_dialog_init): Automatically set diff --git a/docs/Changes-2.0.txt b/docs/Changes-2.0.txt index be699e877b..adf01fb299 100644 --- a/docs/Changes-2.0.txt +++ b/docs/Changes-2.0.txt @@ -491,3 +491,6 @@ Incompatible Changes from GTK+-1.2 to GTK+-2.0: ancestor with a colormap set on it explicitely, or if that fails, the default colormap. +* The default selected day for GtkCalendar is now the current day in the + month, not the first day in the month. The current month and year + were already used. diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c index bd4cb35f57..0f31cb3504 100644 --- a/gtk/gtkcalendar.c +++ b/gtk/gtkcalendar.c @@ -447,7 +447,7 @@ gtk_calendar_init (GtkCalendar *calendar) for (i=0;i<31;i++) calendar->marked_date[i] = FALSE; calendar->num_marked_dates = 0; - calendar->selected_day = 1; + calendar->selected_day = tm->tm_mday; calendar->display_flags = ( GTK_CALENDAR_SHOW_HEADING | GTK_CALENDAR_SHOW_DAY_NAMES );