[geary/wip/747627-drafts-not-saved-0.11: 16/16] Disable "save draft" button if it is not available yet. Bug 747627



commit 312e05da6d64916ede2c2d7d3ae80f34524eb1bf
Author: Gautier Pelloux-Prayer <gautier+git damsy net>
Date:   Mon Nov 21 14:43:00 2016 +0100

    Disable "save draft" button if it is not available yet. Bug 747627

 src/client/composer/composer-widget.vala |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/client/composer/composer-widget.vala b/src/client/composer/composer-widget.vala
index deec781..4e990a7 100644
--- a/src/client/composer/composer-widget.vala
+++ b/src/client/composer/composer-widget.vala
@@ -1150,7 +1150,7 @@ public class ComposerWidget : Gtk.EventBox {
         if (can_save())
             save_and_exit_async.begin();
         else
-            container.close_container();
+            on_close();
     }
     
     private void on_close_and_discard() {
@@ -1381,9 +1381,12 @@ public class ComposerWidget : Gtk.EventBox {
         Cancellable? cancellable = null)
     throws Error {
         this.draft_save_text = "";
+        Gtk.Action close_and_save = this.actions.get_action(ACTION_CLOSE_SAVE);
+
+        close_and_save.set_sensitive(false);
+
         yield close_draft_manager_async(cancellable);
 
-        Gtk.Action close_and_save = this.actions.get_action(ACTION_CLOSE_SAVE);
         if (!this.account.information.save_drafts) {
             close_and_save.set_visible(false);
             return;


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