From 55183053303aa5f387f10f1cc02dad6378eda0ce Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Wed, 7 Apr 2004 18:50:59 +0000 Subject: Sync the changes here rather than setting 'changed' on the config control 2004-04-07 Jeffrey Stedfast * gui/component/autocompletion-config.c (source_selection_changed): Sync the changes here rather than setting 'changed' on the config control (since that no longer exists). (autocompletion_config_control_new): Don't connect to an apply signal, no such signal. svn path=/trunk/; revision=25357 --- addressbook/gui/component/autocompletion-config.c | 36 ++++++++--------------- 1 file changed, 13 insertions(+), 23 deletions(-) (limited to 'addressbook/gui/component/autocompletion-config.c') diff --git a/addressbook/gui/component/autocompletion-config.c b/addressbook/gui/component/autocompletion-config.c index db9904ec7a..b61ec72725 100644 --- a/addressbook/gui/component/autocompletion-config.c +++ b/addressbook/gui/component/autocompletion-config.c @@ -50,25 +50,6 @@ typedef struct { static void source_selection_changed (ESourceSelector *selector, AutocompletionConfig *ac) -{ - evolution_config_control_changed (ac->config_control); -} - -static void -config_control_destroy_notify (void *data, - GObject *where_the_config_control_was) -{ - AutocompletionConfig *ac = (AutocompletionConfig *) data; - - g_object_unref (ac->source_list); - - g_free (ac); -} - - -static void -config_control_apply_callback (EvolutionConfigControl *config_control, - AutocompletionConfig *ac) { GSList *selection; GSList *l; @@ -87,7 +68,7 @@ config_control_apply_callback (EvolutionConfigControl *config_control, /* then we loop over the selector's selection, setting the property on those sources */ - selection = e_source_selector_get_selection (E_SOURCE_SELECTOR (ac->control_widget)); + selection = e_source_selector_get_selection (selector); for (l = selection; l; l = l->next) { e_source_set_property (E_SOURCE (l->data), "completion", "true"); } @@ -96,6 +77,17 @@ config_control_apply_callback (EvolutionConfigControl *config_control, e_source_list_sync (ac->source_list, NULL); /* XXX we should pop up a dialog if this fails */ } +static void +config_control_destroy_notify (void *data, + GObject *where_the_config_control_was) +{ + AutocompletionConfig *ac = (AutocompletionConfig *) data; + + g_object_unref (ac->source_list); + + g_free (ac); +} + static void initialize_selection (AutocompletionConfig *ac) { @@ -149,9 +141,7 @@ autocompletion_config_control_new (void) g_signal_connect (ac->control_widget, "selection_changed", G_CALLBACK (source_selection_changed), ac); - g_signal_connect (ac->config_control, "apply", - G_CALLBACK (config_control_apply_callback), ac); - + g_object_weak_ref (G_OBJECT (ac->config_control), config_control_destroy_notify, ac); CORBA_exception_free (&ev); -- cgit v1.2.3