[geary/wip/714104-refine-account-dialog] Make non-SMTPs-specific parts of the accounts editor generic
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/714104-refine-account-dialog] Make non-SMTPs-specific parts of the accounts editor generic
- Date: Thu, 27 Dec 2018 00:06:39 +0000 (UTC)
commit 35630f6739e42deb35925cbdd8c3c79a1bc9155b
Author: Michael Gratton <mike vee net>
Date: Thu Dec 20 20:18:31 2018 +1100
Make non-SMTPs-specific parts of the accounts editor generic
src/client/accounts/accounts-editor-add-pane.vala | 10 ++---
src/client/accounts/accounts-editor-row.vala | 4 +-
.../accounts/accounts-editor-servers-pane.vala | 45 +++++++++++-----------
3 files changed, 30 insertions(+), 29 deletions(-)
---
diff --git a/src/client/accounts/accounts-editor-add-pane.vala
b/src/client/accounts/accounts-editor-add-pane.vala
index f2b120b3..8a872be8 100644
--- a/src/client/accounts/accounts-editor-add-pane.vala
+++ b/src/client/accounts/accounts-editor-add-pane.vala
@@ -64,7 +64,7 @@ internal class Accounts.EditorAddPane : Gtk.Grid, EditorPane {
private HostnameRow smtp_hostname = new HostnameRow(Geary.Protocol.SMTP);
private TransportSecurityRow smtp_tls = new TransportSecurityRow();
- private SmtpAuthRow smtp_auth = new SmtpAuthRow();
+ private OutgoingAuthRow smtp_auth = new OutgoingAuthRow();
private LoginRow smtp_login = new LoginRow();
private PasswordRow smtp_password = new PasswordRow();
@@ -597,11 +597,11 @@ private class Accounts.TransportSecurityRow :
}
-private class Accounts.SmtpAuthRow :
- LabelledEditorRow<EditorAddPane,SmtpAuthComboBox> {
+private class Accounts.OutgoingAuthRow :
+ LabelledEditorRow<EditorAddPane,OutgoingAuthComboBox> {
- public SmtpAuthRow() {
- SmtpAuthComboBox value = new SmtpAuthComboBox();
+ public OutgoingAuthRow() {
+ OutgoingAuthComboBox value = new OutgoingAuthComboBox();
base(value.label, value);
this.activatable = false;
diff --git a/src/client/accounts/accounts-editor-row.vala b/src/client/accounts/accounts-editor-row.vala
index 12c828d6..4757f660 100644
--- a/src/client/accounts/accounts-editor-row.vala
+++ b/src/client/accounts/accounts-editor-row.vala
@@ -507,7 +507,7 @@ internal class Accounts.TlsComboBox : Gtk.ComboBox {
}
-internal class Accounts.SmtpAuthComboBox : Gtk.ComboBoxText {
+internal class Accounts.OutgoingAuthComboBox : Gtk.ComboBoxText {
public string label { get; private set; }
@@ -526,7 +526,7 @@ internal class Accounts.SmtpAuthComboBox : Gtk.ComboBoxText {
}
- public SmtpAuthComboBox() {
+ public OutgoingAuthComboBox() {
// Translators: Label for source of SMTP authentication
// credentials (none, use IMAP, custom) when adding a new
// account
diff --git a/src/client/accounts/accounts-editor-servers-pane.vala
b/src/client/accounts/accounts-editor-servers-pane.vala
index beaf333b..899c3e7e 100644
--- a/src/client/accounts/accounts-editor-servers-pane.vala
+++ b/src/client/accounts/accounts-editor-servers-pane.vala
@@ -60,11 +60,12 @@ internal class Accounts.EditorServersPane : Gtk.Grid, EditorPane, AccountPane {
[GtkChild]
private Gtk.Spinner apply_spinner;
+ private SaveDraftsRow save_drafts;
+
private ServiceLoginRow incoming_login;
- private SaveDraftsRow save_drafts;
- private ServiceSmtpAuthRow smtp_auth;
- private ServiceLoginRow smtp_login;
+ private ServiceOutgoingAuthRow outgoing_auth;
+ private ServiceLoginRow outgoing_login;
public EditorServersPane(Editor editor, Geary.AccountInformation account) {
@@ -125,16 +126,16 @@ internal class Accounts.EditorServersPane : Gtk.Grid, EditorPane, AccountPane {
this.sending_list,
new ServiceSecurityRow(account, this.outgoing_mutable, this.commands)
);
- this.smtp_auth = new ServiceSmtpAuthRow(
+ this.outgoing_auth = new ServiceOutgoingAuthRow(
account, this.outgoing_mutable, this.incoming_mutable, this.commands
);
- this.smtp_auth.value.changed.connect(on_smtp_auth_changed);
- add_row(this.sending_list, this.smtp_auth);
+ this.outgoing_auth.value.changed.connect(on_outgoing_auth_changed);
+ add_row(this.sending_list, this.outgoing_auth);
- this.smtp_login = new ServiceLoginRow(
+ this.outgoing_login = new ServiceLoginRow(
account, this.outgoing_mutable, this.commands
);
- add_row(this.sending_list, this.smtp_login);
+ add_row(this.sending_list, this.outgoing_login);
// Misc plumbing
@@ -145,7 +146,7 @@ internal class Accounts.EditorServersPane : Gtk.Grid, EditorPane, AccountPane {
this.commands.redone.connect(on_command);
update_header();
- update_smtp_auth();
+ update_outgoing_auth();
}
~EditorServersPane() {
@@ -258,7 +259,7 @@ internal class Accounts.EditorServersPane : Gtk.Grid, EditorPane, AccountPane {
// There was an SMTP auth error, but IMAP already
// succeeded, so the user probably needs to
// specify custom creds here
- this.smtp_auth.value.source = Geary.Credentials.Requirement.CUSTOM;
+ this.outgoing_auth.value.source = Geary.Credentials.Requirement.CUSTOM;
// Translators: In-app notification label
message = _("Check your sending login and password");
} catch (GLib.Error err) {
@@ -310,9 +311,9 @@ internal class Accounts.EditorServersPane : Gtk.Grid, EditorPane, AccountPane {
this.apply_button.set_sensitive(this.commands.can_undo);
}
- private void update_smtp_auth() {
- this.smtp_login.set_visible(
- this.smtp_auth.value.source == CUSTOM
+ private void update_outgoing_auth() {
+ this.outgoing_login.set_visible(
+ this.outgoing_auth.value.source == CUSTOM
);
}
@@ -370,8 +371,8 @@ internal class Accounts.EditorServersPane : Gtk.Grid, EditorPane, AccountPane {
update_actions();
}
- private void on_smtp_auth_changed() {
- update_smtp_auth();
+ private void on_outgoing_auth_changed() {
+ update_outgoing_auth();
}
[GtkCallback]
@@ -747,19 +748,19 @@ private class Accounts.ServiceLoginRow :
}
-private class Accounts.ServiceSmtpAuthRow :
- ServiceRow<EditorServersPane,SmtpAuthComboBox> {
+private class Accounts.ServiceOutgoingAuthRow :
+ ServiceRow<EditorServersPane,OutgoingAuthComboBox> {
private Application.CommandStack commands;
private Geary.ServiceInformation imap_service;
- public ServiceSmtpAuthRow(Geary.AccountInformation account,
- Geary.ServiceInformation smtp_service,
- Geary.ServiceInformation imap_service,
- Application.CommandStack commands) {
- SmtpAuthComboBox value = new SmtpAuthComboBox();
+ public ServiceOutgoingAuthRow(Geary.AccountInformation account,
+ Geary.ServiceInformation smtp_service,
+ Geary.ServiceInformation imap_service,
+ Application.CommandStack commands) {
+ OutgoingAuthComboBox value = new OutgoingAuthComboBox();
base(account, smtp_service, value.label, value);
update();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]