From a38d76bc2e91964b73ffac3efcb043db54bf2189 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Fri, 8 Sep 2000 06:39:05 +0000 Subject: Fall equinox cleanup! 2000-09-08 Federico Mena Quintero Fall equinox cleanup! OK, I know the equinox is not here yet, but weather has changed enough to warrant it. Sigh. This place is definitely not the tropics. * gui/gnome-cal.c (obj_updated_cb): Renamed from gnome_calendar_object_updated_cb(); fixed prototype. (obj_removed_cb): Renamed from gnome_calendar_object_removed_cb(); fixed prototype. (GnomeCalendarPrivate): Moved all the GnomeCalendar fields to a private structure so I don't have to rebuild the whole calendar GUI directory every time something changes in the object. (GnomeCalendarPrivate): Removed the property bag and the control fields; they are local to the control-factory now. (gnome_calendar_update_view_buttons): Remove the ignore_view_button_clicks mess and just block the signal. (gnome_calendar_set_view): Added a "focus" argument to indicate whether we want the main widget in the specified view to grab the focus. (gnome_calendar_set_view_internal): Handle the focus argument here. (gnome_calendar_set_view_buttons): Temporary hack to notify the calendar about its buttons. (gnome_calendar_get_selected_time_range): New function. (gnome_calendar_get_cal_client): New function. * gui/control-factory.c (calendar_properties_init): Keep the property bag local to here; it does not need to be in the calendar object yet. (control_factory_fn): Renamed from control_factory(). Just use control_factory_new_control(). (control_factory_new_control): Moved the stuff over from create_control(), and keep the control local to here. Check the return value of bonobo_control_new(). * gui/calendar-commands.c (show_day_view_clicked): Remove the ignore_view_button_clicks mess. (new_calendar): Removed the useless "page" argument. (calendar_control_activate): Use gnome_calendar_set_view_buttons() for now. svn path=/trunk/; revision=5255 --- calendar/gui/goto.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'calendar/gui/goto.c') diff --git a/calendar/gui/goto.c b/calendar/gui/goto.c index d6c69016a1..07e75e5d3d 100644 --- a/calendar/gui/goto.c +++ b/calendar/gui/goto.c @@ -113,6 +113,7 @@ month_toggled (GtkToggleButton *toggle, gpointer data) static GtkWidget * create_months (int month) { + time_t start_time; GtkWidget *table; GtkWidget *w; GSList *group; @@ -120,7 +121,9 @@ create_months (int month) struct tm tm; char buf[100]; - tm = *localtime (&gnome_calendar->selection_start_time); + gnome_calendar_get_selected_time_range (gnome_calendar, &start_time, NULL); + + tm = *localtime (&start_time); table = gtk_table_new (2, 6, TRUE); @@ -250,6 +253,7 @@ goto_today (GtkWidget *widget, gpointer data) void goto_dialog (GnomeCalendar *gcal) { + time_t start_time; GtkWidget *vbox; GtkWidget *hbox; GtkWidget *w; @@ -259,7 +263,9 @@ goto_dialog (GnomeCalendar *gcal) gnome_calendar = gcal; current_index = -1; - tm = *localtime (&gnome_calendar->selection_start_time); + gnome_calendar_get_selected_time_range (gnome_calendar, &start_time, NULL); + + tm = *localtime (&start_time); goto_win = gnome_dialog_new (_("Go to date"), GNOME_STOCK_BUTTON_CANCEL, -- cgit