[geary: 9/10] Mark ourselves busy while pasting inline images
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary: 9/10] Mark ourselves busy while pasting inline images
- Date: Sun, 17 Nov 2019 05:52:44 +0000 (UTC)
commit bc8e5674e0257b1c6ad90275eec9c862082ac3c5
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 814f2958..8769c1f3 100644
--- a/src/client/composer/composer-widget.vala
+++ b/src/client/composer/composer-widget.vala
@@ -1902,6 +1902,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 {
@@ -1923,6 +1927,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]