if (prefs_common.open_inbox_on_inc) {
item = cur_account && cur_account->inbox
- ? folder_find_item_from_path(cur_account->inbox)
+ ? folder_find_item_from_identifier(cur_account->inbox)
: folder_get_default_inbox();
if (FOLDER_SUMMARY_MISMATCH(item, mainwin->summaryview)) {
folderview_unselect(mainwin->folderview);
if (inc_lock_count) return;
+ if (prefs_common.work_offline)
+ if (alertpanel(_("Offline warning"),
+ _("You're working offline. Override?"),
+ _("Yes"), _("No"), NULL) != G_ALERTDEFAULT)
+ return;
+
inc_autocheck_timer_remove();
summary_write_cache(mainwin->summaryview);
main_window_lock(mainwin);
GList *list, *queue_list = NULL;
IncProgressDialog *inc_dialog;
gint new_msgs = 0;
+
+ if (prefs_common.work_offline)
+ if (alertpanel(_("Offline warning"),
+ _("You're working offline. Override?"),
+ _("Yes"), _("No"), NULL) != G_ALERTDEFAULT)
+ return;
if (inc_lock_count) return;
/* CLAWS: get default inbox (perhaps per account) */
if (state->ac_prefs->inbox) {
/* CLAWS: get destination folder / mailbox */
- inbox = folder_find_item_from_identifier(state->ac_prefs->inbox);
+ inbox = folder_find_item_from_identifier
+ (state->ac_prefs->inbox);
if (!inbox)
inbox = folder_get_default_inbox();
} else
else
buf = g_strdup(prefs_common.newmail_notify_cmd);
- system(buf);
+ execute_command_line(buf, TRUE);
g_free(buf);
}
static void inc_autocheck_timer_set_interval(guint interval)
{
inc_autocheck_timer_remove();
-
- if (prefs_common.autochk_newmail && autocheck_data) {
+ /* last test is to avoid re-enabling auto_check after modifying
+ the common preferences */
+ if (prefs_common.autochk_newmail && autocheck_data
+ && prefs_common.work_offline == FALSE) {
autocheck_timer = gtk_timeout_add
(interval, inc_autocheck_func, autocheck_data);
debug_print("added timer = %d\n", autocheck_timer);