diff options
author | Federico Mena Quintero <federico@nuclecu.unam.mx> | 1999-01-14 09:54:00 +0800 |
---|---|---|
committer | Arturo Espinosa <unammx@src.gnome.org> | 1999-01-14 09:54:00 +0800 |
commit | cf406da466a9a74f274a78a3f87eb376082daa62 (patch) | |
tree | bd6b7c6479587fad63eccade7f94b41ba02ee005 | |
parent | 7f50a3cf209b72145e36459c9658ec1c95889a93 (diff) | |
download | gsoc2013-evolution-cf406da466a9a74f274a78a3f87eb376082daa62.tar gsoc2013-evolution-cf406da466a9a74f274a78a3f87eb376082daa62.tar.gz gsoc2013-evolution-cf406da466a9a74f274a78a3f87eb376082daa62.tar.bz2 gsoc2013-evolution-cf406da466a9a74f274a78a3f87eb376082daa62.tar.lz gsoc2013-evolution-cf406da466a9a74f274a78a3f87eb376082daa62.tar.xz gsoc2013-evolution-cf406da466a9a74f274a78a3f87eb376082daa62.tar.zst gsoc2013-evolution-cf406da466a9a74f274a78a3f87eb376082daa62.zip |
Make the little calendar start up with the correct date.
1999-01-13 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gncal-day-panel.c (gncal_day_panel_new): Make the little
calendar start up with the correct date.
svn path=/trunk/; revision=605
-rw-r--r-- | calendar/ChangeLog | 3 | ||||
-rw-r--r-- | calendar/gncal-day-panel.c | 8 | ||||
-rw-r--r-- | calendar/gui/gncal-day-panel.c | 8 |
3 files changed, 17 insertions, 2 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 3f5897077c..2127733ae3 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,5 +1,8 @@ 1999-01-13 Federico Mena Quintero <federico@nuclecu.unam.mx> + * gncal-day-panel.c (gncal_day_panel_new): Make the little + calendar start up with the correct date. + * gncal-week-view.c (gncal_week_view_set): Add the month to the date range display label. diff --git a/calendar/gncal-day-panel.c b/calendar/gncal-day-panel.c index 422c755371..0c69026278 100644 --- a/calendar/gncal-day-panel.c +++ b/calendar/gncal-day-panel.c @@ -92,6 +92,7 @@ gncal_day_panel_new (GnomeCalendar *calendar, time_t start_of_day) { GncalDayPanel *dpanel; GtkWidget *w; + struct tm *tm; g_return_val_if_fail (calendar != NULL, NULL); @@ -144,11 +145,16 @@ gncal_day_panel_new (GnomeCalendar *calendar, time_t start_of_day) /* Gtk calendar */ + tm = localtime (&start_of_day); + w = gtk_calendar_new (); dpanel->gtk_calendar = GTK_CALENDAR (w); gtk_calendar_display_options (dpanel->gtk_calendar, GTK_CALENDAR_SHOW_HEADING | GTK_CALENDAR_SHOW_DAY_NAMES); - dpanel->day_selected_id = gtk_signal_connect (GTK_OBJECT (dpanel->gtk_calendar), "day_selected_double_click", + gtk_calendar_select_month (dpanel->gtk_calendar, tm->tm_mon, tm->tm_year + 1900); + gtk_calendar_select_day (dpanel->gtk_calendar, tm->tm_mday); + dpanel->day_selected_id = gtk_signal_connect (GTK_OBJECT (dpanel->gtk_calendar), + "day_selected_double_click", (GtkSignalFunc) calendar_day_selected, dpanel); gtk_signal_connect (GTK_OBJECT (dpanel->gtk_calendar), "month_changed", diff --git a/calendar/gui/gncal-day-panel.c b/calendar/gui/gncal-day-panel.c index 422c755371..0c69026278 100644 --- a/calendar/gui/gncal-day-panel.c +++ b/calendar/gui/gncal-day-panel.c @@ -92,6 +92,7 @@ gncal_day_panel_new (GnomeCalendar *calendar, time_t start_of_day) { GncalDayPanel *dpanel; GtkWidget *w; + struct tm *tm; g_return_val_if_fail (calendar != NULL, NULL); @@ -144,11 +145,16 @@ gncal_day_panel_new (GnomeCalendar *calendar, time_t start_of_day) /* Gtk calendar */ + tm = localtime (&start_of_day); + w = gtk_calendar_new (); dpanel->gtk_calendar = GTK_CALENDAR (w); gtk_calendar_display_options (dpanel->gtk_calendar, GTK_CALENDAR_SHOW_HEADING | GTK_CALENDAR_SHOW_DAY_NAMES); - dpanel->day_selected_id = gtk_signal_connect (GTK_OBJECT (dpanel->gtk_calendar), "day_selected_double_click", + gtk_calendar_select_month (dpanel->gtk_calendar, tm->tm_mon, tm->tm_year + 1900); + gtk_calendar_select_day (dpanel->gtk_calendar, tm->tm_mday); + dpanel->day_selected_id = gtk_signal_connect (GTK_OBJECT (dpanel->gtk_calendar), + "day_selected_double_click", (GtkSignalFunc) calendar_day_selected, dpanel); gtk_signal_connect (GTK_OBJECT (dpanel->gtk_calendar), "month_changed", |