[geary] Remove composer method that is a two-line foreach loop.
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary] Remove composer method that is a two-line foreach loop.
- Date: Wed, 28 Sep 2016 23:20:50 +0000 (UTC)
commit 346392d0fde35cd3599936c4f1ac5f47e061a9d1
Author: Michael James Gratton <mike vee net>
Date: Wed Sep 28 22:16:44 2016 +1000
Remove composer method that is a two-line foreach loop.
src/client/composer/composer-widget.vala | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/src/client/composer/composer-widget.vala b/src/client/composer/composer-widget.vala
index 4471cdc..58156b4 100644
--- a/src/client/composer/composer-widget.vala
+++ b/src/client/composer/composer-widget.vala
@@ -758,7 +758,8 @@ public class ComposerWidget : Gtk.EventBox {
debug("Error getting message body: %s", error.message);
}
- add_attachments(referred.attachments);
+ foreach(Geary.Attachment attachment in referred.attachments)
+ add_attachment(attachment.file, true);
break;
case ComposeType.REPLY:
@@ -778,7 +779,8 @@ public class ComposerWidget : Gtk.EventBox {
this.subject = forward_subject;
this.body_html = "\n\n" + Geary.RFC822.Utils.quote_email_for_forward(referred, quote,
Geary.RFC822.TextFormat.HTML);
- add_attachments(referred.attachments);
+ foreach(Geary.Attachment attachment in referred.attachments)
+ add_attachment(attachment.file, true);
this.pending_attachments = referred.attachments;
break;
}
@@ -1513,7 +1515,8 @@ public class ComposerWidget : Gtk.EventBox {
}
private void on_pending_attachments() {
- add_attachments(this.pending_attachments, false);
+ foreach(Geary.Attachment attachment in this.pending_attachments)
+ add_attachment(attachment.file, false);
}
private void check_pending_attachments() {
@@ -1601,11 +1604,6 @@ public class ComposerWidget : Gtk.EventBox {
return true;
}
- private void add_attachments(Gee.List<Geary.Attachment> attachments, bool alert_errors = true) {
- foreach(Geary.Attachment attachment in attachments)
- add_attachment(attachment.file, alert_errors);
- }
-
private void remove_attachment(File file, Gtk.Box box) {
if (!this.attachment_files.remove(file))
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]