diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-07-02 00:16:23 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-07-02 02:39:23 +0800 |
commit | b554b165941e9b4e394554591e93e31e5accef16 (patch) | |
tree | 4232dc565d325a6f5b3c67081fb484c99055d092 /mail | |
parent | 1351c8e4fb443a9705bb1225c3c574c05a36f8ca (diff) | |
download | gsoc2013-evolution-b554b165941e9b4e394554591e93e31e5accef16.tar.gz gsoc2013-evolution-b554b165941e9b4e394554591e93e31e5accef16.tar.zst gsoc2013-evolution-b554b165941e9b4e394554591e93e31e5accef16.zip |
Fix merge issues in EMAccountEditor.
Diffstat (limited to 'mail')
-rw-r--r-- | mail/em-account-editor.c | 39 | ||||
-rw-r--r-- | mail/mail-config.glade | 368 |
2 files changed, 257 insertions, 150 deletions
diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c index e25d0553cb..71a2457409 100644 --- a/mail/em-account-editor.c +++ b/mail/em-account-editor.c @@ -60,6 +60,7 @@ #include "widgets/misc/e-signature-editor.h" #include "e-mail-local.h" +#include "e-mail-store.h" #include "em-config.h" #include "em-folder-selection-button.h" #include "em-account-editor.h" @@ -191,6 +192,7 @@ struct _EMAccountEditorPrivate { /* for druid page preparation */ guint identity_set:1; guint receive_set:1; + guint send_set:1; guint management_set:1; }; @@ -3047,11 +3049,11 @@ emae_check_complete (EConfig *ec, const gchar *pageid, gpointer data) const gchar *tmp; EAccount *ea; gboolean refresh = FALSE; - gboolean edit; + gboolean new_account; account = em_account_editor_get_modified_account (emae); - original_account = em_account_editor_get_modified_account (emae); - edit = (original_account != NULL); + original_account = em_account_editor_get_original_account (emae); + new_account = (original_account == NULL); /* We use the page-check of various pages to 'prepare' or pre-load their values, only in the druid */ @@ -3090,28 +3092,35 @@ emae_check_complete (EConfig *ec, const gchar *pageid, gpointer data) index = check_servers (at); gtk_entry_set_text (emae->priv->source.username, user); gtk_entry_set_text (emae->priv->transport.username, user); - if (!edit && uri && (url = camel_url_new (uri, NULL)) != NULL) { + if (new_account && uri && (url = camel_url_new (uri, NULL)) != NULL) { refresh = TRUE; - camel_url_set_protocol (url, mail_servers[index].proto); - camel_url_set_param (url, "use_ssl", mail_servers[index].ssl); - camel_url_set_host (url, mail_servers[index].recv); camel_url_set_user (url, user); - gtk_entry_set_text (emae->priv->source.hostname, mail_servers[index].recv); - gtk_entry_set_text (emae->priv->transport.hostname, mail_servers[index].send); + if (index != -1) { + camel_url_set_protocol (url, mail_servers[index].proto); + camel_url_set_param (url, "use_ssl", mail_servers[index].ssl); + camel_url_set_host (url, mail_servers[index].recv); + gtk_entry_set_text (emae->priv->source.hostname, mail_servers[index].recv); + gtk_entry_set_text (emae->priv->transport.hostname, mail_servers[index].send); + } else { + camel_url_set_host (url, ""); + } + g_free (uri); uri = camel_url_to_string (url, 0); e_account_set_string (account, E_ACCOUNT_SOURCE_URL, uri); - g_free (uri); camel_url_free (url); } + g_free (uri); } } else if (!strcmp (pageid, "30.send")) { + if (!emae->priv->send_set) { CamelURL *url; gchar *at, *user; gint index; gchar *uri = (gchar *)e_account_get_string (account, E_ACCOUNT_TRANSPORT_URL); + emae->priv->send_set = 1; tmp = e_account_get_string (account, E_ACCOUNT_ID_ADDRESS); at = strchr (tmp, '@'); user = g_alloca (at-tmp+1); @@ -3120,7 +3129,7 @@ emae_check_complete (EConfig *ec, const gchar *pageid, gpointer data) at++; index = check_servers (at); - if (uri && (url = camel_url_new (uri, NULL)) != NULL) { + if (index != -1 && uri && (url = camel_url_new (uri, NULL)) != NULL) { refresh = TRUE; camel_url_set_protocol (url, "smtp"); camel_url_set_param (url, "use_ssl", mail_servers[index].ssl); @@ -3130,9 +3139,8 @@ emae_check_complete (EConfig *ec, const gchar *pageid, gpointer data) e_account_set_string (account, E_ACCOUNT_TRANSPORT_URL, uri); g_free (uri); camel_url_free (url); - } else { - g_warning ("buz2\n"); } + } } else if (!strcmp (pageid, "20.receive_options")) { if (emae->priv->source.provider @@ -3223,15 +3231,12 @@ em_account_editor_check (EMAccountEditor *emae, const gchar *page) static void add_new_store (gchar *uri, CamelStore *store, gpointer user_data) { -#if 0 /* KILL-BONOBO: Try to actually fix this? */ - MailComponent *component = mail_component_peek (); EAccount *account = user_data; if (store == NULL) return; - mail_component_add_store (component, store, account->name); -#endif + e_mail_store_add (store, account->name); } static void diff --git a/mail/mail-config.glade b/mail/mail-config.glade index 0124d086a3..e9fda21741 100644 --- a/mail/mail-config.glade +++ b/mail/mail-config.glade @@ -1,7 +1,7 @@ <?xml version="1.0"?> <glade-interface> <requires lib="gnome"/> - <!-- interface-requires gnome 2301.3464 --> + <!-- interface-requires gnome 2298.56488 --> <!-- interface-requires gtk+ 2.16 --> <!-- interface-naming-policy toplevel-contextual --> <widget class="GtkWindow" id="account_druid"> @@ -906,6 +906,7 @@ For example: "Work" or "Personal"</property> <widget class="GtkImage" id="image2"> <property name="visible">True</property> <property name="stock">gtk-dialog-warning</property> + <property name="icon-size">4</property> </widget> <packing> <property name="expand">False</property> @@ -1354,6 +1355,7 @@ For example: "Work" or "Personal"</property> <widget class="GtkImage" id="image1"> <property name="visible">True</property> <property name="stock">gtk-dialog-warning</property> + <property name="icon-size">4</property> </widget> <packing> <property name="expand">False</property> @@ -2360,7 +2362,7 @@ For example: "Work" or "Personal"</property> </packing> </child> <child> - <widget class="GtkLabel" id="label2"> + <widget class="GtkLabel" id="label1"> <property name="visible">True</property> <property name="xalign">0</property> <property name="label" translatable="yes">Encry_ption certificate:</property> @@ -2404,13 +2406,14 @@ For example: "Work" or "Personal"</property> <property name="xscale">0</property> <property name="yscale">0</property> <child> - <widget class="GtkHBox" id="hbox2"> + <widget class="GtkHBox" id="hbox1"> <property name="visible">True</property> <property name="spacing">2</property> <child> <widget class="GtkImage" id="image3"> <property name="visible">True</property> <property name="stock">gtk-open</property> + <property name="icon-size">4</property> </widget> <packing> <property name="expand">False</property> @@ -2459,6 +2462,7 @@ For example: "Work" or "Personal"</property> <widget class="GtkImage" id="image10"> <property name="visible">True</property> <property name="stock">gtk-clear</property> + <property name="icon-size">4</property> </widget> <packing> <property name="expand">False</property> @@ -2514,13 +2518,14 @@ For example: "Work" or "Personal"</property> <property name="xscale">0</property> <property name="yscale">0</property> <child> - <widget class="GtkHBox" id="hbox1"> + <widget class="GtkHBox" id="hbox2"> <property name="visible">True</property> <property name="spacing">2</property> <child> <widget class="GtkImage" id="image4"> <property name="visible">True</property> <property name="stock">gtk-open</property> + <property name="icon-size">4</property> </widget> <packing> <property name="expand">False</property> @@ -2529,7 +2534,7 @@ For example: "Work" or "Personal"</property> </packing> </child> <child> - <widget class="GtkLabel" id="label1"> + <widget class="GtkLabel" id="label2"> <property name="visible">True</property> <property name="label" translatable="yes">_Select...</property> <property name="use_underline">True</property> @@ -2569,6 +2574,7 @@ For example: "Work" or "Personal"</property> <widget class="GtkImage" id="image9"> <property name="visible">True</property> <property name="stock">gtk-clear</property> + <property name="icon-size">4</property> </widget> <packing> <property name="expand">False</property> @@ -2647,6 +2653,144 @@ For example: "Work" or "Personal"</property> </widget> </child> </widget> + <widget class="GtkWindow" id="accounts_tab"> + <property name="title" translatable="yes">Email Accounts</property> + <child> + <widget class="GtkHBox" id="toplevel"> + <property name="visible">True</property> + <property name="spacing">6</property> + <child> + <widget class="Custom" id="etableMailAccounts"> + <property name="visible">True</property> + <property name="creation_function">em_account_prefs_treeview_new</property> + </widget> + <packing> + <property name="position">0</property> + </packing> + </child> + <child> + <widget class="GtkVBox" id="vboxMailFunctions"> + <property name="visible">True</property> + <property name="spacing">6</property> + <child> + <widget class="GtkVButtonBox" id="vbuttonboxMailAccounts"> + <property name="visible">True</property> + <property name="spacing">6</property> + <property name="layout_style">start</property> + <child> + <widget class="GtkButton" id="cmdAccountAdd"> + <property name="label">gtk-add</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="receives_default">False</property> + <property name="use_stock">True</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <widget class="GtkButton" id="cmdAccountEdit"> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="receives_default">False</property> + <child> + <widget class="GtkAlignment" id="alignment33"> + <property name="visible">True</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <child> + <widget class="GtkHBox" id="hbox224"> + <property name="visible">True</property> + <property name="spacing">2</property> + <child> + <widget class="GtkImage" id="image8"> + <property name="visible">True</property> + <property name="stock">gtk-properties</property> + <property name="icon-size">4</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="label557"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Edit</property> + <property name="use_underline">True</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">1</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">1</property> + </packing> + </child> + <child> + <widget class="GtkButton" id="cmdAccountDelete"> + <property name="label">gtk-delete</property> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="receives_default">False</property> + <property name="use_stock">True</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">2</property> + </packing> + </child> + <child> + <widget class="GtkButton" id="cmdAccountDefault"> + <property name="label" translatable="yes">De_fault</property> + <property name="width_request">89</property> + <property name="height_request">36</property> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="receives_default">False</property> + <property name="use_underline">True</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">3</property> + </packing> + </child> + </widget> + <packing> + <property name="position">0</property> + </packing> + </child> + </widget> + <packing> + <property name="expand">False</property> + <property name="position">1</property> + </packing> + </child> + </widget> + </child> + </widget> <widget class="GtkWindow" id="preferences_tab"> <property name="title" translatable="yes">Mail Preferences</property> <child> @@ -3215,10 +3359,10 @@ For example: "Work" or "Personal"</property> </packing> </child> <child> - <widget class="GtkOptionMenu" id="omenuEmptyTrashDays"> + <widget class="GtkComboBox" id="comboboxEmptyTrashDays"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> + <property name="items" translatable="yes">a +b</property> </widget> <packing> <property name="expand">False</property> @@ -3848,6 +3992,7 @@ For example: "Work" or "Personal"</property> <widget class="GtkImage" id="plugin_image"> <property name="visible">True</property> <property name="icon_name">gtk-info</property> + <property name="icon-size">4</property> </widget> <packing> <property name="expand">False</property> @@ -3894,10 +4039,10 @@ For example: "Work" or "Personal"</property> </packing> </child> <child> - <widget class="GtkOptionMenu" id="junk_empty_combo"> + <widget class="GtkComboBox" id="junk_empty_combobox"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> + <property name="items" translatable="yes">a +b</property> </widget> <packing> <property name="expand">False</property> @@ -4041,6 +4186,7 @@ For example: "Work" or "Personal"</property> <widget class="GtkImage" id="image11"> <property name="visible">True</property> <property name="stock">gtk-info</property> + <property name="icon-size">4</property> </widget> <packing> <property name="expand">False</property> @@ -4114,7 +4260,7 @@ For example: "Work" or "Personal"</property> <property name="visible">True</property> <property name="can_focus">True</property> <child> - <widget class="GtkVBox" id="vboxGeneral1"> + <widget class="GtkVBox" id="vboxGeneral"> <property name="visible">True</property> <property name="border_width">12</property> <property name="spacing">18</property> @@ -4256,6 +4402,62 @@ For example: "Work" or "Personal"</property> </packing> </child> <child> + <widget class="GtkAlignment" id="alignment25"> + <property name="visible">True</property> + <property name="xalign">7.4505801528346183e-09</property> + <property name="xscale">0</property> + <child> + <widget class="GtkHBox" id="hboxReplyStyle"> + <property name="visible">True</property> + <child> + <widget class="GtkComboBox" id="comboboxReplyStyle"> + <property name="visible">True</property> + <property name="items" translatable="yes">Attachment +Inline (Outlook style) +Quoted +Do not quote</property> + </widget> + <packing> + <property name="position">0</property> + </packing> + </child> + </widget> + </child> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkHBox" id="hboxForwardStyle"> + <property name="visible">True</property> + <child> + <widget class="GtkComboBox" id="comboboxForwardStyle"> + <property name="visible">True</property> + <property name="items" translatable="yes">Attachment +Inline +Quoted</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="x_options">GTK_FILL</property> + <property name="y_options">GTK_FILL</property> + </packing> + </child> + <child> <widget class="GtkOptionMenu" id="omenuCharset1"> <property name="visible">True</property> <property name="can_focus">True</property> @@ -4297,33 +4499,6 @@ For example: "Work" or "Personal"</property> <property name="y_options"></property> </packing> </child> - <child> - <widget class="GtkComboBox" id="comboboxForwardStyle"> - <property name="visible">True</property> - <property name="items" translatable="yes">Attachment -Inline -Quoted</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - </packing> - </child> - <child> - <widget class="GtkComboBox" id="comboboxReplyStyle"> - <property name="visible">True</property> - <property name="items" translatable="yes">Attachment -Inline (Outlook style) -Quoted -Do Not Quote</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - </packing> - </child> </widget> <packing> <property name="position">5</property> @@ -4481,7 +4656,7 @@ Do Not Quote</property> </widget> </child> <child> - <widget class="GtkLabel" id="lblGeneral1"> + <widget class="GtkLabel" id="lblGeneral"> <property name="visible">True</property> <property name="label" translatable="yes">General</property> <property name="use_underline">True</property> @@ -4508,6 +4683,7 @@ Do Not Quote</property> <property name="label" translatable="yes"><b>Sig_natures</b></property> <property name="use_markup">True</property> <property name="use_underline">True</property> + <property name="mnemonic_widget">listSignatures</property> </widget> <packing> <property name="expand">False</property> @@ -4704,6 +4880,7 @@ Do Not Quote</property> <property name="visible">True</property> <property name="yalign">0</property> <property name="stock">gtk-dialog-info</property> + <property name="icon-size">4</property> </widget> <packing> <property name="expand">False</property> @@ -4874,7 +5051,7 @@ Do Not Quote</property> <widget class="GtkWindow" id="font_tab"> <property name="title" translatable="yes">Font Properties</property> <child> - <widget class="GtkVBox" id="toplevel1"> + <widget class="GtkVBox" id="toplevel"> <property name="visible">True</property> <property name="spacing">12</property> <child> @@ -5016,7 +5193,7 @@ Do Not Quote</property> <property name="border_width">12</property> <property name="spacing">6</property> <child> - <widget class="GtkHBox" id="hboxImageAndHelp1"> + <widget class="GtkHBox" id="hboxImageAndHelp"> <property name="visible">True</property> <property name="spacing">6</property> <child> @@ -5154,6 +5331,7 @@ for display purposes only. </property> <widget class="GtkImage" id="image5"> <property name="visible">True</property> <property name="stock">gtk-add</property> + <property name="icon-size">4</property> </widget> <packing> <property name="expand">False</property> @@ -5217,7 +5395,7 @@ for display purposes only. </property> <property name="visible">True</property> <property name="can_focus">True</property> <child> - <widget class="GtkVBox" id="vboxGeneral2"> + <widget class="GtkVBox" id="vboxGeneral"> <property name="visible">True</property> <property name="border_width">12</property> <property name="spacing">18</property> @@ -5291,7 +5469,7 @@ for display purposes only. </property> <property name="visible">True</property> <property name="spacing">6</property> <child> - <widget class="GtkTable" id="table1"> + <widget class="GtkTable" id="table8"> <property name="visible">True</property> <property name="n_rows">4</property> <property name="n_columns">4</property> @@ -5326,21 +5504,6 @@ for display purposes only. </property> </packing> </child> <child> - <widget class="GtkLabel" id="lblSocksHost"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">S_OCKS Host:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">txtSocksHost</property> - </widget> - <packing> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> <widget class="GtkLabel" id="lblIgnoreHosts"> <property name="visible">True</property> <property name="xalign">0</property> @@ -5380,19 +5543,6 @@ for display purposes only. </property> </packing> </child> <child> - <widget class="GtkEntry" id="txtSocksHost"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="y_options"></property> - </packing> - </child> - <child> <widget class="GtkLabel" id="lblHttpPort"> <property name="visible">True</property> <property name="xalign">0</property> @@ -5421,21 +5571,6 @@ for display purposes only. </property> </packing> </child> <child> - <widget class="GtkLabel" id="lblSocksPort"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Port:</property> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> <widget class="GtkSpinButton" id="spnHttpPort"> <property name="visible">True</property> <property name="can_focus">True</property> @@ -5464,21 +5599,6 @@ for display purposes only. </property> </packing> </child> <child> - <widget class="GtkSpinButton" id="spnSocksPort"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="adjustment">0 0 65535 1 10 0</property> - <property name="climb_rate">1</property> - </widget> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="y_options"></property> - </packing> - </child> - <child> <widget class="GtkEntry" id="txtIgnoreHosts"> <property name="visible">True</property> <property name="can_focus">True</property> @@ -5491,6 +5611,18 @@ for display purposes only. </property> <property name="y_options"></property> </packing> </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> </widget> <packing> <property name="expand">False</property> @@ -5589,36 +5721,6 @@ for display purposes only. </property> <property name="position">3</property> </packing> </child> - <child> - <widget class="GtkRadioButton" id="rdoAutoConfig"> - <property name="label" translatable="yes">_Automatic proxy configuration URL:</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="draw_indicator">True</property> - <property name="group">rdoSysSettings</property> - </widget> - <packing> - <property name="position">4</property> - </packing> - </child> - <child> - <widget class="GtkAlignment" id="alignment36"> - <property name="visible">True</property> - <property name="left_padding">24</property> - <child> - <widget class="GtkEntry" id="txtAutoConfigUrl"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </widget> - </child> - </widget> - <packing> - <property name="expand">False</property> - <property name="position">5</property> - </packing> - </child> </widget> <packing> <property name="expand">False</property> @@ -5634,7 +5736,7 @@ for display purposes only. </property> </widget> </child> <child> - <widget class="GtkLabel" id="lblGeneral2"> + <widget class="GtkLabel" id="lblGeneral"> <property name="visible">True</property> <property name="label" translatable="yes">General</property> </widget> |