From 336803264b8eed389443fe2b544dd9b813842ea0 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 14 Nov 2011 13:31:32 +0100 Subject: Bug #663746 - Cann't finish new account configuration for POP --- mail/em-account-editor.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c index ca90654faf..b196da0715 100644 --- a/mail/em-account-editor.c +++ b/mail/em-account-editor.c @@ -2093,13 +2093,6 @@ emae_setup_settings (EMAccountEditorService *service) settings_type = class->settings_type; g_type_class_unref (class); - /* If we already have a CamelSettings instance - * of the appropriate type, leave it alone. */ - if (service->settings != NULL) { - if (G_OBJECT_TYPE (service->settings) == settings_type) - return; - } - url = emae_account_url ( service->emae, emae_service_info[service->type].account_uri_key); @@ -5133,7 +5126,7 @@ emae_commit (EConfig *ec, } else { CamelProvider *provider; - d (printf ("Adding new account '%s'\n", e_account_get_string (account, E_ACCOUNT_NAME))); + d (printf ("Adding new account '%s'\n", e_account_get_string (modified_account, E_ACCOUNT_NAME))); e_account_list_add (accounts, modified_account); account = modified_account; -- cgit v1.2.3 From 6f391134f0c1c2019bd9c58fced43e0b46c87ab8 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 14 Nov 2011 13:33:29 +0100 Subject: Preset 'width-chars' for account type description labels As suggested in https://bugzilla.gnome.org/show_bug.cgi?id=657621 --- mail/mail-config.ui | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mail/mail-config.ui b/mail/mail-config.ui index 4fc87677a8..ca356814d2 100644 --- a/mail/mail-config.ui +++ b/mail/mail-config.ui @@ -4886,6 +4886,7 @@ For example: "Work" or "Personal" 0 description True + 40 1 @@ -5397,6 +5398,7 @@ For example: "Work" or "Personal" 0 description True + 40 1 -- cgit v1.2.3 From 78a2a77d1079c4790eeef64aa42b034dab172292 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 14 Nov 2011 15:24:33 +0100 Subject: Bug #662914 - Reply to gnupg signed mails should be signed --- mail/em-composer-utils.c | 10 ++++++++-- mail/evolution-mail.schemas.in | 15 +++++++++++++++ mail/mail-config.ui | 19 ++++++++++++++++++- modules/mail/e-mail-shell-settings.c | 4 ++++ modules/mail/em-composer-prefs.c | 7 +++++++ 5 files changed, 52 insertions(+), 3 deletions(-) diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c index b09d3cd4e2..3f851c0991 100644 --- a/mail/em-composer-utils.c +++ b/mail/em-composer-utils.c @@ -1413,17 +1413,23 @@ emu_update_composers_security (EMsgComposer *composer, guint32 validity_found) { GtkToggleAction *action; + EShell *shell; + EShellSettings *shell_settings; g_return_if_fail (composer != NULL); + shell = e_msg_composer_get_shell (composer); + shell_settings = e_shell_get_shell_settings (shell); + /* Pre-set only for encrypted messages, not for signed */ - /*if (validity_found & EM_FORMAT_VALIDITY_FOUND_SIGNED) { + if ((validity_found & EM_FORMAT_VALIDITY_FOUND_SIGNED) != 0 + && e_shell_settings_get_boolean (shell_settings, "composer-sign-reply-if-signed")) { if (validity_found & EM_FORMAT_VALIDITY_FOUND_SMIME) action = GTK_TOGGLE_ACTION (E_COMPOSER_ACTION_SMIME_SIGN (composer)); else action = GTK_TOGGLE_ACTION (E_COMPOSER_ACTION_PGP_SIGN (composer)); gtk_toggle_action_set_active (action, TRUE); - }*/ + } if (validity_found & EM_FORMAT_VALIDITY_FOUND_ENCRYPTED) { if (validity_found & EM_FORMAT_VALIDITY_FOUND_SMIME) diff --git a/mail/evolution-mail.schemas.in b/mail/evolution-mail.schemas.in index c26c0feb96..f7c3844b8a 100644 --- a/mail/evolution-mail.schemas.in +++ b/mail/evolution-mail.schemas.in @@ -76,6 +76,21 @@ + + /schemas/apps/evolution/mail/composer/sign_reply_if_signed + /apps/evolution/mail/composer/sign_reply_if_signed + evolution-mail + bool + false + + Digitally sign messages when original message signed (PGP or S/MIME) + + Automatically enable PGP or S/MIME signatures when replying + to a message which is also PGP or S/MIME signed. + + + + /schemas/apps/evolution/mail/composer/reply_start_bottom /apps/evolution/mail/composer/reply_start_bottom diff --git a/mail/mail-config.ui b/mail/mail-config.ui index ca356814d2..0c4696b3bd 100644 --- a/mail/mail-config.ui +++ b/mail/mail-config.ui @@ -594,7 +594,7 @@ for display purposes only. True False - 6 + 7 2 6 6 @@ -696,6 +696,23 @@ for display purposes only. + + + Digitally _sign messages when original message signed (PGP or S/MIME) + True + True + False + False + True + True + + + 2 + 6 + 7 + + + True diff --git a/modules/mail/e-mail-shell-settings.c b/modules/mail/e-mail-shell-settings.c index b0d5f1eed8..6b0cee6826 100644 --- a/modules/mail/e-mail-shell-settings.c +++ b/modules/mail/e-mail-shell-settings.c @@ -277,6 +277,10 @@ e_mail_shell_settings_init (EShellBackend *shell_backend) "composer-group-reply-to-list", "/apps/evolution/mail/composer/group_reply_to_list"); + e_shell_settings_install_property_for_key ( + "composer-sign-reply-if-signed", + "/apps/evolution/mail/composer/sign_reply_if_signed"); + e_shell_settings_install_property_for_key ( "composer-prompt-only-bcc", "/apps/evolution/mail/prompts/only_bcc"); diff --git a/modules/mail/em-composer-prefs.c b/modules/mail/em-composer-prefs.c index 8453b88540..4f4c0d15ac 100644 --- a/modules/mail/em-composer-prefs.c +++ b/modules/mail/em-composer-prefs.c @@ -456,6 +456,13 @@ em_composer_prefs_construct (EMComposerPrefs *prefs, G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE); + widget = e_builder_get_widget (prefs->builder, "chkSignReplyIfSigned"); + g_object_bind_property ( + shell_settings, "composer-sign-reply-if-signed", + widget, "active", + G_BINDING_BIDIRECTIONAL | + G_BINDING_SYNC_CREATE); + widget = e_builder_get_widget (prefs->builder, "chkTopSignature"); g_object_bind_property ( shell_settings, "composer-top-signature", -- cgit v1.2.3 From 907df00ad0ca6b1380f74eac62dc114a492849d6 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Mon, 14 Nov 2011 22:03:42 -0500 Subject: Use CamelSExp instead of ESExp in filter, mail. --- filter/e-filter-color.c | 3 +-- filter/e-filter-element.h | 1 + filter/e-filter-file.c | 4 +--- filter/e-filter-input.c | 4 +--- filter/e-filter-int.c | 2 -- filter/e-filter-option.c | 4 +--- filter/e-filter-part.c | 2 +- mail/em-filter-folder-element.c | 3 +-- mail/em-filter-source-element.c | 4 +--- 9 files changed, 8 insertions(+), 19 deletions(-) diff --git a/filter/e-filter-color.c b/filter/e-filter-color.c index bf80fbb778..1540841968 100644 --- a/filter/e-filter-color.c +++ b/filter/e-filter-color.c @@ -26,7 +26,6 @@ #endif #include -#include #include "e-filter-color.h" @@ -127,7 +126,7 @@ filter_color_format_sexp (EFilterElement *element, g_snprintf (spec, sizeof (spec), "#%04x%04x%04x", fc->color.red, fc->color.green, fc->color.blue); - e_sexp_encode_string (out, spec); + camel_sexp_encode_string (out, spec); } static void diff --git a/filter/e-filter-element.h b/filter/e-filter-element.h index 9abd83ca0a..c0bcadd169 100644 --- a/filter/e-filter-element.h +++ b/filter/e-filter-element.h @@ -25,6 +25,7 @@ #define E_FILTER_ELEMENT_H #include +#include #include #include #include diff --git a/filter/e-filter-file.c b/filter/e-filter-file.c index a5199fe064..baf75e71bb 100644 --- a/filter/e-filter-file.c +++ b/filter/e-filter-file.c @@ -31,8 +31,6 @@ #include #include -#include - #include "e-util/e-alert.h" #include "e-filter-file.h" @@ -203,7 +201,7 @@ filter_file_format_sexp (EFilterElement *element, { EFilterFile *file = E_FILTER_FILE (element); - e_sexp_encode_string (out, file->path); + camel_sexp_encode_string (out, file->path); } static void diff --git a/filter/e-filter-input.c b/filter/e-filter-input.c index 10fa1f1765..8b92f5486e 100644 --- a/filter/e-filter-input.c +++ b/filter/e-filter-input.c @@ -32,8 +32,6 @@ #include #include -#include - #include "e-util/e-alert.h" #include "e-filter-input.h" @@ -243,7 +241,7 @@ filter_input_format_sexp (EFilterElement *element, GList *link; for (link = input->values; link != NULL; link = g_list_next (link)) - e_sexp_encode_string (out, link->data); + camel_sexp_encode_string (out, link->data); } static void diff --git a/filter/e-filter-int.c b/filter/e-filter-int.c index dcb9b18fba..883c560795 100644 --- a/filter/e-filter-int.c +++ b/filter/e-filter-int.c @@ -27,8 +27,6 @@ #include #include -#include - #include "e-filter-int.h" G_DEFINE_TYPE ( diff --git a/filter/e-filter-option.c b/filter/e-filter-option.c index 0cea021666..2f5af12e3b 100644 --- a/filter/e-filter-option.c +++ b/filter/e-filter-option.c @@ -31,8 +31,6 @@ #include #include -#include - #include "e-filter-option.h" #include "e-filter-part.h" @@ -409,7 +407,7 @@ filter_option_format_sexp (EFilterElement *element, EFilterOption *option = E_FILTER_OPTION (element); if (option->current) - e_sexp_encode_string (out, option->current->value); + camel_sexp_encode_string (out, option->current->value); } static void diff --git a/filter/e-filter-part.c b/filter/e-filter-part.c index 0b31097d7c..2154699178 100644 --- a/filter/e-filter-part.c +++ b/filter/e-filter-part.c @@ -501,7 +501,7 @@ e_filter_part_expand_code (EFilterPart *part, #if 0 } else if ((val = g_hash_table_lookup (part->globals, name))) { g_string_append_printf (out, "%.*s", newstart-start, start); - e_sexp_encode_string (out, val); + camel_sexp_encode_string (out, val); #endif } else { g_string_append_printf (out, "%.*s", (gint)(end-start+1), start); diff --git a/mail/em-filter-folder-element.c b/mail/em-filter-folder-element.c index 74f386481e..6098c9354d 100644 --- a/mail/em-filter-folder-element.c +++ b/mail/em-filter-folder-element.c @@ -36,7 +36,6 @@ #include "mail/em-utils.h" #include "shell/e-shell.h" #include "filter/e-filter-part.h" -#include "libedataserver/e-sexp.h" #include "e-util/e-alert.h" #define EM_FILTER_FOLDER_ELEMENT_GET_PRIVATE(obj) \ @@ -264,7 +263,7 @@ filter_folder_element_format_sexp (EFilterElement *fe, { EMFilterFolderElement *ff = (EMFilterFolderElement *) fe; - e_sexp_encode_string (out, ff->priv->uri); + camel_sexp_encode_string (out, ff->priv->uri); } static void diff --git a/mail/em-filter-source-element.c b/mail/em-filter-source-element.c index b95c140c58..b6d518d6d6 100644 --- a/mail/em-filter-source-element.c +++ b/mail/em-filter-source-element.c @@ -32,8 +32,6 @@ #include #include -#include - #include #include @@ -402,7 +400,7 @@ filter_source_element_format_sexp (EFilterElement *fe, { EMFilterSourceElement *fs = (EMFilterSourceElement *) fe; - e_sexp_encode_string (out, fs->priv->active_id); + camel_sexp_encode_string (out, fs->priv->active_id); } static void -- cgit v1.2.3 From 604948f1b5522c020128106eb4466af134648d83 Mon Sep 17 00:00:00 2001 From: Punit Jain Date: Tue, 15 Nov 2011 13:11:55 +0530 Subject: Bug#636214 String changes --- mail/em-account-editor.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c index b196da0715..0ef2378acc 100644 --- a/mail/em-account-editor.c +++ b/mail/em-account-editor.c @@ -2824,8 +2824,8 @@ emae_create_basic_assistant_page (EMAccountEditor *emae, title = _("Sending Email"); label = _("Please enter information about the way you will send mail. If you are not sure, ask your system administrator or Internet Service Provider."); } else if (g_ascii_strcasecmp (page_id, "review_page") == 0) { - title = _("Review Account"); - label = _("Time to check things over before we try and connect to the server and fetch your mail."); + title = _("Account Summary"); + label = _("This is a summary of the settings which will be used to access your mail."); } else if (g_ascii_strcasecmp (page_id, "finish_page") == 0) { page_type = GTK_ASSISTANT_PAGE_CONFIRM; fill_space = TRUE; @@ -4616,9 +4616,9 @@ emae_check_complete (EConfig *ec, gtk_label_set_text (emae->priv->receive_name, url->user); g_object_get (emae->priv->source.settings, "security-method", &method, NULL); if (method == CAMEL_NETWORK_SECURITY_METHOD_SSL_ON_ALTERNATE_PORT) - enc = g_strdup (_("Always(SSL)")); + enc = g_strdup (_("Always (SSL)")); else if (method == CAMEL_NETWORK_SECURITY_METHOD_STARTTLS_ON_STANDARD_PORT) - enc = g_strdup (_("When possible(TLS)")); + enc = g_strdup (_("When possible (TLS)")); else enc = g_strdup (_("Never")); @@ -4632,9 +4632,9 @@ emae_check_complete (EConfig *ec, gtk_label_set_text (emae->priv->send_name, url->user); g_object_get (emae->priv->transport.settings, "security-method", &method, NULL); if (method == CAMEL_NETWORK_SECURITY_METHOD_SSL_ON_ALTERNATE_PORT) - enc = g_strdup (_("Always(SSL)")); + enc = g_strdup (_("Always (SSL)")); else if (method == CAMEL_NETWORK_SECURITY_METHOD_STARTTLS_ON_STANDARD_PORT) - enc = g_strdup (_("When possible(TLS)")); + enc = g_strdup (_("When possible (TLS)")); else enc = g_strdup (_("Never")); -- cgit v1.2.3 From d03f8dfccb680fd4d6595682def3a2b85b626f6f Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Tue, 15 Nov 2011 12:56:01 +0100 Subject: Bug #440316 - Improve SSL Certificate check bad signature dialog --- mail/e-mail-session.c | 58 ++++++++++++++++++++++++++++++++++----------------- mail/mail.error.xml | 18 ---------------- 2 files changed, 39 insertions(+), 37 deletions(-) diff --git a/mail/e-mail-session.c b/mail/e-mail-session.c index 39ccbbba80..7e9508cf93 100644 --- a/mail/e-mail-session.c +++ b/mail/e-mail-session.c @@ -125,10 +125,10 @@ struct _user_message_msg { CamelSessionAlertType type; gchar *prompt; + GSList *button_captions; EFlag *done; - guint allow_cancel : 1; - guint result : 1; + gint result; guint ismain : 1; }; @@ -163,8 +163,8 @@ user_message_response (GtkDialog *dialog, struct _user_message_msg *m) { /* if !allow_cancel, then we've already replied */ - if (m->allow_cancel) { - m->result = button == GTK_RESPONSE_OK; + if (m->button_captions) { + m->result = button; e_flag_set (m->done); } @@ -178,6 +178,8 @@ user_message_exec (struct _user_message_msg *m, { GtkWindow *parent; const gchar *error_type; + gint index; + GSList *iter; if (!m->ismain && user_message_dialog != NULL) { g_queue_push_tail (&user_message_queue, mail_msg_ref (m)); @@ -186,19 +188,13 @@ user_message_exec (struct _user_message_msg *m, switch (m->type) { case CAMEL_SESSION_ALERT_INFO: - error_type = m->allow_cancel ? - "mail:session-message-info-cancel" : - "mail:session-message-info"; + error_type = "mail:session-message-info"; break; case CAMEL_SESSION_ALERT_WARNING: - error_type = m->allow_cancel ? - "mail:session-message-warning-cancel" : - "mail:session-message-warning"; + error_type = "mail:session-message-warning"; break; case CAMEL_SESSION_ALERT_ERROR: - error_type = m->allow_cancel ? - "mail:session-message-error-cancel" : - "mail:session-message-error"; + error_type = "mail:session-message-error"; break; default: error_type = NULL; @@ -211,6 +207,25 @@ user_message_exec (struct _user_message_msg *m, parent, error_type, m->prompt, NULL); g_object_set (user_message_dialog, "resizable", TRUE, NULL); + if (m->button_captions) { + GtkWidget *action_area; + GList *children, *child; + + /* remove all default buttons and keep only those requested */ + action_area = gtk_dialog_get_action_area (GTK_DIALOG (user_message_dialog)); + + children = gtk_container_get_children (GTK_CONTAINER (action_area)); + for (child = children; child != NULL; child = child->next) { + gtk_container_remove (GTK_CONTAINER (action_area), child->data); + } + + g_list_free (children); + } + + for (index = 0, iter = m->button_captions; iter; index++, iter = iter->next) { + gtk_dialog_add_button (GTK_DIALOG (user_message_dialog), iter->data, index); + } + /* XXX This is a case where we need to be able to construct * custom EAlerts without a predefined XML definition. */ if (m->ismain) { @@ -231,6 +246,7 @@ static void user_message_free (struct _user_message_msg *m) { g_free (m->prompt); + g_slist_free_full (m->button_captions, g_free); e_flag_free (m->done); } @@ -915,24 +931,28 @@ mail_session_forget_password (CamelSession *session, return TRUE; } -static gboolean +static gint mail_session_alert_user (CamelSession *session, CamelSessionAlertType type, const gchar *prompt, - gboolean cancel) + GSList *button_captions) { struct _user_message_msg *m; GCancellable *cancellable; - gboolean result = TRUE; + gint result = -1; + GSList *iter; m = mail_msg_new (&user_message_info); m->ismain = mail_in_main_thread (); m->type = type; m->prompt = g_strdup (prompt); m->done = e_flag_new (); - m->allow_cancel = cancel; + m->button_captions = g_slist_copy (button_captions); + + for (iter = m->button_captions; iter; iter = iter->next) + iter->data = g_strdup (iter->data); - if (cancel) + if (g_slist_length (button_captions) > 1) mail_msg_ref (m); cancellable = e_activity_get_cancellable (m->base.activity); @@ -942,7 +962,7 @@ mail_session_alert_user (CamelSession *session, else mail_msg_main_loop_push (m); - if (cancel) { + if (g_slist_length (button_captions) > 1) { e_flag_wait (m->done); result = m->result; mail_msg_unref (m); diff --git a/mail/mail.error.xml b/mail/mail.error.xml index 006cc559a4..f811abb9fd 100644 --- a/mail/mail.error.xml +++ b/mail/mail.error.xml @@ -140,32 +140,14 @@ Many email systems add an Apparently-To header to messages that only have BCC re {0} - - {0} -