aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog6
-rw-r--r--calendar/gui/goto.c10
2 files changed, 16 insertions, 0 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 3352c94628..61e04eee68 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,9 @@
+2003-11-11 Bolian Yin <bolian.yin@sun.com>
+
+ Fixes #50808
+
+ * gui/goto.c (goto_dialog): set initial selection to current day.
+
2003-11-11 JP Rosevear <jpr@ximian.com>
* gui/calendar-offline-handler.c (backend_cal_opened_offline): use
diff --git a/calendar/gui/goto.c b/calendar/gui/goto.c
index 4bff9addca..83405ddc96 100644
--- a/calendar/gui/goto.c
+++ b/calendar/gui/goto.c
@@ -241,6 +241,16 @@ goto_dialog (GnomeCalendar *gcal)
gtk_window_set_transient_for (GTK_WINDOW (dlg->dialog),
GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gcal))));
+ /* set initial selection to current day */
+
+ dlg->ecal->calitem->selection_set = TRUE;
+ dlg->ecal->calitem->selection_start_month_offset = 0;
+ dlg->ecal->calitem->selection_start_day = tt.day;
+ dlg->ecal->calitem->selection_end_month_offset = 0;
+ dlg->ecal->calitem->selection_end_day = tt.day;
+
+ gnome_canvas_item_grab_focus (GNOME_CANVAS_ITEM (dlg->ecal->calitem));
+
b = gtk_dialog_run (GTK_DIALOG (dlg->dialog));
gtk_widget_destroy (dlg->dialog);