[geary/wip/save-sent-713263] Add account setting whether to allow saving sent



commit 38791abaccae230b98ecadba83e032b7148fdfd0
Author: Charles Lindsay <chaz yorba org>
Date:   Thu Jan 16 18:09:24 2014 -0800

    Add account setting whether to allow saving sent

 src/engine/abstract/geary-abstract-account.vala    |    5 ++++-
 src/engine/api/geary-account.vala                  |    5 +++++
 .../gmail/imap-engine-gmail-account.vala           |    2 +-
 .../imap-engine/imap-engine-generic-account.vala   |    4 ++--
 .../other/imap-engine-other-account.vala           |    2 +-
 .../outlook/imap-engine-outlook-account.vala       |    2 +-
 .../yahoo/imap-engine-yahoo-account.vala           |    2 +-
 7 files changed, 15 insertions(+), 7 deletions(-)
---
diff --git a/src/engine/abstract/geary-abstract-account.vala b/src/engine/abstract/geary-abstract-account.vala
index 1104300..13c8dea 100644
--- a/src/engine/abstract/geary-abstract-account.vala
+++ b/src/engine/abstract/geary-abstract-account.vala
@@ -12,13 +12,16 @@ public abstract class Geary.AbstractAccount : BaseObject, Geary.Account {
     public Geary.ProgressMonitor sending_monitor { get; protected set; }
     
     public virtual bool can_support_archive { get; protected set; }
+    public virtual bool allow_save_sent_mail { get; protected set; }
     
     private string name;
     
-    public AbstractAccount(string name, AccountInformation information, bool can_support_archive) {
+    public AbstractAccount(string name, AccountInformation information, bool can_support_archive,
+        bool allow_save_sent_mail) {
         this.name = name;
         this.information = information;
         this.can_support_archive = can_support_archive;
+        this.allow_save_sent_mail = allow_save_sent_mail;
     }
     
     protected virtual void notify_folders_available_unavailable(Gee.List<Geary.Folder>? available,
diff --git a/src/engine/api/geary-account.vala b/src/engine/api/geary-account.vala
index db2769a..50e9e44 100644
--- a/src/engine/api/geary-account.vala
+++ b/src/engine/api/geary-account.vala
@@ -30,6 +30,11 @@ public interface Geary.Account : BaseObject {
      */
     public abstract bool can_support_archive { get; protected set; }
     
+    /**
+     * Whether this account allows the user to check the save_sent_mail option.
+     */
+    public abstract bool allow_save_sent_mail { get; protected set; }
+    
     public signal void opened();
     
     public signal void closed();
diff --git a/src/engine/imap-engine/gmail/imap-engine-gmail-account.vala 
b/src/engine/imap-engine/gmail/imap-engine-gmail-account.vala
index bf1e159..52a403b 100644
--- a/src/engine/imap-engine/gmail/imap-engine-gmail-account.vala
+++ b/src/engine/imap-engine/gmail/imap-engine-gmail-account.vala
@@ -38,7 +38,7 @@ private class Geary.ImapEngine.GmailAccount : Geary.ImapEngine.GenericAccount {
     
     public GmailAccount(string name, Geary.AccountInformation account_information,
         Imap.Account remote, ImapDB.Account local) {
-        base (name, account_information, true, remote, local);
+        base (name, account_information, true, false, remote, local);
         
         if (path_type_map == null) {
             path_type_map = new Gee.HashMap<Geary.FolderPath, Geary.SpecialFolderType>();
diff --git a/src/engine/imap-engine/imap-engine-generic-account.vala 
b/src/engine/imap-engine/imap-engine-generic-account.vala
index 0f5be34..096961e 100644
--- a/src/engine/imap-engine/imap-engine-generic-account.vala
+++ b/src/engine/imap-engine/imap-engine-generic-account.vala
@@ -22,8 +22,8 @@ private abstract class Geary.ImapEngine.GenericAccount : Geary.AbstractAccount {
     private bool awaiting_credentials = false;
     
     public GenericAccount(string name, Geary.AccountInformation information, bool can_support_archive,
-        Imap.Account remote, ImapDB.Account local) {
-        base (name, information, can_support_archive);
+        bool allow_save_sent_mail, Imap.Account remote, ImapDB.Account local) {
+        base (name, information, can_support_archive, allow_save_sent_mail);
         
         this.remote = remote;
         this.local = local;
diff --git a/src/engine/imap-engine/other/imap-engine-other-account.vala 
b/src/engine/imap-engine/other/imap-engine-other-account.vala
index 419a432..8bc585a 100644
--- a/src/engine/imap-engine/other/imap-engine-other-account.vala
+++ b/src/engine/imap-engine/other/imap-engine-other-account.vala
@@ -7,7 +7,7 @@
 private class Geary.ImapEngine.OtherAccount : Geary.ImapEngine.GenericAccount {
     public OtherAccount(string name, AccountInformation account_information,
         Imap.Account remote, ImapDB.Account local) {
-        base (name, account_information, false, remote, local);
+        base (name, account_information, false, true, remote, local);
     }
     
     protected override GenericFolder new_folder(Geary.FolderPath path, Imap.Account remote_account,
diff --git a/src/engine/imap-engine/outlook/imap-engine-outlook-account.vala 
b/src/engine/imap-engine/outlook/imap-engine-outlook-account.vala
index 4007f10..921b9dc 100644
--- a/src/engine/imap-engine/outlook/imap-engine-outlook-account.vala
+++ b/src/engine/imap-engine/outlook/imap-engine-outlook-account.vala
@@ -33,7 +33,7 @@ private class Geary.ImapEngine.OutlookAccount : Geary.ImapEngine.GenericAccount
     
     public OutlookAccount(string name, AccountInformation account_information, Imap.Account remote,
         ImapDB.Account local) {
-        base (name, account_information, false, remote, local);
+        base (name, account_information, false, true, remote, local);
     }
     
     protected override GenericFolder new_folder(Geary.FolderPath path, Imap.Account remote_account,
diff --git a/src/engine/imap-engine/yahoo/imap-engine-yahoo-account.vala 
b/src/engine/imap-engine/yahoo/imap-engine-yahoo-account.vala
index 6b2b86e..25dcf92 100644
--- a/src/engine/imap-engine/yahoo/imap-engine-yahoo-account.vala
+++ b/src/engine/imap-engine/yahoo/imap-engine-yahoo-account.vala
@@ -35,7 +35,7 @@ private class Geary.ImapEngine.YahooAccount : Geary.ImapEngine.GenericAccount {
     
     public YahooAccount(string name, AccountInformation account_information,
         Imap.Account remote, ImapDB.Account local) {
-        base (name, account_information, false, remote, local);
+        base (name, account_information, false, true, remote, local);
         
         if (special_map == null) {
             special_map = new Gee.HashMap<Geary.FolderPath, Geary.SpecialFolderType>();


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