Composer.Widget: Rename get_composed_email to to_composed_email

It's a factory method, not an accessor.
This commit is contained in:
Michael Gratton 2020-08-12 15:52:43 +10:00 committed by Michael James Gratton
parent a781e0ebf5
commit 1ed1f82a12
2 changed files with 6 additions and 6 deletions

View file

@ -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 = _(

View file

@ -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