[geary: 8/9] Mark ourselves busy while pasting inline images



commit c3f5cc1b88f2a37b3093157ab1a5c01530bf187b
Author: Chris Heywood <15127-creywood users noreply gitlab gnome org>
Date:   Sat Nov 16 23:35:58 2019 +0100

    Mark ourselves busy while pasting inline images

 src/client/composer/composer-widget.vala | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/src/client/composer/composer-widget.vala b/src/client/composer/composer-widget.vala
index f8b8065c..44fcbcf8 100644
--- a/src/client/composer/composer-widget.vala
+++ b/src/client/composer/composer-widget.vala
@@ -1928,6 +1928,10 @@ public class ComposerWidget : Gtk.EventBox, Geary.BaseInterface {
      * Handle a pasted image, adding it as an inline attachment
      */
     private void paste_image() {
+        // The slow operations here are creating the PNG and, to a lesser extent,
+        // requesting the image from the clipboard
+        this.container.top_window.application.mark_busy();
+
         get_clipboard(Gdk.SELECTION_CLIPBOARD).request_image((clipboard, pixbuf) => {
             if (pixbuf != null) {
                 try {
@@ -1949,6 +1953,7 @@ public class ComposerWidget : Gtk.EventBox, Geary.BaseInterface {
             } else {
                 warning("Failed to get image from clipboard");
             }
+            this.container.top_window.application.unmark_busy();
         });
     }
 


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