2004-09-07 [colin] 0.9.12cvs97
authorColin Leroy <colin@colino.net>
Tue, 7 Sep 2004 15:12:58 +0000 (15:12 +0000)
committerColin Leroy <colin@colino.net>
Tue, 7 Sep 2004 15:12:58 +0000 (15:12 +0000)
* src/inc.c
Change session error messages so that they
are a bit more helpful (the origin of the
error is not apparent if one isn't in
front of Sylpheed when it happens).

ChangeLog.claws
PATCHSETS
configure.ac
src/inc.c

index eb61020..272b0f4 100644 (file)
@@ -1,3 +1,11 @@
+2004-09-07 [colin]     0.9.12cvs97
+
+       * src/inc.c
+               Change session error messages so that they
+               are a bit more helpful (the origin of the
+               error is not apparent if one isn't in 
+               front of Sylpheed when it happens).
+
 2004-09-06 [colin]     0.9.12cvs96
 
        * src/toolbar.c
index fc34d2c..4cb0860 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
@@ -79,3 +79,4 @@
 ( cvs diff -u -r 1.70 -r 1.71 src/addressbook.c; cvs diff -u -r 1.5 -r 1.6 src/addressitem.h; cvs diff -u -r 1.14 -r 1.15 src/addritem.c; cvs diff -u -r 1.13 -r 1.14 src/addritem.h; ) > 0.9.12cvs94.patchset
 ( cvs diff -u -r 1.445 -r 1.446 src/summaryview.c; cvs diff -u -r 1.125 -r 1.126 src/mimeview.c; ) > 0.9.12cvs95.patchset
 ( cvs diff -u -r 1.54 -r 1.55 src/toolbar.c; ) > 0.9.12cvs96.patchset
+( cvs diff -u -r 1.175 -r 1.176 src/inc.c; ) > 0.9.12cvs97.patchset
index 00626b5..074ac94 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=12
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=96
+EXTRA_VERSION=97
 EXTRA_RELEASE=
 
 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
index f9191dc..a7c55e4 100644 (file)
--- a/src/inc.c
+++ b/src/inc.c
@@ -123,7 +123,7 @@ static gint inc_drop_message                (Pop3Session    *session,
                                         const gchar    *file);
 
 static void inc_put_error              (IncState        istate,
-                                        const gchar    *msg);
+                                        Pop3Session    *session);
 
 static void inc_cancel_cb              (GtkWidget      *widget,
                                         gpointer        data);
@@ -660,7 +660,7 @@ static gint inc_start(IncProgressDialog *inc_dialog)
                                manage_window_focus_in
                                        (inc_dialog->dialog->window,
                                         NULL, NULL);
-                       inc_put_error(inc_state, pop3_session->error_msg);
+                       inc_put_error(inc_state, pop3_session);
                        if (inc_dialog->show_dialog)
                                manage_window_focus_out
                                        (inc_dialog->dialog->window,
@@ -1075,7 +1075,7 @@ static gint inc_drop_message(Pop3Session *session, const gchar *file)
        return 0;
 }
 
-static void inc_put_error(IncState istate, const gchar *msg)
+static void inc_put_error(IncState istate, Pop3Session *session)
 {
        gchar *log_msg = NULL;
        gchar *err_msg = NULL;
@@ -1086,16 +1086,18 @@ static void inc_put_error(IncState istate, const gchar *msg)
                log_msg = _("Connection failed.");
                if (prefs_common.no_recv_err_panel)
                        break;
-               err_msg = g_strdup(log_msg);
+               err_msg = g_strdup_printf(_("Connection to %s:%d failed."),
+                                         SESSION(session)->server, 
+                                         SESSION(session)->port);
                break;
        case INC_ERROR:
                log_msg = _("Error occurred while processing mail.");
                if (prefs_common.no_recv_err_panel)
                        break;
-               if (msg)
+               if (session->error_msg)
                        err_msg = g_strdup_printf
                                (_("Error occurred while processing mail:\n%s"),
-                                msg);
+                                session->error_msg);
                else
                        err_msg = g_strdup(log_msg);
                break;
@@ -1113,21 +1115,25 @@ static void inc_put_error(IncState istate, const gchar *msg)
                log_msg = _("Socket error.");
                if (prefs_common.no_recv_err_panel)
                        break;
-               err_msg = g_strdup(log_msg);
+               err_msg = g_strdup_printf(_("Socket error on connection to %s:%d."),
+                                         SESSION(session)->server, 
+                                         SESSION(session)->port);
                break;
        case INC_EOF:
                log_msg = _("Connection closed by the remote host.");
                if (prefs_common.no_recv_err_panel)
                        break;
-               err_msg = g_strdup(log_msg);
+               err_msg = g_strdup_printf(_("Connection to %s:%d closed by the remote host."), 
+                                         SESSION(session)->server, 
+                                         SESSION(session)->port);
                break;
        case INC_LOCKED:
                log_msg = _("Mailbox is locked.");
                if (prefs_common.no_recv_err_panel)
                        break;
-               if (msg)
+               if (session->error_msg)
                        err_msg = g_strdup_printf(_("Mailbox is locked:\n%s"),
-                                                 msg);
+                                                 session->error_msg);
                else
                        err_msg = g_strdup(log_msg);
                break;
@@ -1135,9 +1141,9 @@ static void inc_put_error(IncState istate, const gchar *msg)
                log_msg = _("Authentication failed.");
                if (prefs_common.no_recv_err_panel)
                        break;
-               if (msg)
+               if (session->error_msg)
                        err_msg = g_strdup_printf
-                               (_("Authentication failed:\n%s"), msg);
+                               (_("Authentication failed:\n%s"), session->error_msg);
                else
                        err_msg = g_strdup(log_msg);
                break;
@@ -1145,7 +1151,9 @@ static void inc_put_error(IncState istate, const gchar *msg)
                log_msg = _("Session timed out.");
                if (prefs_common.no_recv_err_panel)
                        break;
-               err_msg = g_strdup(log_msg);
+               err_msg = g_strdup_printf(_("Connection to %s:%d timed out."), 
+                                         SESSION(session)->server, 
+                                         SESSION(session)->port);
                break;
        default:
                break;