2 * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3 * Copyright (C) 1999-2006 Hiroyuki Yamamoto and the Claws Mail team
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 #ifndef __PREFS_COMMON_H__
21 #define __PREFS_COMMON_H__
29 #include "mainwindow.h"
30 #include "summaryview.h"
31 #include "folderview.h"
35 #include "prefs_msg_colors.h"
37 typedef struct _PrefsCommon PrefsCommon;
49 } ComposeDndInsertOrAttach;
56 } TransferEncodingMethod;
60 /* SEND_DIALOG_ACTIVE would be irrelevant */
66 /* U = unread, N = new, M = marked */
67 SELECTONENTRY_NOTHING,
78 NEXTUNREADMSGDIALOG_ALWAYS,
79 NEXTUNREADMSGDIALOG_ASSUME_YES,
80 NEXTUNREADMSGDIALOG_ASSUME_NO
81 } NextUnreadMsgDialogShow;
88 gboolean scan_all_after_inc;
89 gboolean autochk_newmail;
91 gboolean chk_on_startup;
92 gboolean open_inbox_on_inc;
93 gboolean newmail_notify_auto;
94 gboolean newmail_notify_manu;
95 gchar *newmail_notify_cmd;
96 RecvDialogMode recv_dialog_mode;
97 gint receivewin_width;
98 gint receivewin_height;
99 gboolean close_recv_dialog;
100 gboolean no_recv_err_panel;
104 gboolean confirm_send_queued_messages;
105 SendDialogMode send_dialog_mode;
108 gchar *outgoing_charset;
109 TransferEncodingMethod encoding_method;
111 gboolean allow_jisx0201_kana;
116 gboolean linewrap_quote;
117 gboolean linewrap_pastes;
119 gboolean auto_exteditor;
120 gboolean reply_account_autosel;
121 gboolean default_reply_list;
122 gboolean forward_account_autosel;
123 gboolean reedit_account_autosel;
126 gint autosave_length;
127 gboolean compose_no_markup;
128 ComposeDndInsertOrAttach compose_dnd_mode;
129 gboolean compose_with_format;
130 gchar *compose_subject_format;
131 gchar *compose_body_format;
134 gboolean reply_with_quote;
139 gboolean forward_as_attachment;
140 gboolean redirect_keep_from;
141 gboolean block_cursor;
145 gboolean enable_aspell;
148 gchar *alt_dictionary;
149 gulong misspelled_col;
151 gboolean check_while_typing;
152 gboolean recheck_when_changing_dict;
153 gboolean use_alternate;
154 gboolean use_both_dicts;
159 gchar *widgetfont_gtk1;
160 gchar *textfont_gtk1;
161 gchar *normalfont_gtk1;
162 gchar *boldfont_gtk1;
163 gchar *smallfont_gtk1;
174 ColorlabelPrefs custom_colorlabel[COLORLABELS];
177 gboolean display_img;
182 gboolean display_folder_unread;
185 gboolean show_searchbar;
186 gboolean expand_thread;
188 gboolean use_addr_book;
191 gboolean use_stripes_everywhere;
192 gboolean use_stripes_in_summaries; /* overrides if use_stripes_everywhere is set to TRUE */
193 gint stripes_color_offset;
194 gboolean enable_dotted_lines;
195 gboolean enable_hscrollbar;
196 gboolean bold_unread;
197 gboolean enable_thread;
198 gboolean thread_by_subject;
199 gint thread_by_subject_max_age; /*!< Max. age of a thread which was threaded
200 * by subject (days) */
202 ToolbarStyle toolbar_style;
203 gboolean toolbar_detachable;
204 gboolean show_statusbar;
206 gint folderview_vscrollbar_policy;
212 gint important_score;
215 GSList *actions_list;
217 /* Summary columns visibility, position and size */
218 gboolean summary_col_visible[N_SUMMARY_COLS];
219 gint summary_col_pos[N_SUMMARY_COLS];
220 gint summary_col_size[N_SUMMARY_COLS];
222 gboolean folder_col_visible[N_FOLDER_COLS];
223 gint folder_col_pos[N_FOLDER_COLS];
224 gint folder_col_size[N_FOLDER_COLS];
226 /* Widget visibility, position and size */
229 gint folderview_width;
230 gint folderview_height;
231 gboolean folderview_visible;
233 gint summaryview_width;
234 gint summaryview_height;
240 gboolean msgview_visible;
245 gint mainview_height;
254 gint sourcewin_width;
255 gint sourcewin_height;
263 gboolean enable_color;
264 gboolean enable_bgcolor;
265 gulong quote_level1_col;
266 gulong quote_level2_col;
267 gulong quote_level3_col;
268 gulong quote_level1_bgcol;
269 gulong quote_level2_bgcol;
270 gulong quote_level3_bgcol;
272 gulong tgt_folder_col;
273 gulong signature_col;
274 gboolean recycle_quote_colors;
275 gboolean display_header_pane;
276 gboolean display_header;
277 gboolean display_xface;
279 gboolean render_html;
280 gboolean invoke_plugin_on_html;
281 gboolean textview_cursor_visible;
282 gboolean enable_smooth_scroll;
284 gboolean scroll_halfpage;
285 gboolean respect_flowed_format;
287 gboolean show_other_header;
288 gboolean use_different_print_font;
289 GSList *disphdr_list;
291 gboolean attach_desc;
294 gchar *mime_textviewer;
295 gchar *mime_open_cmd;
296 gchar *attach_save_dir;
297 gchar *attach_load_dir;
299 GList *mime_open_cmd_history;
303 gboolean auto_check_signatures;
304 gboolean gpg_signature_popup;
305 gboolean store_passphrase;
306 gint store_passphrase_timeout;
307 gboolean passphrase_grab;
308 gboolean gpg_warning;
309 #endif /* USE_GPGME */
312 gboolean addressbook_use_editaddress_dialog;
317 gint statusbar_update_step;
318 gboolean emulate_emacs;
319 gboolean always_show_msg;
320 gboolean mark_as_read_on_new_window;
321 gboolean mark_as_read_delay;
322 gboolean immediate_exec;
323 SelectOnEntry select_on_entry;
324 NextUnreadMsgDialogShow next_unread_msg_dialog;
325 gboolean add_address_by_click;
326 gchar *pixmap_theme_path;
327 int hover_timeout; /* msecs mouse hover timeout */
328 gboolean ask_mark_all_read;
329 gboolean ask_apply_per_account_filtering_rules;
330 gint apply_per_account_filtering_rules;
335 gchar *ext_editor_cmd;
339 gulong log_msg_color;
340 gulong log_warn_color;
341 gulong log_error_color;
343 gulong log_out_color;
345 gboolean confirm_on_exit;
346 gboolean clean_on_exit;
347 gboolean ask_on_clean;
348 gboolean warn_queued_on_exit;
350 gint io_timeout_secs;
353 gint cache_max_mem_usage;
354 gint cache_min_keep_time;
356 /* boolean for work offline
357 stored here for use in inc.c */
358 gboolean work_offline;
360 gint summary_quicksearch_type;
361 gint summary_quicksearch_sticky;
362 gint summary_quicksearch_recurse;
363 gint summary_quicksearch_dynamic;
366 GList *summary_quicksearch_history;
367 GList *summary_search_from_history;
368 GList *summary_search_to_history;
369 GList *summary_search_subject_history;
370 GList *summary_search_body_history;
371 GList *summary_search_adv_condition_history;
372 GList *message_search_history;
374 gint filteringwin_width;
375 gint filteringwin_height;
376 gint filteringactionwin_width;
377 gint filteringactionwin_height;
378 gint matcherwin_width;
379 gint matcherwin_height;
380 gint templateswin_width;
381 gint templateswin_height;
382 gint actionswin_width;
383 gint actionswin_height;
384 gint addressbookwin_width;
385 gint addressbookwin_height;
386 gint addressbookeditpersonwin_width;
387 gint addressbookeditpersonwin_height;
388 gint addressbookeditgroupwin_width;
389 gint addressbookeditgroupwin_height;
390 gint pluginswin_width;
391 gint pluginswin_height;
393 gint prefswin_height;
394 gint folderitemwin_width;
395 gint folderitemwin_height;
396 gint editaccountwin_width;
397 gint editaccountwin_height;
398 gint accountswin_width;
399 gint accountswin_height;
402 gint folderselwin_width;
403 gint folderselwin_height;
404 gint addressaddwin_width;
405 gint addressaddwin_height;
406 gint addressbook_folderselwin_width;
407 gint addressbook_folderselwin_height;
410 gint broken_are_utf8;
411 gint skip_ssl_cert_check;
412 gint live_dangerously;
413 gint never_send_retrcpt;
415 gboolean unsafe_ssl_certs;
418 extern PrefsCommon prefs_common;
420 void prefs_common_read_config (void);
421 void prefs_common_write_config (void);
422 void prefs_common_open (void);
423 PrefsCommon *prefs_common_get (void);
424 void pref_get_unescaped_pref(gchar *out, const gchar *in);
425 void pref_get_escaped_pref(gchar *out, const gchar *in);
426 void pref_set_textview_from_pref(GtkTextView *textview, const gchar *txt);
427 void pref_set_entry_from_pref(GtkEntry *entry, const gchar *txt);
428 gchar *pref_get_pref_from_textview(GtkTextView *textview);
429 gchar *pref_get_pref_from_entry(GtkEntry *entry);
431 #endif /* __PREFS_COMMON_H__ */