[evolution] EMConfigTargetAccount: Add CamelSettings member.



commit 7b7aee279438d47bb840982e1f526b4c8d912801
Author: Matthew Barnes <mbarnes redhat com>
Date:   Mon Aug 15 10:42:11 2011 -0400

    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.

 mail/em-config.c |   10 +++++++++-
 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 bad3d92..fbde5d5 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 24b062c..0291f24 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
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]