/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2004 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2006 Hiroyuki Yamamoto and the Sylpheed-Claws team
*
* 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
if (inc_lock_count) return;
- if (prefs_common.work_offline && !inc_offline_should_override())
+ if (prefs_common.work_offline &&
+ !inc_offline_should_override(
+ _("Sylpheed-Claws needs network access in order "
+ "to get mails.")))
return;
inc_lock();
if (inc_lock_count) return 0;
- if (prefs_common.work_offline && !inc_offline_should_override())
+ if (prefs_common.work_offline &&
+ !inc_offline_should_override(
+ _("Sylpheed-Claws needs network access in order "
+ "to get mails.")))
return 0;
inc_autocheck_timer_remove();
gint new_msgs = 0;
gint account_new_msgs = 0;
- if (prefs_common.work_offline && !inc_offline_should_override())
+ if (prefs_common.work_offline &&
+ !inc_offline_should_override(
+ _("Sylpheed-Claws needs network access in order "
+ "to get mails.")))
return;
if (inc_lock_count) return;
if (!pop3_session->ac_prefs->filter_on_recv ||
!procmsg_msginfo_filter(msginfo))
folder_item_move_msg(inbox, msginfo);
+ }
+ filtering_move_and_copy_msgs(msglist);
+ for(msglist_element = msglist; msglist_element != NULL;
+ msglist_element = msglist_element->next) {
+ MsgInfo *msginfo = (MsgInfo *)msglist_element->data;
procmsg_msginfo_free(msginfo);
}
folder_item_update_thaw();
progress_dialog_set_label(inc_dialog->dialog, fin_msg);
-#if 0
- if (error_num && !prefs_common.no_recv_err_panel) {
- if (inc_dialog->show_dialog)
- manage_window_focus_in(inc_dialog->dialog->window,
- NULL, NULL);
- alertpanel_error_log(_("Some errors occurred while getting mail."));
- if (inc_dialog->show_dialog)
- manage_window_focus_out(inc_dialog->dialog->window,
- NULL, NULL);
- }
-#endif
-
while (inc_dialog->queue_list != NULL) {
session = inc_dialog->queue_list->data;
inc_session_destroy(session);
break;
case POP3_RETR:
case POP3_RETR_RECV:
- break;
case POP3_DELETE:
-#if 0
- if (session->msg[session->cur_msg].recv_time <
- session->current_time) {
- gchar buf[MSGBUFSIZE];
- g_snprintf(buf, sizeof(buf), _("Deleting message %d"),
- session->cur_msg);
- progress_dialog_set_label(dialog, buf);
- }
-#endif
break;
case POP3_LOGOUT:
progress_dialog_set_label(dialog, _("Quitting"));
return FALSE;
}
-gboolean inc_offline_should_override(void)
+gboolean inc_offline_should_override(const gchar *msg)
{
static time_t overridden_yes = 0;
static time_t overridden_no = 0;
if (time(NULL) - overridden_yes < length * 60) /* seconds */
return TRUE;
- else if (time(NULL) - overridden_no < length * 60) /* seconds */
+ else if (time(NULL) - overridden_no < 3) /* seconds */
return FALSE;
tmp = g_strdup_printf(
- _("You're working offline. Override for %d minutes?"),
+ _("%s%sYou're working offline. Override for %d minutes?"),
+ msg?msg:"",
+ msg?"\n\n":"",
length);
answer = alertpanel(_("Offline warning"),
tmp,
- GTK_STOCK_YES, GTK_STOCK_NO, _("On_ly once"));
+ GTK_STOCK_NO, "+" GTK_STOCK_YES, _("On_ly once"));
g_free(tmp);
- if (answer == G_ALERTDEFAULT) {
+ if (answer == G_ALERTALTERNATE) {
overridden_yes = time(NULL);
return TRUE;
- } else if (answer == G_ALERTALTERNATE) {
+ } else if (answer == G_ALERTDEFAULT) {
overridden_no = time(NULL);
return FALSE;
} else {