From 15376b6657c77d4f701367c4f14bed653201fe26 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 10 Aug 2011 15:58:39 -0400 Subject: EConfig: Broadcast abort/commit events by way of signals. Remove the clumsy abortfunc and commitfunc callback arguments from e_config_add_items(). --- modules/addressbook/addressbook-config.c | 9 ++++++--- modules/addressbook/autocompletion-config.c | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'modules/addressbook') diff --git a/modules/addressbook/addressbook-config.c b/modules/addressbook/addressbook-config.c index 3686fa60bd..a41651459a 100644 --- a/modules/addressbook/addressbook-config.c +++ b/modules/addressbook/addressbook-config.c @@ -1076,9 +1076,9 @@ static EConfigItem eabc_new_items[] = { }; static void -eabc_commit (EConfig *ec, GSList *items, gpointer data) +eabc_commit (EConfig *ec, + AddressbookSourceDialog *sdialog) { - AddressbookSourceDialog *sdialog = data; xmlNodePtr xml; #if d(!)0 gchar *txt; @@ -1262,8 +1262,11 @@ addressbook_config_edit_source (GtkWidget *parent, ESource *source) items = g_slist_prepend (items, &eabc_items[i]); } - e_config_add_items ((EConfig *) ec, items, eabc_commit, NULL, eabc_free, sdialog); + e_config_add_items ((EConfig *) ec, items, eabc_free, sdialog); e_config_add_page_check ((EConfig *) ec, NULL, eabc_check_complete, sdialog); + g_signal_connect ( + ec, "commit", + G_CALLBACK (eabc_commit), sdialog); target = eab_config_target_new_source (ec, sdialog->source); e_config_set_target ((EConfig *) ec, (EConfigTarget *) target); diff --git a/modules/addressbook/autocompletion-config.c b/modules/addressbook/autocompletion-config.c index c78b958022..d4124193a6 100644 --- a/modules/addressbook/autocompletion-config.c +++ b/modules/addressbook/autocompletion-config.c @@ -265,7 +265,7 @@ autocompletion_config_new (EPreferencesWindow *window) l = NULL; for (ii = 0; ii < G_N_ELEMENTS (acc_items); ii++) l = g_slist_prepend (l, &acc_items[ii]); - e_config_add_items ((EConfig *) eab, l, NULL, NULL, acc_free, shell); + e_config_add_items ((EConfig *) eab, l, acc_free, shell); gconf = gconf_client_get_default (); -- cgit