/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2002 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2003 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
const gchar *msg,
gpointer data);
-static void inc_put_error (IncState istate);
+static void inc_put_error (IncState istate,
+ const gchar *msg);
static void inc_cancel_cb (GtkWidget *widget,
gpointer data);
if (inc_state != INC_SUCCESS && inc_state != INC_CANCEL) {
error_num++;
- if (inc_state == INC_ERROR ||
- inc_state == INC_IO_ERROR ||
- inc_state == INC_SOCKET_ERROR) {
- inc_put_error(inc_state);
- } else if (inc_state == INC_NO_SPACE) {
- inc_put_error(inc_state);
+ if (inc_dialog->show_dialog)
+ manage_window_focus_in
+ (inc_dialog->dialog->window,
+ NULL, NULL);
+ inc_put_error(inc_state, pop3_session->error_msg);
+ if (inc_dialog->show_dialog)
+ manage_window_focus_out
+ (inc_dialog->dialog->window,
+ NULL, NULL);
+ if (inc_state == INC_NO_SPACE ||
+ inc_state == INC_IO_ERROR)
break;
- }
}
inc_session_destroy(session);
return 0;
}
-static void inc_put_error(IncState istate)
+static void inc_put_error(IncState istate, const gchar *msg)
{
switch (istate) {
case INC_ERROR:
- if (!prefs_common.no_recv_err_panel)
- alertpanel_error
- (_("Error occurred while processing mail."));
+ if (prefs_common.no_recv_err_panel)
+ break;
+ if (msg)
+ alertpanel_error(_("Error occurred while processing mail:\n%s"), msg);
+ else
+ alertpanel_error(_("Error occurred while processing mail."));
break;
case INC_NO_SPACE:
alertpanel_error(_("No disk space left."));
alertpanel_error(_("Can't write file."));
break;
case INC_SOCKET_ERROR:
+ if (prefs_common.no_recv_err_panel)
+ break;
alertpanel_error(_("Socket error."));
break;
case INC_LOCKED:
- if (!prefs_common.no_recv_err_panel)
+ if (prefs_common.no_recv_err_panel)
+ break;
+ if (msg)
+ alertpanel_error(_("Mailbox is locked:\n%s"), msg);
+ else
alertpanel_error(_("Mailbox is locked."));
break;
+ case INC_AUTH_FAILED:
+ if (prefs_common.no_recv_err_panel)
+ break;
+ if (msg)
+ alertpanel_error(_("Authentication failed:\n%s"),
+ msg);
+ else
+ alertpanel_error(_("Authentication failed."));
+ break;
default:
break;
}