/*
* 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 (!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();
gchar *mbox;
gint result;
- if (account->inbox) {
- inbox = folder_find_item_from_path(account->inbox);
+ if (account->local_inbox) {
+ inbox = folder_find_item_from_identifier(account->local_inbox);
if (!inbox)
inbox = folder_get_default_inbox();
} else
{
static time_t overridden_yes = 0;
static time_t overridden_no = 0;
- int length = 600;
- gboolean answer = TRUE;
+ int length = 10; /* minutes */
+ gint answer = G_ALERTDEFAULT;
if (prefs_common.autochk_newmail)
- length = prefs_common.autochk_itv;
+ length = prefs_common.autochk_itv; /* minutes */
if (prefs_common.work_offline) {
- gchar *tmp = g_strdup_printf(
- _("You're working offline. Override for %d minutes?"),
- length);
- if (time(NULL) - overridden_yes < length * 10)
+ gchar *tmp = NULL;
+
+ if (time(NULL) - overridden_yes < length * 60) /* seconds */
return TRUE;
- else if (time(NULL) - overridden_no < length * 10)
+ else if (time(NULL) - overridden_no < length * 60) /* seconds */
return FALSE;
-
- answer = (alertpanel(_("Offline warning"),
+
+ tmp = g_strdup_printf(
+ _("You're working offline. Override for %d minutes?"),
+ length);
+
+ answer = alertpanel(_("Offline warning"),
tmp,
- GTK_STOCK_YES, GTK_STOCK_NO, NULL) == G_ALERTDEFAULT);
+ GTK_STOCK_NO, "+" GTK_STOCK_YES, _("On_ly once"));
g_free(tmp);
- if (answer == TRUE)
+ if (answer == G_ALERTALTERNATE) {
overridden_yes = time(NULL);
- else
+ return TRUE;
+ } else if (answer == G_ALERTDEFAULT) {
overridden_no = time(NULL);
+ return FALSE;
+ } else {
+ overridden_yes = (time_t)0;
+ overridden_no = (time_t)0;
+ return TRUE;
+ }
}
- return answer;
+ return TRUE;
}