From be53f12e69044dc6de3f8b1325692a11f5f1a23a Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Thu, 18 Dec 2003 16:37:52 +0000 Subject: make sure we connect to the "changed" signals after setting the initial 2003-12-18 Rodrigo Moya * gui/tasks-component.c (impl_createControls): * 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=23981 --- calendar/gui/tasks-component.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'calendar/gui/tasks-component.c') diff --git a/calendar/gui/tasks-component.c b/calendar/gui/tasks-component.c index f12e1a6078..619f753906 100644 --- a/calendar/gui/tasks-component.c +++ b/calendar/gui/tasks-component.c @@ -527,6 +527,13 @@ impl_createControls (PortableServer_Servant servant, priv->tasks = (ETasks *) bonobo_control_get_widget (priv->view_control); + + /* Load the selection from the last run */ + update_selection (component); + update_primary_selection (component); + + /* connect after setting the initial selections, or we'll get unwanted calls + to tasks_control_sensitize_commands */ g_signal_connect_object (priv->source_selector, "selection_changed", G_CALLBACK (source_selection_changed_cb), G_OBJECT (component), 0); @@ -537,10 +544,6 @@ impl_createControls (PortableServer_Servant servant, G_CALLBACK (fill_popup_menu_cb), G_OBJECT (component), 0); - /* Load the selection from the last run */ - update_selection (component); - update_primary_selection (component); - /* If it gets fiddled with update */ not = calendar_config_add_notification_tasks_selected (config_selection_changed_cb, component); -- cgit v1.2.3