Separate IMAP and SMTP credentials: Closes #5635, Closes #5208

This rather large patch allows separate IMAP and SMTP credentials
and separates the user's credential username from their email
address.  Additional work in this patch includes fixing some minor
protocol bugs in the SMTP stack to work with Postfix, refactoring
the Geary.Engine interface to stop issuing plain strings for
account names, and removing the Geary.EngineAccount abstract class
which was growing unnecessary with each passing day.
This commit is contained in:
Jim Nelson 2012-08-27 12:08:58 -07:00
parent 7f741b0a2c
commit 126378d85c
35 changed files with 1434 additions and 615 deletions

View file

@ -55,33 +55,18 @@
</packing>
</child>
<child>
<object class="GtkGrid" id="grid1">
<object class="GtkGrid" id="grid: imap">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="label2">
<object class="GtkLabel" id="label for: imap username">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Email address:</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Password:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">password_entry</property>
<property name="xpad">6</property>
<property name="label" translatable="yes">Username:</property>
</object>
<packing>
<property name="left_attach">0</property>
@ -91,7 +76,24 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="email_label">
<object class="GtkLabel" id="label for: imap password">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="xpad">6</property>
<property name="label" translatable="yes">_Password:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">entry: imap password</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label: imap username">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
@ -100,13 +102,13 @@
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="password_entry">
<object class="GtkEntry" id="entry: imap password">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
@ -117,13 +119,13 @@
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="remember_password_checkbutton">
<object class="GtkCheckButton" id="check: imap remember_password">
<property name="label" translatable="yes">_Remember password</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
@ -136,11 +138,28 @@
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">2</property>
<property name="top_attach">3</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label: imap">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">IMAP Credentials</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">2</property>
<property name="height">1</property>
</packing>
</child>
<child>
<placeholder/>
</child>
@ -151,6 +170,115 @@
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkGrid" id="grid: smtp">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="label: smtp">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">SMTP Credentials</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">2</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label for: smtp username">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="xpad">6</property>
<property name="label" translatable="yes">Username:</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label for: smtp password">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="xpad">6</property>
<property name="label" translatable="yes">Password:</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label: smtp username">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="xpad">2</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="entry: smtp password">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="visibility">False</property>
<property name="invisible_char">•</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="check: smtp remember_password">
<property name="label" translatable="yes">Remember password</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_action_appearance">False</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">3</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkExpander" id="expander1">
<property name="visible">True</property>
@ -163,7 +291,7 @@
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="label5">
<object class="GtkLabel" id="label for: service">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
@ -178,7 +306,7 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="label6">
<object class="GtkLabel" id="label for: real_name">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
@ -193,7 +321,7 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="service_label">
<object class="GtkLabel" id="label: service">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
@ -206,7 +334,7 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="real_name_label">
<object class="GtkLabel" id="label: real_name">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
@ -219,7 +347,7 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="general_category_label">
<object class="GtkLabel" id="label: general">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
@ -237,7 +365,7 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="imap_settings_category_label">
<object class="GtkLabel" id="label: imap settings">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_top">6</property>
@ -256,7 +384,7 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="label8">
<object class="GtkLabel" id="label for: imap server">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
@ -271,7 +399,7 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="label9">
<object class="GtkLabel" id="label for: imap port">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
@ -286,7 +414,7 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="label10">
<object class="GtkLabel" id="label for: imap encryption">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
@ -301,7 +429,7 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="imap_server_label">
<object class="GtkLabel" id="label: imap server">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
@ -314,7 +442,7 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="imap_port_label">
<object class="GtkLabel" id="label: imap port">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
@ -327,7 +455,7 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="imap_encryption_label">
<object class="GtkLabel" id="label: imap encryption">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
@ -340,7 +468,7 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="smtp_settings_category_label">
<object class="GtkLabel" id="label: smtp settings">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_top">6</property>
@ -359,7 +487,7 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="label12">
<object class="GtkLabel" id="label for: smtp server">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
@ -374,7 +502,7 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="label13">
<object class="GtkLabel" id="label for: smtp port">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
@ -389,7 +517,7 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="label14">
<object class="GtkLabel" id="label for: smtp encryption">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
@ -404,7 +532,7 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="smtp_server_label">
<object class="GtkLabel" id="label: smtp server">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
@ -417,7 +545,7 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="smtp_port_label">
<object class="GtkLabel" id="label: smtp port">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
@ -430,7 +558,7 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="smtp_encryption_label">
<object class="GtkLabel" id="label: smtp encryption">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
@ -454,7 +582,7 @@
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label4">
<object class="GtkLabel" id="label: details">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">_Details</property>
@ -465,7 +593,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
<property name="position">3</property>
</packing>
</child>
</object>