[geary/mjog/composer-context-loading-fixes: 7/9] Composer.Widget: Rename `get_composed_email` to `to_composed_email`




commit 0bcfa26c54b1b2de2c53202b4c01e8096502cc6c
Author: Michael Gratton <mike vee net>
Date:   Wed Aug 12 15:52:43 2020 +1000

    Composer.Widget: Rename `get_composed_email` to `to_composed_email`
    
    It's a factory method, not an accessor.

 src/client/application/application-controller.vala | 6 +++---
 src/client/composer/composer-widget.vala           | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/client/application/application-controller.vala 
b/src/client/application/application-controller.vala
index a1e36b412..59bb9d231 100644
--- a/src/client/application/application-controller.vala
+++ b/src/client/application/application-controller.vala
@@ -2485,7 +2485,7 @@ private class Application.SendComposerCommand : ComposerCommand {
 
     public override async void execute(GLib.Cancellable? cancellable)
         throws GLib.Error {
-        Geary.ComposedEmail email = yield this.composer.get_composed_email();
+        Geary.ComposedEmail email = yield this.composer.to_composed_email();
         if (this.can_undo) {
             /// Translators: The label for an in-app notification. The
             /// string substitution is a list of recipients of the email.
@@ -2550,7 +2550,7 @@ private class Application.SaveComposerCommand : ComposerCommand {
 
     public override async void execute(GLib.Cancellable? cancellable)
         throws GLib.Error {
-        Geary.ComposedEmail email = yield this.composer.get_composed_email();
+        Geary.ComposedEmail email = yield this.composer.to_composed_email();
         /// Translators: The label for an in-app notification. The
         /// string substitution is a list of recipients of the email.
         this.executed_label = _(
@@ -2608,7 +2608,7 @@ private class Application.DiscardComposerCommand : ComposerCommand {
 
     public override async void execute(GLib.Cancellable? cancellable)
         throws GLib.Error {
-        Geary.ComposedEmail email = yield this.composer.get_composed_email();
+        Geary.ComposedEmail email = yield this.composer.to_composed_email();
         /// Translators: The label for an in-app notification. The
         /// string substitution is a list of recipients of the email.
         this.executed_label = _(
diff --git a/src/client/composer/composer-widget.vala b/src/client/composer/composer-widget.vala
index 8973992ab..88fca4937 100644
--- a/src/client/composer/composer-widget.vala
+++ b/src/client/composer/composer-widget.vala
@@ -1361,8 +1361,8 @@ public class Composer.Widget : Gtk.EventBox, Geary.BaseInterface {
     }
 
     /** Returns a representation of the current message. */
-    public async Geary.ComposedEmail get_composed_email(GLib.DateTime? date_override = null,
-                                                        bool for_draft = false) {
+    public async Geary.ComposedEmail to_composed_email(GLib.DateTime? date_override = null,
+                                                       bool for_draft = false) {
         Geary.ComposedEmail email = new Geary.ComposedEmail(
             date_override ?? new DateTime.now_local(),
             from
@@ -1789,7 +1789,7 @@ public class Composer.Widget : Gtk.EventBox, Geary.BaseInterface {
         this.draft_timer.reset();
 
         if (this.draft_manager != null) {
-            Geary.ComposedEmail draft = yield get_composed_email(null, true);
+            Geary.ComposedEmail draft = yield to_composed_email(null, true);
             yield this.draft_manager.update(
                 yield new Geary.RFC822.Message.from_composed_email(
                     draft, null, null


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