diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-08-15 22:42:11 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-08-15 23:56:26 +0800 |
commit | 7b7aee279438d47bb840982e1f526b4c8d912801 (patch) | |
tree | a72c5979bcf15a32c87f7e03100277c2c1eae9f3 | |
parent | 079db2baea7b3a9261e7c8b795608b36ea5261ec (diff) | |
download | gsoc2013-evolution-7b7aee279438d47bb840982e1f526b4c8d912801.tar.gz gsoc2013-evolution-7b7aee279438d47bb840982e1f526b4c8d912801.tar.zst gsoc2013-evolution-7b7aee279438d47bb840982e1f526b4c8d912801.zip |
EMConfigTargetAccount: Add CamelSettings member.
Allows plugins to manipulate a CamelSettings instance directly. The
settings are written back to the URL string (for now) when the user
clicks Apply in the mail account editor.
-rw-r--r-- | mail/em-config.c | 10 | ||||
-rw-r--r-- | mail/em-config.h | 4 |
2 files changed, 12 insertions, 2 deletions
diff --git a/mail/em-config.c b/mail/em-config.c index bad3d92c47..fbde5d5430 100644 --- a/mail/em-config.c +++ b/mail/em-config.c @@ -133,6 +133,8 @@ em_config_target_free (EConfig *ep, g_object_unref (s->original_account); if (s->modified_account != NULL) g_object_unref (s->modified_account); + if (s->settings != NULL) + g_object_unref (s->settings); break; } } @@ -206,7 +208,8 @@ em_config_target_new_prefs (EMConfig *emp, EMConfigTargetAccount * em_config_target_new_account (EMConfig *emp, EAccount *original_account, - EAccount *modified_account) + EAccount *modified_account, + CamelSettings *settings) { EMConfigTargetAccount *t; @@ -223,5 +226,10 @@ em_config_target_new_account (EMConfig *emp, else t->modified_account = NULL; + if (settings != NULL) + t->settings = g_object_ref (settings); + else + t->settings = NULL; + return t; } diff --git a/mail/em-config.h b/mail/em-config.h index 24b062c7f5..0291f2446a 100644 --- a/mail/em-config.h +++ b/mail/em-config.h @@ -65,6 +65,7 @@ struct _EMConfigTargetAccount { EAccount *original_account; EAccount *modified_account; + CamelSettings *settings; }; typedef struct _EConfigItem EMConfigItem; @@ -90,7 +91,8 @@ EMConfigTargetPrefs * EMConfigTargetAccount * em_config_target_new_account (EMConfig *emp, EAccount *original_account, - EAccount *modified_account); + EAccount *modified_account, + CamelSettings *settings); G_END_DECLS |