From a4f32723bbeaf3ebcc5939b1f39a1f7daf26fe90 Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Thu, 18 Dec 2003 11:06:25 +0000 Subject: make sure we connect to the "changed" signals after setting the initial 2003-12-18 Rodrigo Moya * gui/calendar-component.c (impl_createControls): make sure we connect to the "changed" signals after setting the initial selections on the ESourceSelector. Fixes some nasty warnings because of calendar_control_sensitize_calendar_commands being called with no container yet for the control. svn path=/trunk/; revision=23979 --- calendar/gui/calendar-component.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'calendar/gui/calendar-component.c') diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c index dc2937eb2e..ee1cd283a9 100644 --- a/calendar/gui/calendar-component.c +++ b/calendar/gui/calendar-component.c @@ -566,6 +566,17 @@ impl_createControls (PortableServer_Servant servant, priv->calendar = (GnomeCalendar *) bonobo_control_get_widget (priv->view_control); + statusbar_widget = e_task_bar_new (); + gtk_widget_show (statusbar_widget); + e_activity_handler_attach_task_bar (priv->activity_handler, E_TASK_BAR (statusbar_widget)); + statusbar_control = bonobo_control_new (statusbar_widget); + + /* Load the selection from the last run */ + update_selection (calendar_component); + update_primary_selection (calendar_component); + + /* connect after setting the initial selections, or we'll get unwanted calls + to calendar_control_sensitize_calendar_commands */ g_signal_connect_object (priv->source_selector, "selection_changed", G_CALLBACK (source_selection_changed_cb), G_OBJECT (calendar_component), 0); @@ -576,15 +587,6 @@ impl_createControls (PortableServer_Servant servant, G_CALLBACK (fill_popup_menu_cb), G_OBJECT (calendar_component), 0); - statusbar_widget = e_task_bar_new (); - gtk_widget_show (statusbar_widget); - e_activity_handler_attach_task_bar (priv->activity_handler, E_TASK_BAR (statusbar_widget)); - statusbar_control = bonobo_control_new (statusbar_widget); - - /* Load the selection from the last run */ - update_selection (calendar_component); - update_primary_selection (calendar_component); - /* If it gets fiddled with update */ not = calendar_config_add_notification_calendars_selected (config_selection_changed_cb, calendar_component); -- cgit