GdkEventAny *event,
gpointer data);
-static gint inc_spool (void);
static gint get_spool (FolderItem *dest,
const gchar *mbox);
inc_autocheck_timer_set();
return;
}
-
- if (prefs_common.inc_local) {
- account_new_msgs = inc_spool();
- if (account_new_msgs > 0)
- new_msgs += account_new_msgs;
- }
} else {
- if (prefs_common.inc_local) {
- account_new_msgs = inc_spool();
- if (account_new_msgs > 0)
- new_msgs += account_new_msgs;
- }
-
account_new_msgs = inc_account_mail(cur_account, mainwin);
if (account_new_msgs > 0)
new_msgs += account_new_msgs;
inc_autocheck_timer_remove();
main_window_lock(mainwin);
- if (prefs_common.inc_local) {
- account_new_msgs = inc_spool();
- if (account_new_msgs > 0)
- new_msgs += account_new_msgs;
- }
-
list = account_get_list();
if (!list) {
inc_finished(mainwin, new_msgs > 0);
return TRUE;
}
-static gint inc_spool(void)
+static gint inc_spool_account(PrefsAccount *account)
{
+ FolderItem *inbox;
gchar *mbox, *logname;
- gint msgs;
logname = g_get_user_name();
- mbox = g_strconcat(prefs_common.spool_path
- ? prefs_common.spool_path : DEFAULT_SPOOL_PATH,
- G_DIR_SEPARATOR_S, logname, NULL);
- msgs = get_spool(folder_get_default_inbox(), mbox);
- g_free(mbox);
-
- return msgs;
-}
-
-static gint inc_spool_account(PrefsAccount *account)
-{
- FolderItem *inbox;
if (account->inbox) {
inbox = folder_find_item_from_path(account->inbox);
} else
inbox = folder_get_default_inbox();
- return get_spool(inbox, account->local_mbox);
+ mbox = g_strconcat(account->local_mbox,
+ G_DIR_SEPARATOR_S, logname, NULL);
+
+ return get_spool(inbox, mbox);
}
static gint inc_all_spool(void)
&receive.entry_incext,
prefs_set_data_from_entry, prefs_set_entry},
- {"inc_local", "TRUE", &prefs_common.inc_local, P_BOOL,
- &receive.checkbtn_local,
- prefs_set_data_from_toggle, prefs_set_toggle},
- {"filter_on_inc_local", "TRUE", &prefs_common.filter_on_inc, P_BOOL,
- &receive.checkbtn_filter_on_inc,
- prefs_set_data_from_toggle, prefs_set_toggle},
- {"spool_path", DEFAULT_SPOOL_PATH, &prefs_common.spool_path, P_STRING,
- &receive.entry_spool,
- prefs_set_data_from_entry, prefs_set_entry},
-
{"autochk_newmail", "FALSE", &prefs_common.autochk_newmail, P_BOOL,
&receive.checkbtn_autochk,
prefs_set_data_from_toggle, prefs_set_toggle},
gtk_box_pack_start (GTK_BOX (hbox), button_incext, FALSE, FALSE, 0);
#endif
- PACK_FRAME(vbox1, frame_spool, _("Local spool"));
-
- vbox2 = gtk_vbox_new (FALSE, VSPACING_NARROW);
- gtk_widget_show (vbox2);
- gtk_container_add (GTK_CONTAINER (frame_spool), vbox2);
- gtk_container_set_border_width (GTK_CONTAINER (vbox2), 8);
-
- hbox = gtk_hbox_new (FALSE, 32);
- gtk_widget_show (hbox);
- gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
-
- PACK_CHECK_BUTTON (hbox, checkbtn_local, _("Incorporate from spool"));
- PACK_CHECK_BUTTON (hbox, checkbtn_filter_on_inc,
- _("Filter on incorporation"));
- SET_TOGGLE_SENSITIVITY (checkbtn_local, checkbtn_filter_on_inc);
-
- hbox = gtk_hbox_new (FALSE, 8);
- gtk_widget_show (hbox);
- gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
- SET_TOGGLE_SENSITIVITY (checkbtn_local, hbox);
-
- label_spool = gtk_label_new (_("Spool directory"));
- gtk_widget_show (label_spool);
- gtk_box_pack_start (GTK_BOX (hbox), label_spool, FALSE, FALSE, 0);
-
- entry_spool = gtk_entry_new ();
- gtk_widget_show (entry_spool);
- gtk_box_pack_start (GTK_BOX (hbox), entry_spool, TRUE, TRUE, 0);
-
vbox2 = gtk_vbox_new (FALSE, 0);
gtk_widget_show (vbox2);
gtk_box_pack_start (GTK_BOX (vbox1), vbox2, FALSE, FALSE, 0);
receive.entry_incext = entry_incext;
/* receive.button_incext = button_incext; */
- receive.checkbtn_local = checkbtn_local;
- receive.checkbtn_filter_on_inc = checkbtn_filter_on_inc;
- receive.entry_spool = entry_spool;
-
receive.checkbtn_autochk = checkbtn_autochk;
receive.spinbtn_autochk = spinbtn_autochk;
receive.spinbtn_autochk_adj = spinbtn_autochk_adj;