[geary/wip/save-sent-713263] Add basic account option



commit 93ac5c3a7836736de985ec6c4b91bae20bad2e0f
Author: Charles Lindsay <chaz yorba org>
Date:   Thu Jan 16 17:55:03 2014 -0800

    Add basic account option

 src/engine/api/geary-account-information.vala |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/engine/api/geary-account-information.vala b/src/engine/api/geary-account-information.vala
index d12135f..b896512 100644
--- a/src/engine/api/geary-account-information.vala
+++ b/src/engine/api/geary-account-information.vala
@@ -26,6 +26,7 @@ public class Geary.AccountInformation : BaseObject {
     private const string SMTP_SSL = "smtp_ssl";
     private const string SMTP_STARTTLS = "smtp_starttls";
     private const string SMTP_NOAUTH = "smtp_noauth";
+    private const string SAVE_SENT_MAIL_KEY = "save_sent_mail";
     
     //
     // "Retired" keys
@@ -51,6 +52,7 @@ public class Geary.AccountInformation : BaseObject {
     public string email { get; set; }
     public Geary.ServiceProvider service_provider { get; set; }
     public int prefetch_period_days { get; set; }
+    public bool save_sent_mail { get; set; }
     
     // Order for display purposes.
     public int ordinal { get; set; }
@@ -100,6 +102,7 @@ public class Geary.AccountInformation : BaseObject {
                 SERVICE_PROVIDER_KEY, Geary.ServiceProvider.GMAIL.to_string()));
             prefetch_period_days = get_int_value(key_file, GROUP, PREFETCH_PERIOD_DAYS_KEY,
                 DEFAULT_PREFETCH_PERIOD_DAYS);
+            save_sent_mail = get_bool_value(key_file, GROUP, SAVE_SENT_MAIL_KEY, true);
             ordinal = get_int_value(key_file, GROUP, ORDINAL_KEY, default_ordinal++);
             
             if (ordinal >= default_ordinal)
@@ -134,6 +137,7 @@ public class Geary.AccountInformation : BaseObject {
         email = from.email;
         service_provider = from.service_provider;
         prefetch_period_days = from.prefetch_period_days;
+        save_sent_mail = from.save_sent_mail;
         ordinal = from.ordinal;
         default_imap_server_host = from.default_imap_server_host;
         default_imap_server_port = from.default_imap_server_port;
@@ -445,6 +449,7 @@ public class Geary.AccountInformation : BaseObject {
             key_file.set_value(GROUP, SMTP_USERNAME_KEY, smtp_credentials.user);
         key_file.set_boolean(GROUP, SMTP_REMEMBER_PASSWORD_KEY, smtp_remember_password);
         key_file.set_integer(GROUP, PREFETCH_PERIOD_DAYS_KEY, prefetch_period_days);
+        key_file.set_boolean(GROUP, SAVE_SENT_MAIL_KEY, save_sent_mail);
         
         if (service_provider == ServiceProvider.OTHER) {
             key_file.set_value(GROUP, IMAP_HOST, default_imap_server_host);


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