From b554b165941e9b4e394554591e93e31e5accef16 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 1 Jul 2009 12:16:23 -0400 Subject: Fix merge issues in EMAccountEditor. --- mail/em-account-editor.c | 39 ++--- mail/mail-config.glade | 368 ++++++++++++++++++++++++++++++----------------- 2 files changed, 257 insertions(+), 150 deletions(-) (limited to 'mail') 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 @@ - + @@ -906,6 +906,7 @@ For example: "Work" or "Personal" True gtk-dialog-warning + 4 False @@ -1354,6 +1355,7 @@ For example: "Work" or "Personal" True gtk-dialog-warning + 4 False @@ -2360,7 +2362,7 @@ For example: "Work" or "Personal" - + True 0 Encry_ption certificate: @@ -2404,13 +2406,14 @@ For example: "Work" or "Personal" 0 0 - + True 2 True gtk-open + 4 False @@ -2459,6 +2462,7 @@ For example: "Work" or "Personal" True gtk-clear + 4 False @@ -2514,13 +2518,14 @@ For example: "Work" or "Personal" 0 0 - + True 2 True gtk-open + 4 False @@ -2529,7 +2534,7 @@ For example: "Work" or "Personal" - + True _Select... True @@ -2569,6 +2574,7 @@ For example: "Work" or "Personal" True gtk-clear + 4 False @@ -2647,6 +2653,144 @@ For example: "Work" or "Personal" + + Email Accounts + + + True + 6 + + + True + em_account_prefs_treeview_new + + + 0 + + + + + True + 6 + + + True + 6 + start + + + gtk-add + True + True + True + False + True + + + False + False + 0 + + + + + True + False + True + True + False + + + True + 0 + 0 + + + True + 2 + + + True + gtk-properties + 4 + + + False + False + 0 + + + + + True + _Edit + True + + + False + False + 1 + + + + + + + + + False + False + 1 + + + + + gtk-delete + True + False + True + True + False + True + + + False + False + 2 + + + + + De_fault + 89 + 36 + True + False + True + True + False + True + + + False + False + 3 + + + + + 0 + + + + + False + 1 + + + + + Mail Preferences @@ -3215,10 +3359,10 @@ For example: "Work" or "Personal" - + True - True - False + a +b False @@ -3848,6 +3992,7 @@ For example: "Work" or "Personal" True gtk-info + 4 False @@ -3894,10 +4039,10 @@ For example: "Work" or "Personal" - + True - True - False + a +b False @@ -4041,6 +4186,7 @@ For example: "Work" or "Personal" True gtk-info + 4 False @@ -4114,7 +4260,7 @@ For example: "Work" or "Personal" True True - + True 12 18 @@ -4255,6 +4401,62 @@ For example: "Work" or "Personal" + + + True + 7.4505801528346183e-09 + 0 + + + True + + + True + Attachment +Inline (Outlook style) +Quoted +Do not quote + + + 0 + + + + + + + 1 + 2 + 1 + 2 + GTK_FILL + + + + + + True + + + True + Attachment +Inline +Quoted + + + False + False + 0 + + + + + 1 + 2 + GTK_FILL + GTK_FILL + + True @@ -4297,33 +4499,6 @@ For example: "Work" or "Personal" - - - True - Attachment -Inline -Quoted - - - 1 - 2 - - - - - True - Attachment -Inline (Outlook style) -Quoted -Do Not Quote - - - 1 - 2 - 1 - 2 - - 5 @@ -4481,7 +4656,7 @@ Do Not Quote - + True General True @@ -4508,6 +4683,7 @@ Do Not Quote <b>Sig_natures</b> True True + listSignatures False @@ -4704,6 +4880,7 @@ Do Not Quote True 0 gtk-dialog-info + 4 False @@ -4874,7 +5051,7 @@ Do Not Quote Font Properties - + True 12 @@ -5016,7 +5193,7 @@ Do Not Quote 12 6 - + True 6 @@ -5154,6 +5331,7 @@ for display purposes only. True gtk-add + 4 False @@ -5217,7 +5395,7 @@ for display purposes only. True True - + True 12 18 @@ -5291,7 +5469,7 @@ for display purposes only. True 6 - + True 4 4 @@ -5325,21 +5503,6 @@ for display purposes only. - - - True - 0 - S_OCKS Host: - True - txtSocksHost - - - 2 - 3 - GTK_FILL - - - True @@ -5379,19 +5542,6 @@ for display purposes only. - - - True - True - - - 1 - 2 - 2 - 3 - - - True @@ -5420,21 +5570,6 @@ for display purposes only. - - - True - 0 - Port: - - - 2 - 3 - 2 - 3 - GTK_FILL - - - True @@ -5463,21 +5598,6 @@ for display purposes only. - - - True - True - 0 0 65535 1 10 0 - 1 - - - 3 - 4 - 2 - 3 - - - True @@ -5491,6 +5611,18 @@ for display purposes only. + + + + + + + + + + + + False @@ -5589,36 +5721,6 @@ for display purposes only. 3 - - - _Automatic proxy configuration URL: - True - True - False - True - True - rdoSysSettings - - - 4 - - - - - True - 24 - - - True - True - - - - - False - 5 - - False @@ -5634,7 +5736,7 @@ for display purposes only. - + True General -- cgit v1.2.3