/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2001 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2006 Hiroyuki Yamamoto and the Claws Mail 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
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
/* alfons - all folder item specific settings should migrate into
# include "config.h"
#endif
-#include "intl.h"
+#include <glib.h>
+#include <glib/gi18n.h>
+
#include "defs.h"
#include "folder.h"
#include "utils.h"
NULL, NULL, NULL},
{"sort_descending", "FALSE", &tmp_prefs.sort_descending, P_BOOL,
NULL, NULL, NULL},
- /*{"enable_thread", "TRUE", &tmp_prefs.enable_thread, P_BOOL,
- NULL, NULL, NULL},*/
-#if 0
- {"hide_score", "-9999", &tmp_prefs.kill_score, P_INT,
- NULL, NULL, NULL},
- {"important_score", "1", &tmp_prefs.important_score, P_INT,
- NULL, NULL, NULL},
-#endif
/* MIGRATION */
{"request_return_receipt", "", &tmp_prefs.request_return_receipt, P_BOOL,
NULL, NULL, NULL},
NULL, NULL, NULL},
{"default_dictionary", NULL, &tmp_prefs.default_dictionary, P_STRING,
NULL, NULL, NULL},
+ {"enable_default_alt_dictionary", "", &tmp_prefs.enable_default_alt_dictionary, P_BOOL,
+ NULL, NULL, NULL},
+ {"default_alt_dictionary", NULL, &tmp_prefs.default_alt_dictionary, P_STRING,
+ NULL, NULL, NULL},
#endif
{"save_copy_to_folder", NULL, &tmp_prefs.save_copy_to_folder, P_BOOL,
NULL, NULL, NULL},
NULL, NULL, NULL},
{"newmailcheck", "TRUE", &tmp_prefs.newmailcheck, P_BOOL,
NULL, NULL, NULL},
+ {"offlinesync", "FALSE", &tmp_prefs.offlinesync, P_BOOL,
+ NULL, NULL, NULL},
{NULL, NULL, NULL, P_OTHER, NULL, NULL, NULL}
};
void folder_item_prefs_read_config(FolderItem * item)
{
gchar * id;
+ gchar *rcpath;
id = folder_item_get_identifier(item);
folder_item_prefs_clear(&tmp_prefs);
- prefs_read_config(param, id, FOLDERITEM_RC);
+ rcpath = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, FOLDERITEM_RC, NULL);
+ prefs_read_config(param, id, rcpath, NULL);
g_free(id);
+ g_free(rcpath);
*item->prefs = tmp_prefs;
id = folder_item_get_identifier(item);
- prefs_save_config(param, id, FOLDERITEM_RC);
+ prefs_write_config(param, id, FOLDERITEM_RC);
g_free(id);
/* MIGRATION: make sure migrated items are not saved
prefs->processing = NULL;
prefs->newmailcheck = TRUE;
+ prefs->offlinesync = FALSE;
return prefs;
}
void folder_item_prefs_free(FolderItemPrefs * prefs)
{
- if (prefs->default_to)
- g_free(prefs->default_to);
- if (prefs->default_reply_to)
- g_free(prefs->default_reply_to);
+ g_free(prefs->default_to);
+ g_free(prefs->default_reply_to);
g_free(prefs);
}
tmp_prefs.sort_descending = src->prefs->sort_descending;
tmp_prefs.enable_thread = src->prefs->enable_thread;
tmp_prefs.enable_processing = src->prefs->enable_processing;
- tmp_prefs.newmailcheck = src->prefs->newmailcheck;
+ tmp_prefs.newmailcheck = src->prefs->newmailcheck;
+ tmp_prefs.offlinesync = src->prefs->offlinesync;
prefs_matcher_read_config();
tmp_prefs.enable_default_to = src->prefs->enable_default_to;
tmp_prefs.default_to = g_strdup(src->prefs->default_to);
tmp_prefs.enable_default_reply_to = src->prefs->enable_default_reply_to;
- tmp_prefs.default_reply_to = src->prefs->default_reply_to;
+ tmp_prefs.default_reply_to = g_strdup(src->prefs->default_reply_to);
tmp_prefs.enable_simplify_subject = src->prefs->enable_simplify_subject;
tmp_prefs.simplify_subject_regexp = g_strdup(src->prefs->simplify_subject_regexp);
tmp_prefs.enable_folder_chmod = src->prefs->enable_folder_chmod;
#if USE_ASPELL
tmp_prefs.enable_default_dictionary = src->prefs->enable_default_dictionary;
tmp_prefs.default_dictionary = g_strdup(src->prefs->default_dictionary);
+ tmp_prefs.enable_default_alt_dictionary = src->prefs->enable_default_alt_dictionary;
+ tmp_prefs.default_alt_dictionary = g_strdup(src->prefs->default_alt_dictionary);
#endif
tmp_prefs.save_copy_to_folder = src->prefs->save_copy_to_folder;
tmp_prefs.color = src->prefs->color;