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 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 gint 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;
313 gint addressbook_hpaned_pos;
314 gint addressbook_vpaned_pos;
317 gboolean layout_mode;
319 gint statusbar_update_step;
320 gboolean emulate_emacs;
321 gboolean always_show_msg;
322 gboolean mark_as_read_on_new_window;
323 gboolean mark_as_read_delay;
324 gboolean immediate_exec;
325 SelectOnEntry select_on_entry;
326 NextUnreadMsgDialogShow next_unread_msg_dialog;
327 gboolean add_address_by_click;
328 gchar *pixmap_theme_path;
329 int hover_timeout; /* msecs mouse hover timeout */
330 gboolean ask_mark_all_read;
331 gboolean ask_apply_per_account_filtering_rules;
332 gint apply_per_account_filtering_rules;
337 gchar *ext_editor_cmd;
342 gulong log_msg_color;
343 gulong log_warn_color;
344 gulong log_error_color;
346 gulong log_out_color;
347 gulong log_status_ok_color;
348 gulong log_status_nok_color;
349 gulong log_status_skip_color;
351 gboolean enable_filtering_debug;
352 gint filtering_debug_level;
353 gboolean enable_filtering_debug_inc;
354 gboolean enable_filtering_debug_manual;
355 gboolean enable_filtering_debug_folder_proc;
356 gboolean enable_filtering_debug_pre_proc;
357 gboolean enable_filtering_debug_post_proc;
358 gboolean filtering_debug_cliplog;
359 guint filtering_debug_loglength;
361 gboolean confirm_on_exit;
362 gboolean clean_on_exit;
363 gboolean ask_on_clean;
364 gboolean warn_queued_on_exit;
366 gint io_timeout_secs;
368 gboolean gtk_can_change_accels;
371 gint cache_max_mem_usage;
372 gint cache_min_keep_time;
374 /* boolean for work offline
375 stored here for use in inc.c */
376 gboolean work_offline;
378 gint summary_quicksearch_type;
379 gint summary_quicksearch_sticky;
380 gint summary_quicksearch_recurse;
381 gint summary_quicksearch_dynamic;
384 GList *summary_quicksearch_history;
385 GList *summary_search_from_history;
386 GList *summary_search_to_history;
387 GList *summary_search_subject_history;
388 GList *summary_search_body_history;
389 GList *summary_search_adv_condition_history;
390 GList *message_search_history;
392 gint filteringwin_width;
393 gint filteringwin_height;
394 gint filteringactionwin_width;
395 gint filteringactionwin_height;
396 gint matcherwin_width;
397 gint matcherwin_height;
398 gint templateswin_width;
399 gint templateswin_height;
400 gint actionswin_width;
401 gint actionswin_height;
402 gint addressbookwin_width;
403 gint addressbookwin_height;
404 gint addressbookeditpersonwin_width;
405 gint addressbookeditpersonwin_height;
406 gint addressbookeditgroupwin_width;
407 gint addressbookeditgroupwin_height;
408 gint pluginswin_width;
409 gint pluginswin_height;
411 gint prefswin_height;
412 gint folderitemwin_width;
413 gint folderitemwin_height;
414 gchar *zero_replacement;
415 gint editaccountwin_width;
416 gint editaccountwin_height;
417 gint accountswin_width;
418 gint accountswin_height;
421 gint filtering_debugwin_width;
422 gint filtering_debugwin_height;
423 gint folderselwin_width;
424 gint folderselwin_height;
425 gint addressaddwin_width;
426 gint addressaddwin_height;
427 gint addressbook_folderselwin_width;
428 gint addressbook_folderselwin_height;
431 gint broken_are_utf8;
432 gint skip_ssl_cert_check;
433 gint live_dangerously;
434 gint never_send_retrcpt;
436 gboolean unsafe_ssl_certs;
437 gboolean real_time_sync;
440 extern PrefsCommon prefs_common;
442 void prefs_common_read_config (void);
443 void prefs_common_write_config (void);
444 void prefs_common_open (void);
445 PrefsCommon *prefs_common_get (void);
446 void pref_get_unescaped_pref(gchar *out, const gchar *in);
447 void pref_get_escaped_pref(gchar *out, const gchar *in);
448 void pref_set_textview_from_pref(GtkTextView *textview, const gchar *txt);
449 void pref_set_entry_from_pref(GtkEntry *entry, const gchar *txt);
450 gchar *pref_get_pref_from_textview(GtkTextView *textview);
451 gchar *pref_get_pref_from_entry(GtkEntry *entry);
453 #endif /* __PREFS_COMMON_H__ */