[Xfce4-commits] <postler:master> Render authenticity error also for sending

Christian Dywan noreply at xfce.org
Wed Feb 16 02:08:02 CET 2011


Updating branch refs/heads/master
         to 9b20a405b86db3ac847c2edeaa35a6d2bf328490 (commit)
       from f641c089ee0e268f8d0bdfdf4f9d3310bf0a188d (commit)

commit 9b20a405b86db3ac847c2edeaa35a6d2bf328490
Author: Christian Dywan <christian at twotoasts.de>
Date:   Wed Feb 16 01:54:43 2011 +0100

    Render authenticity error also for sending

 postler/postler-service.vala |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/postler/postler-service.vala b/postler/postler-service.vala
index a662f07..69912fc 100644
--- a/postler/postler-service.vala
+++ b/postler/postler-service.vala
@@ -31,6 +31,10 @@ namespace Postler {
                 Pid pid;
                 int out_fd, err_fd;
                 Shell.parse_argv (command, out argv);
+                /* Enforce untranslated output */
+                Environment.set_variable ("LANG", "", true);
+                Environment.set_variable ("LC_ALL", "", true);
+                Environment.set_variable ("LANGUAGE", "", true);
                 Process.spawn_async_with_pipes (null, argv, null,
                     SpawnFlags.SEARCH_PATH,
                     null, out pid, null, out out_fd, out err_fd);
@@ -335,9 +339,11 @@ namespace Postler {
                 foreach (var info in accounts.get_infos ())
                     if (info.name == account) {
                         string command = accounts.get_send_command (info, filename);
-                        var helper = new HelperProcess ();
+                        var helper = new HelperProcess (info.display_name, info.unverified);
                         helper.line_read.connect ((line, is_error) => {
-                            if (is_error)
+                            if ("TLS certificate verification failed" in line)
+                                helper.finnish (_("Can't verify mail server authenticity."));
+                            else if (is_error)
                                 helper.finnish (line);
                         });
                         helper.done.connect ((error_message) => {



More information about the Xfce4-commits mailing list