diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-08-11 03:58:39 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-08-11 04:13:08 +0800 |
commit | 15376b6657c77d4f701367c4f14bed653201fe26 (patch) | |
tree | acb7081ff7f41653e8684738bf1677ec896721fb /mail/em-account-editor.c | |
parent | 90e4a46478e5c39b51bfd36bc252c10e9cd60865 (diff) | |
download | gsoc2013-evolution-15376b6657c77d4f701367c4f14bed653201fe26.tar.gz gsoc2013-evolution-15376b6657c77d4f701367c4f14bed653201fe26.tar.zst gsoc2013-evolution-15376b6657c77d4f701367c4f14bed653201fe26.zip |
EConfig: Broadcast abort/commit events by way of signals.
Remove the clumsy abortfunc and commitfunc callback arguments from
e_config_add_items().
Diffstat (limited to 'mail/em-account-editor.c')
-rw-r--r-- | mail/em-account-editor.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c index f852441450..5ae0b9ea1f 100644 --- a/mail/em-account-editor.c +++ b/mail/em-account-editor.c @@ -3945,9 +3945,9 @@ forget_password_if_needed (EAccount *original_account, EAccount *modified_accoun } static void -emae_commit (EConfig *ec, GSList *items, gpointer data) +emae_commit (EConfig *ec, + EMAccountEditor *emae) { - EMAccountEditor *emae = data; EAccountList *accounts = e_get_account_list (); EAccount *account; EAccount *modified_account; @@ -3994,7 +3994,7 @@ emae_commit (EConfig *ec, GSList *items, gpointer data) void em_account_editor_commit (EMAccountEditor *emae) { - emae_commit ((EConfig *) emae->config, NULL, emae); + emae_commit (E_CONFIG (emae->config), emae); } static void @@ -4127,11 +4127,16 @@ em_account_editor_construct (EMAccountEditor *emae, } } + /* Connect "after" to let plugins go first. */ + g_signal_connect_after ( + ec, "commit", + G_CALLBACK (emae_commit), emae); + emae->config = priv->config = ec; l = NULL; for (i=0;items[i].path;i++) l = g_slist_prepend (l, &items[i]); - e_config_add_items ((EConfig *) ec, l, emae_commit, NULL, emae_free, emae); + e_config_add_items ((EConfig *) ec, l, emae_free, emae); /* This is kinda yuck, we're dynamically mapping from the 'old style' extensibility api to the new one */ l = NULL; @@ -4174,7 +4179,7 @@ em_account_editor_construct (EMAccountEditor *emae, } } g_hash_table_destroy (have); - e_config_add_items ((EConfig *) ec, l, NULL, NULL, emae_free_auto, emae); + e_config_add_items ((EConfig *) ec, l, emae_free_auto, emae); priv->extra_items = l; e_config_add_page_check ((EConfig *) ec, NULL, emae_check_complete, emae); |