diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-08-11 03:58:39 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-09-14 20:08:48 +0800 |
commit | 911d9f8c6b947d8ac922489fc03b1d063b377973 (patch) | |
tree | 9d5a080bed88e0601e2eec57f9e2073a6f231c26 /mail | |
parent | bae19960b300c3f39ca093f51576621aacbbc84f (diff) | |
download | gsoc2013-evolution-911d9f8c6b947d8ac922489fc03b1d063b377973.tar gsoc2013-evolution-911d9f8c6b947d8ac922489fc03b1d063b377973.tar.gz gsoc2013-evolution-911d9f8c6b947d8ac922489fc03b1d063b377973.tar.bz2 gsoc2013-evolution-911d9f8c6b947d8ac922489fc03b1d063b377973.tar.lz gsoc2013-evolution-911d9f8c6b947d8ac922489fc03b1d063b377973.tar.xz gsoc2013-evolution-911d9f8c6b947d8ac922489fc03b1d063b377973.tar.zst gsoc2013-evolution-911d9f8c6b947d8ac922489fc03b1d063b377973.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')
-rw-r--r-- | mail/em-account-editor.c | 15 | ||||
-rw-r--r-- | mail/em-folder-properties.c | 2 |
2 files changed, 11 insertions, 6 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); diff --git a/mail/em-folder-properties.c b/mail/em-folder-properties.c index ff9d0d991d..059ce867d7 100644 --- a/mail/em-folder-properties.c +++ b/mail/em-folder-properties.c @@ -335,7 +335,7 @@ emfp_dialog_run (AsyncContext *context) l = NULL; for (i = 0; i < G_N_ELEMENTS (emfp_items); i++) l = g_slist_prepend (l, &emfp_items[i]); - e_config_add_items ((EConfig *) ec, l, NULL, NULL, emfp_free, context); + e_config_add_items ((EConfig *) ec, l, emfp_free, context); target = em_config_target_new_folder (ec, context->folder); |