#include "prefswindow.h"
#include "colorlabel.h"
#include "passwordstore.h"
-#include "safe_fclose.h"
+#include "file-utils.h"
#ifndef USE_ALT_ADDRBOOK
#include "addrcustomattr.h"
{"bold_unread", "TRUE", &prefs_common.bold_unread, P_BOOL,
NULL, NULL, NULL},
- {"enable_thread", "TRUE", &prefs_common.enable_thread, P_BOOL,
- NULL, NULL, NULL},
#ifndef GENERIC_UMPC
{"toolbar_style", "3", &prefs_common.toolbar_style, P_ENUM,
NULL, NULL, NULL},
{"folder_col_size_total", "32",
&prefs_common.folder_col_size[F_COL_TOTAL], P_INT, NULL, NULL, NULL},
#endif
+
+ {"folder_default_thread", "TRUE", &prefs_common.folder_default_thread, P_BOOL,
+ NULL, NULL, NULL},
+ {"folder_default_thread_collapsed", "FALSE", &prefs_common.folder_default_thread_collapsed, P_BOOL,
+ NULL, NULL, NULL},
+ {"folder_default_hide_read_threads", "FALSE", &prefs_common.folder_default_hide_read_threads, P_BOOL,
+ NULL, NULL, NULL},
+ {"folder_default_hide_read_msgs", "FALSE", &prefs_common.folder_default_hide_read_msgs, P_BOOL,
+ NULL, NULL, NULL},
+ {"folder_default_hide_del_msgs", "FALSE", &prefs_common.folder_default_hide_del_msgs, P_BOOL,
+ NULL, NULL, NULL},
+
{"summaryview_width", "500", &prefs_common.summaryview_width, P_INT,
NULL, NULL, NULL},
{"summaryview_height", "244", &prefs_common.summaryview_height, P_INT,
path = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, history,
NULL);
}
- if ((fp = g_fopen(path, "rb")) == NULL) {
- if (ENOENT != errno) FILE_OP_ERROR(path, "fopen");
+ if ((fp = claws_fopen(path, "rb")) == NULL) {
+ if (ENOENT != errno) FILE_OP_ERROR(path, "claws_fopen");
g_free(path);
/* returns default list if set, otherwise NULL */
return default_list;
}
g_free(path);
- while (fgets(buf, sizeof(buf), fp) != NULL) {
+ while (claws_fgets(buf, sizeof(buf), fp) != NULL) {
g_strstrip(buf);
if (buf[0] == '\0') continue;
tmp = add_history(tmp, buf);
}
- fclose(fp);
+ claws_fclose(fp);
tmp = g_list_reverse(tmp);
}
tmp_path = g_strconcat(path, ".tmp", NULL);
- if ((fp = g_fopen(tmp_path, "wb")) == NULL) {
- FILE_OP_ERROR(tmp_path, "fopen");
+ if ((fp = claws_fopen(tmp_path, "wb")) == NULL) {
+ FILE_OP_ERROR(tmp_path, "claws_fopen");
goto out;
}
for (cur = list; cur != NULL; cur = cur->next) {
- TRY(fputs((gchar *)cur->data, fp) != EOF &&
- fputc('\n', fp) != EOF);
+ TRY(claws_fputs((gchar *)cur->data, fp) != EOF &&
+ claws_fputc('\n', fp) != EOF);
}
- if (safe_fclose(fp) == EOF) {
- FILE_OP_ERROR(tmp_path, "fclose");
+ if (claws_safe_fclose(fp) == EOF) {
+ FILE_OP_ERROR(tmp_path, "claws_fclose");
fp = NULL;
goto out;
}
out:
if (fp)
- safe_fclose(fp);
+ claws_safe_fclose(fp);
g_free(tmp_path);
g_free(path);
}