[geary/wip/save-sent-713263] Add save sent option to ui
- From: Charles Lindsay <clindsay src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/save-sent-713263] Add save sent option to ui
- Date: Sat, 18 Jan 2014 00:25:28 +0000 (UTC)
commit df264147efab45ca1684888540efcf6bad1d6ba6
Author: Charles Lindsay <chaz yorba org>
Date: Fri Jan 17 14:30:53 2014 -0800
Add save sent option to ui
src/client/accounts/add-edit-page.vala | 16 ++++++++++++++++
ui/login.glade | 20 ++++++++++++++++++++
2 files changed, 36 insertions(+), 0 deletions(-)
---
diff --git a/src/client/accounts/add-edit-page.vala b/src/client/accounts/add-edit-page.vala
index d8f5830..edcb7b5 100644
--- a/src/client/accounts/add-edit-page.vala
+++ b/src/client/accounts/add-edit-page.vala
@@ -50,6 +50,11 @@ public class AddEditPage : Gtk.Box {
set { check_remember_password.active = value; }
}
+ public bool save_sent_mail {
+ get { return check_save_sent_mail.active; }
+ set { check_save_sent_mail.active = value; }
+ }
+
public string smtp_username {
get { return entry_smtp_username.text; }
set { entry_smtp_username.text = value; }
@@ -139,6 +144,7 @@ public class AddEditPage : Gtk.Box {
private Gtk.Entry entry_nickname;
private Gtk.ComboBoxText combo_service;
private Gtk.CheckButton check_remember_password;
+ private Gtk.CheckButton check_save_sent_mail;
private Gtk.Alignment other_info;
@@ -198,6 +204,7 @@ public class AddEditPage : Gtk.Box {
label_password = (Gtk.Label) builder.get_object("label: password");
entry_password = (Gtk.Entry) builder.get_object("entry: password");
check_remember_password = (Gtk.CheckButton) builder.get_object("check: remember_password");
+ check_save_sent_mail = (Gtk.CheckButton) builder.get_object("check: save_sent_mail");
label_error = (Gtk.Label) builder.get_object("label: error");
@@ -242,6 +249,7 @@ public class AddEditPage : Gtk.Box {
entry_real_name.changed.connect(on_changed);
entry_nickname.changed.connect(on_changed);
check_remember_password.toggled.connect(on_changed);
+ check_save_sent_mail.toggled.connect(on_changed);
combo_service.changed.connect(on_changed);
entry_imap_host.changed.connect(on_changed);
entry_imap_port.changed.connect(on_changed);
@@ -280,6 +288,8 @@ public class AddEditPage : Gtk.Box {
info.smtp_credentials != null ? info.smtp_credentials.user : null,
info.smtp_credentials != null ? info.smtp_credentials.pass : null,
info.service_provider,
+ info.save_sent_mail,
+ info.allow_save_sent_mail(),
info.default_imap_server_host,
info.default_imap_server_port,
info.default_imap_server_ssl,
@@ -304,6 +314,8 @@ public class AddEditPage : Gtk.Box {
string? initial_smtp_username = null,
string? initial_smtp_password = null,
int initial_service_provider = Geary.ServiceProvider.GMAIL,
+ bool initial_save_sent_mail = true,
+ bool allow_save_sent_mail = true,
string? initial_default_imap_host = null,
uint16 initial_default_imap_port = Geary.Imap.ClientConnection.DEFAULT_PORT_SSL,
bool initial_default_imap_ssl = true,
@@ -322,6 +334,8 @@ public class AddEditPage : Gtk.Box {
email_address = initial_email ?? "";
password = initial_imap_password != null ? initial_imap_password : "";
remember_password = initial_remember_password;
+ save_sent_mail = initial_save_sent_mail;
+ check_save_sent_mail.sensitive = allow_save_sent_mail;
set_service_provider((Geary.ServiceProvider) initial_service_provider);
combo_imap_encryption.active = Encryption.NONE; // Must be default; set to real value below.
combo_smtp_encryption.active = Encryption.NONE;
@@ -538,6 +552,7 @@ public class AddEditPage : Gtk.Box {
account_information.imap_remember_password = remember_password;
account_information.smtp_remember_password = remember_password;
account_information.service_provider = get_service_provider();
+ account_information.save_sent_mail = save_sent_mail;
account_information.default_imap_server_host = imap_host;
account_information.default_imap_server_port = imap_port;
account_information.default_imap_server_ssl = imap_ssl;
@@ -573,6 +588,7 @@ public class AddEditPage : Gtk.Box {
welcome_box.visible = mode == PageMode.WELCOME;
entry_nickname.visible = label_nickname.visible = mode != PageMode.WELCOME;
storage_container.visible = mode == PageMode.EDIT;
+ check_save_sent_mail.visible = mode != PageMode.WELCOME;
if (get_service_provider() == Geary.ServiceProvider.OTHER) {
// Display all options for custom providers.
diff --git a/ui/login.glade b/ui/login.glade
index bd89d8f..8b029a5 100644
--- a/ui/login.glade
+++ b/ui/login.glade
@@ -261,6 +261,26 @@
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="check: save_sent_mail">
+ <property name="label" translatable="yes">Save sent mail</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">6</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]