From 68f8ea5429fed536060ccfe0ccba459b5bce709c Mon Sep 17 00:00:00 2001 From: Damon Chaplin Date: Mon, 10 Dec 2001 19:24:42 +0000 Subject: removed code that connects to GnomeCalendar's "dates_shown_changed" 2001-12-10 Damon Chaplin * gui/control-factory.c (control_factory_new_control): removed code that connects to GnomeCalendar's "dates_shown_changed" signal. * gui/calendar-commands.c (gcal_calendar_dates_change_cb): (calendar_control_activate): moved it here, so it gets reconnected whenever the control is activated. Fixes bug #15798. svn path=/trunk/; revision=14960 --- calendar/ChangeLog | 9 +++++++++ calendar/gui/calendar-commands.c | 15 +++++++++++++++ calendar/gui/control-factory.c | 10 ---------- 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index a78e78ab94..6c95710d2e 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,12 @@ +2001-12-10 Damon Chaplin + + * gui/control-factory.c (control_factory_new_control): removed code + that connects to GnomeCalendar's "dates_shown_changed" signal. + + * gui/calendar-commands.c (gcal_calendar_dates_change_cb): + (calendar_control_activate): moved it here, so it gets reconnected + whenever the control is activated. Fixes bug #15798. + 2001-12-10 Damon Chaplin * importers/GNOME_Evolution_Calendar_Importer.oaf.in: fixed executable diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c index 62c123da4a..0b079f8df7 100644 --- a/calendar/gui/calendar-commands.c +++ b/calendar/gui/calendar-commands.c @@ -571,6 +571,18 @@ sensitize_taskpad_commands (GnomeCalendar *gcal, BonoboControl *control, gboolea NULL); } +/* Callback used when the dates shown by the GnomeCalendar are changed. + We want to update the dates in the folder bar. */ +static void +gcal_calendar_dates_change_cb (GnomeCalendar *gcal, gpointer data) +{ + BonoboControl *control; + + control = BONOBO_CONTROL (data); + + calendar_set_folder_bar_label (gcal, control); +} + /* Callback used when the selection in the calendar views changes */ static void gcal_calendar_selection_changed_cb (GnomeCalendar *gcal, gpointer data) @@ -740,6 +752,9 @@ calendar_control_activate (BonoboControl *control, gnome_calendar_setup_view_menus (gcal, uic); + gtk_signal_connect (GTK_OBJECT (gcal), "dates_shown_changed", + GTK_SIGNAL_FUNC (gcal_calendar_dates_change_cb), + control); gtk_signal_connect (GTK_OBJECT (gcal), "calendar_focus_change", GTK_SIGNAL_FUNC (gcal_calendar_focus_change_cb), control); gtk_signal_connect (GTK_OBJECT (gcal), "taskpad_focus_change", diff --git a/calendar/gui/control-factory.c b/calendar/gui/control-factory.c index b2a95d0ba4..f497d633e3 100644 --- a/calendar/gui/control-factory.c +++ b/calendar/gui/control-factory.c @@ -189,13 +189,6 @@ calendar_persist_init (GnomeCalendar *gcal, BonoboControl *control) } #endif -static void -on_calendar_dates_shown_changed (GnomeCalendar *gcal, BonoboControl *control) -{ - calendar_set_folder_bar_label (gcal, control); -} - - BonoboControl * control_factory_new_control (void) { @@ -221,9 +214,6 @@ control_factory_new_control (void) gtk_signal_connect (GTK_OBJECT (control), "activate", GTK_SIGNAL_FUNC (control_activate_cb), gcal); - gtk_signal_connect (GTK_OBJECT (gcal), "dates_shown_changed", - GTK_SIGNAL_FUNC (on_calendar_dates_shown_changed), - control); return control; } -- cgit v1.2.3