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,
79 NEXTUNREADMSGDIALOG_ALWAYS,
80 NEXTUNREADMSGDIALOG_ASSUME_YES,
81 NEXTUNREADMSGDIALOG_ASSUME_NO
82 } NextUnreadMsgDialogShow;
89 gboolean scan_all_after_inc;
90 gboolean autochk_newmail;
92 gboolean chk_on_startup;
93 gboolean open_inbox_on_inc;
94 gboolean newmail_notify_auto;
95 gboolean newmail_notify_manu;
96 gchar *newmail_notify_cmd;
97 RecvDialogMode recv_dialog_mode;
98 gint receivewin_width;
99 gint receivewin_height;
100 gboolean close_recv_dialog;
101 gboolean no_recv_err_panel;
105 gboolean confirm_send_queued_messages;
106 SendDialogMode send_dialog_mode;
109 gchar *outgoing_charset;
110 TransferEncodingMethod encoding_method;
112 gboolean allow_jisx0201_kana;
117 gboolean linewrap_quote;
118 gboolean linewrap_pastes;
120 gboolean auto_exteditor;
121 gboolean reply_account_autosel;
122 gboolean default_reply_list;
123 gboolean forward_account_autosel;
124 gboolean reedit_account_autosel;
127 gint autosave_length;
128 gboolean compose_no_markup;
129 ComposeDndInsertOrAttach compose_dnd_mode;
130 gboolean compose_with_format;
131 gchar *compose_subject_format;
132 gchar *compose_body_format;
135 gboolean reply_with_quote;
140 gboolean forward_as_attachment;
141 gboolean redirect_keep_from;
142 gboolean block_cursor;
146 gboolean enable_aspell;
149 gchar *alt_dictionary;
150 gulong misspelled_col;
152 gboolean check_while_typing;
153 gboolean recheck_when_changing_dict;
154 gboolean use_alternate;
155 gboolean use_both_dicts;
160 gchar *widgetfont_gtk1;
161 gchar *textfont_gtk1;
162 gchar *normalfont_gtk1;
163 gchar *boldfont_gtk1;
164 gchar *smallfont_gtk1;
175 ColorlabelPrefs custom_colorlabel[COLORLABELS];
178 gboolean display_img;
183 gint display_folder_unread;
186 gboolean show_searchbar;
187 gboolean expand_thread;
189 gboolean use_addr_book;
192 gboolean use_stripes_everywhere;
193 gboolean use_stripes_in_summaries; /* overrides if use_stripes_everywhere is set to TRUE */
194 gint stripes_color_offset;
195 gboolean enable_dotted_lines;
196 gboolean enable_hscrollbar;
197 gboolean bold_unread;
198 gboolean enable_thread;
199 gboolean thread_by_subject;
200 gint thread_by_subject_max_age; /*!< Max. age of a thread which was threaded
201 * by subject (days) */
203 gchar *last_opened_folder;
204 gboolean goto_last_folder_on_startup;
206 ToolbarStyle toolbar_style;
207 gboolean toolbar_detachable;
208 gboolean show_statusbar;
210 gint folderview_vscrollbar_policy;
216 gint important_score;
219 GSList *actions_list;
221 /* Summary columns visibility, position and size */
222 gboolean summary_col_visible[N_SUMMARY_COLS];
223 gint summary_col_pos[N_SUMMARY_COLS];
224 gint summary_col_size[N_SUMMARY_COLS];
226 gboolean folder_col_visible[N_FOLDER_COLS];
227 gint folder_col_pos[N_FOLDER_COLS];
228 gint folder_col_size[N_FOLDER_COLS];
230 /* Widget visibility, position and size */
233 gint folderview_width;
234 gint folderview_height;
235 gboolean folderview_visible;
237 gint summaryview_width;
238 gint summaryview_height;
244 gboolean msgview_visible;
249 gint mainview_height;
258 gint sourcewin_width;
259 gint sourcewin_height;
267 gboolean enable_color;
268 gboolean enable_bgcolor;
269 gulong quote_level1_col;
270 gulong quote_level2_col;
271 gulong quote_level3_col;
272 gulong quote_level1_bgcol;
273 gulong quote_level2_bgcol;
274 gulong quote_level3_bgcol;
276 gulong tgt_folder_col;
277 gulong signature_col;
278 gboolean recycle_quote_colors;
279 gboolean display_header_pane;
280 gboolean display_header;
281 gboolean display_xface;
283 gboolean render_html;
284 gboolean invoke_plugin_on_html;
285 gboolean textview_cursor_visible;
286 gboolean enable_smooth_scroll;
288 gboolean scroll_halfpage;
289 gboolean respect_flowed_format;
291 gboolean show_other_header;
292 gboolean use_different_print_font;
293 GSList *disphdr_list;
295 gboolean attach_desc;
298 gchar *mime_textviewer;
299 gchar *mime_open_cmd;
300 gchar *attach_save_dir;
301 gchar *attach_load_dir;
303 GList *mime_open_cmd_history;
307 gboolean auto_check_signatures;
308 gboolean gpg_signature_popup;
309 gboolean store_passphrase;
310 gint store_passphrase_timeout;
311 gboolean passphrase_grab;
312 gboolean gpg_warning;
313 #endif /* USE_GPGME */
316 gboolean addressbook_use_editaddress_dialog;
317 gint addressbook_hpaned_pos;
318 gint addressbook_vpaned_pos;
321 gboolean layout_mode;
323 gint statusbar_update_step;
324 gboolean emulate_emacs;
325 gboolean always_show_msg;
326 gboolean mark_as_read_on_new_window;
327 gboolean mark_as_read_delay;
328 gboolean immediate_exec;
329 SelectOnEntry select_on_entry;
330 NextUnreadMsgDialogShow next_unread_msg_dialog;
331 gboolean add_address_by_click;
332 gchar *pixmap_theme_path;
333 int hover_timeout; /* msecs mouse hover timeout */
334 gboolean ask_mark_all_read;
335 gboolean ask_apply_per_account_filtering_rules;
336 gint apply_per_account_filtering_rules;
341 gchar *ext_editor_cmd;
346 gulong log_msg_color;
347 gulong log_warn_color;
348 gulong log_error_color;
350 gulong log_out_color;
351 gulong log_status_ok_color;
352 gulong log_status_nok_color;
353 gulong log_status_skip_color;
355 gboolean enable_filtering_debug;
356 gint filtering_debug_level;
357 gboolean enable_filtering_debug_inc;
358 gboolean enable_filtering_debug_manual;
359 gboolean enable_filtering_debug_folder_proc;
360 gboolean enable_filtering_debug_pre_proc;
361 gboolean enable_filtering_debug_post_proc;
362 gboolean filtering_debug_cliplog;
363 guint filtering_debug_loglength;
365 gboolean confirm_on_exit;
366 gboolean clean_on_exit;
367 gboolean ask_on_clean;
368 gboolean warn_queued_on_exit;
370 gint io_timeout_secs;
372 gboolean gtk_can_change_accels;
375 gint cache_max_mem_usage;
376 gint cache_min_keep_time;
378 /* boolean for work offline
379 stored here for use in inc.c */
380 gboolean work_offline;
382 gint summary_quicksearch_type;
383 gint summary_quicksearch_sticky;
384 gint summary_quicksearch_recurse;
385 gint summary_quicksearch_dynamic;
386 gint summary_quicksearch_autorun;
389 GList *summary_quicksearch_history;
390 GList *summary_search_from_history;
391 GList *summary_search_to_history;
392 GList *summary_search_subject_history;
393 GList *summary_search_body_history;
394 GList *summary_search_adv_condition_history;
395 GList *message_search_history;
397 gint filteringwin_width;
398 gint filteringwin_height;
399 gint filteringactionwin_width;
400 gint filteringactionwin_height;
401 gint matcherwin_width;
402 gint matcherwin_height;
403 gint templateswin_width;
404 gint templateswin_height;
405 gint actionswin_width;
406 gint actionswin_height;
407 gint addressbookwin_width;
408 gint addressbookwin_height;
409 gint addressbookeditpersonwin_width;
410 gint addressbookeditpersonwin_height;
411 gint addressbookeditgroupwin_width;
412 gint addressbookeditgroupwin_height;
413 gint pluginswin_width;
414 gint pluginswin_height;
416 gint prefswin_height;
417 gint folderitemwin_width;
418 gint folderitemwin_height;
419 gchar *zero_replacement;
420 gint editaccountwin_width;
421 gint editaccountwin_height;
422 gint accountswin_width;
423 gint accountswin_height;
426 gint filtering_debugwin_width;
427 gint filtering_debugwin_height;
428 gint folderselwin_width;
429 gint folderselwin_height;
430 gint addressaddwin_width;
431 gint addressaddwin_height;
432 gint addressbook_folderselwin_width;
433 gint addressbook_folderselwin_height;
436 gint broken_are_utf8;
437 gint skip_ssl_cert_check;
438 gint live_dangerously;
439 gint never_send_retrcpt;
441 gboolean unsafe_ssl_certs;
442 gboolean real_time_sync;
445 extern PrefsCommon prefs_common;
447 void prefs_common_read_config (void);
448 void prefs_common_write_config (void);
449 void prefs_common_open (void);
450 PrefsCommon *prefs_common_get (void);
451 void pref_get_unescaped_pref(gchar *out, const gchar *in);
452 void pref_get_escaped_pref(gchar *out, const gchar *in);
453 void pref_set_textview_from_pref(GtkTextView *textview, const gchar *txt);
454 void pref_set_entry_from_pref(GtkEntry *entry, const gchar *txt);
455 gchar *pref_get_pref_from_textview(GtkTextView *textview);
456 gchar *pref_get_pref_from_entry(GtkEntry *entry);
457 const gchar *prefs_common_translated_header_name(const gchar *header_name);
459 #endif /* __PREFS_COMMON_H__ */