2 * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3 * Copyright (C) 1999-2007 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 3 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, see <http://www.gnu.org/licenses/>.
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,
79 ACTION_UNSET = 0, /* for backward compatibility */
90 NEXTUNREADMSGDIALOG_ALWAYS,
91 NEXTUNREADMSGDIALOG_ASSUME_YES,
92 NEXTUNREADMSGDIALOG_ASSUME_NO
93 } NextUnreadMsgDialogShow;
100 gboolean scan_all_after_inc;
101 gboolean autochk_newmail;
103 gboolean chk_on_startup;
104 gboolean open_inbox_on_inc;
105 gboolean newmail_notify_auto;
106 gboolean newmail_notify_manu;
107 gchar *newmail_notify_cmd;
108 RecvDialogMode recv_dialog_mode;
109 gint receivewin_width;
110 gint receivewin_height;
111 gboolean close_recv_dialog;
112 gboolean no_recv_err_panel;
116 gboolean confirm_send_queued_messages;
117 SendDialogMode send_dialog_mode;
120 gchar *outgoing_charset;
121 TransferEncodingMethod encoding_method;
123 gboolean allow_jisx0201_kana;
128 gboolean linewrap_quote;
129 gboolean linewrap_pastes;
131 gboolean auto_exteditor;
132 gboolean reply_account_autosel;
133 gboolean default_reply_list;
134 gboolean forward_account_autosel;
135 gboolean reedit_account_autosel;
138 gint autosave_length;
139 gboolean compose_no_markup;
140 ComposeDndInsertOrAttach compose_dnd_mode;
141 gboolean compose_with_format;
142 gchar *compose_subject_format;
143 gchar *compose_body_format;
146 gboolean reply_with_quote;
151 gboolean forward_as_attachment;
152 gboolean redirect_keep_from;
153 gboolean block_cursor;
157 gboolean enable_aspell;
160 gchar *alt_dictionary;
161 gulong misspelled_col;
163 gboolean check_while_typing;
164 gboolean recheck_when_changing_dict;
165 gboolean use_alternate;
166 gboolean use_both_dicts;
171 gchar *widgetfont_gtk1;
172 gchar *textfont_gtk1;
173 gchar *normalfont_gtk1;
174 gchar *boldfont_gtk1;
175 gchar *smallfont_gtk1;
186 ColorlabelPrefs custom_colorlabel[COLORLABELS];
189 gboolean display_img;
194 gint display_folder_unread;
197 gboolean show_searchbar;
198 gboolean expand_thread;
200 gboolean use_addr_book;
203 gboolean use_stripes_everywhere;
204 gboolean use_stripes_in_summaries; /* overrides if use_stripes_everywhere is set to TRUE */
205 gint stripes_color_offset;
206 gboolean enable_dotted_lines;
207 gboolean enable_hscrollbar;
208 gboolean bold_unread;
209 gboolean enable_thread;
210 gboolean thread_by_subject;
211 gint thread_by_subject_max_age; /*!< Max. age of a thread which was threaded
212 * by subject (days) */
214 gchar *last_opened_folder;
215 gboolean goto_last_folder_on_startup;
217 ToolbarStyle toolbar_style;
218 gboolean toolbar_detachable;
219 gboolean show_statusbar;
221 gint folderview_vscrollbar_policy;
227 gint important_score;
230 GSList *actions_list;
232 /* Summary columns visibility, position and size */
233 gboolean summary_col_visible[N_SUMMARY_COLS];
234 gint summary_col_pos[N_SUMMARY_COLS];
235 gint summary_col_size[N_SUMMARY_COLS];
237 gboolean folder_col_visible[N_FOLDER_COLS];
238 gint folder_col_pos[N_FOLDER_COLS];
239 gint folder_col_size[N_FOLDER_COLS];
241 /* Widget visibility, position and size */
244 gint folderview_width;
245 gint folderview_height;
246 gboolean folderview_visible;
248 gint summaryview_width;
249 gint summaryview_height;
255 gboolean msgview_visible;
260 gint mainview_height;
269 gint sourcewin_width;
270 gint sourcewin_height;
278 gboolean enable_color;
279 gboolean enable_bgcolor;
280 gulong quote_level1_col;
281 gulong quote_level2_col;
282 gulong quote_level3_col;
283 gulong quote_level1_bgcol;
284 gulong quote_level2_bgcol;
285 gulong quote_level3_bgcol;
287 gulong tgt_folder_col;
288 gulong signature_col;
289 gboolean recycle_quote_colors;
290 gboolean display_header_pane;
291 gboolean display_header;
292 gboolean display_xface;
294 gboolean render_html;
295 gboolean invoke_plugin_on_html;
296 gboolean textview_cursor_visible;
297 gboolean enable_smooth_scroll;
299 gboolean scroll_halfpage;
300 gboolean respect_flowed_format;
302 gboolean show_other_header;
303 gboolean use_different_print_font;
304 GSList *disphdr_list;
306 gboolean attach_desc;
309 gchar *mime_textviewer;
310 gchar *mime_open_cmd;
311 gchar *attach_save_dir;
312 gchar *attach_load_dir;
314 GList *mime_open_cmd_history;
318 gboolean auto_check_signatures;
319 gboolean gpg_signature_popup;
320 gboolean store_passphrase;
321 gint store_passphrase_timeout;
322 gboolean passphrase_grab;
323 gboolean gpg_warning;
324 #endif /* USE_GPGME */
327 gboolean addressbook_use_editaddress_dialog;
328 gint addressbook_hpaned_pos;
329 gint addressbook_vpaned_pos;
332 gboolean layout_mode;
334 gint statusbar_update_step;
335 gboolean emulate_emacs;
336 gboolean always_show_msg;
337 gboolean mark_as_read_on_new_window;
338 gboolean mark_as_read_delay;
339 gboolean immediate_exec;
340 SelectOnEntry select_on_entry;
342 EntryAction summary_select_prio[6];
344 NextUnreadMsgDialogShow next_unread_msg_dialog;
345 gboolean add_address_by_click;
346 gchar *pixmap_theme_path;
347 int hover_timeout; /* msecs mouse hover timeout */
348 gboolean ask_mark_all_read;
349 gboolean ask_apply_per_account_filtering_rules;
350 gint apply_per_account_filtering_rules;
355 gchar *ext_editor_cmd;
359 gboolean enable_log_standard;
360 gboolean enable_log_warning;
361 gboolean enable_log_error;
362 gboolean enable_log_status;
364 gulong log_msg_color;
365 gulong log_warn_color;
366 gulong log_error_color;
368 gulong log_out_color;
369 gulong log_status_ok_color;
370 gulong log_status_nok_color;
371 gulong log_status_skip_color;
373 gboolean enable_filtering_debug;
374 gint filtering_debug_level;
375 gboolean enable_filtering_debug_inc;
376 gboolean enable_filtering_debug_manual;
377 gboolean enable_filtering_debug_folder_proc;
378 gboolean enable_filtering_debug_pre_proc;
379 gboolean enable_filtering_debug_post_proc;
380 gboolean filtering_debug_cliplog;
381 guint filtering_debug_loglength;
383 gboolean confirm_on_exit;
384 gboolean clean_on_exit;
385 gboolean ask_on_clean;
386 gboolean warn_queued_on_exit;
388 gint io_timeout_secs;
390 gboolean gtk_can_change_accels;
393 gint cache_max_mem_usage;
394 gint cache_min_keep_time;
396 /* boolean for work offline
397 stored here for use in inc.c */
398 gboolean work_offline;
400 gint summary_quicksearch_type;
401 gint summary_quicksearch_sticky;
402 gint summary_quicksearch_recurse;
403 gint summary_quicksearch_dynamic;
404 gint summary_quicksearch_autorun;
407 GList *summary_quicksearch_history;
408 GList *summary_search_from_history;
409 GList *summary_search_to_history;
410 GList *summary_search_subject_history;
411 GList *summary_search_body_history;
412 GList *summary_search_adv_condition_history;
413 GList *message_search_history;
415 gint filteringwin_width;
416 gint filteringwin_height;
417 gint filteringactionwin_width;
418 gint filteringactionwin_height;
419 gint matcherwin_width;
420 gint matcherwin_height;
421 gint templateswin_width;
422 gint templateswin_height;
423 gint actionswin_width;
424 gint actionswin_height;
427 gint addressbookwin_width;
428 gint addressbookwin_height;
429 gint addressbookeditpersonwin_width;
430 gint addressbookeditpersonwin_height;
431 gint addressbookeditgroupwin_width;
432 gint addressbookeditgroupwin_height;
433 gint pluginswin_width;
434 gint pluginswin_height;
436 gint prefswin_height;
437 gint folderitemwin_width;
438 gint folderitemwin_height;
439 gchar *zero_replacement;
440 gint editaccountwin_width;
441 gint editaccountwin_height;
442 gint accountswin_width;
443 gint accountswin_height;
446 gint filtering_debugwin_width;
447 gint filtering_debugwin_height;
448 gint folderselwin_width;
449 gint folderselwin_height;
450 gint addressaddwin_width;
451 gint addressaddwin_height;
452 gint addressbook_folderselwin_width;
453 gint addressbook_folderselwin_height;
456 gint broken_are_utf8;
457 gint skip_ssl_cert_check;
458 gint live_dangerously;
459 gint never_send_retrcpt;
461 gboolean unsafe_ssl_certs;
462 gboolean real_time_sync;
465 extern PrefsCommon prefs_common;
467 void prefs_common_read_config (void);
468 void prefs_common_write_config (void);
469 void prefs_common_open (void);
470 PrefsCommon *prefs_common_get (void);
471 void pref_get_unescaped_pref(gchar *out, const gchar *in);
472 void pref_get_escaped_pref(gchar *out, const gchar *in);
473 void pref_set_textview_from_pref(GtkTextView *textview, const gchar *txt);
474 void pref_set_entry_from_pref(GtkEntry *entry, const gchar *txt);
475 gchar *pref_get_pref_from_textview(GtkTextView *textview);
476 gchar *pref_get_pref_from_entry(GtkEntry *entry);
477 const gchar *prefs_common_translated_header_name(const gchar *header_name);
479 #endif /* __PREFS_COMMON_H__ */