[geary] Fix being unable to remove attachments from a draft. Fixes Bug 792555.
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary] Fix being unable to remove attachments from a draft. Fixes Bug 792555.
- Date: Sat, 14 Apr 2018 05:26:11 +0000 (UTC)
commit 67f6bf201d693beed7b85ee7b7b709a7207032ff
Author: Michael James Gratton <mike vee net>
Date: Sat Apr 14 13:54:03 2018 +1000
Fix being unable to remove attachments from a draft. Fixes Bug 792555.
* src/client/composer/composer-widget.vala (ComposerWidget): When
removing an attachment, check for existing pending attachments
afterwards but don't add them, just enable the button instead.
src/client/composer/composer-widget.vala | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/client/composer/composer-widget.vala b/src/client/composer/composer-widget.vala
index 7bcf028..977bd8b 100644
--- a/src/client/composer/composer-widget.vala
+++ b/src/client/composer/composer-widget.vala
@@ -616,6 +616,7 @@ public class ComposerWidget : Gtk.EventBox {
update_composer_view();
update_attachments_view();
+ update_pending_attachments(this.pending_include, true);
string signature = yield load_signature(cancellable);
this.editor.load_html(
@@ -1480,8 +1481,6 @@ public class ComposerWidget : Gtk.EventBox {
attachments_box.show_all();
else
attachments_box.hide();
-
- update_pending_attachments(this.pending_include, true);
}
// Both adds pending attachments and updates the UI if there are
@@ -1631,15 +1630,16 @@ public class ComposerWidget : Gtk.EventBox {
private void remove_attachment(File file, Gtk.Box box) {
if (!this.attached_files.remove(file))
return;
-
+
foreach (weak Gtk.Widget child in this.attachments_box.get_children()) {
if (child == box) {
this.attachments_box.remove(box);
break;
}
}
-
+
update_attachments_view();
+ update_pending_attachments(this.pending_include, false);
}
private bool check_send_on_return(Gdk.EventKey event) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]