2 * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3 * Copyright (C) 1999-2006 Hiroyuki Yamamoto and the Sylpheed-Claws 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;
131 gboolean reply_with_quote;
136 gboolean forward_as_attachment;
137 gboolean redirect_keep_from;
138 gboolean block_cursor;
142 gboolean enable_aspell;
145 gulong misspelled_col;
147 gboolean check_while_typing;
148 gboolean recheck_when_changing_dict;
149 gboolean use_alternate;
154 gchar *widgetfont_gtk1;
155 gchar *textfont_gtk1;
156 gchar *normalfont_gtk1;
157 gchar *boldfont_gtk1;
158 gchar *smallfont_gtk1;
169 ColorlabelPrefs custom_colorlabel[COLORLABELS];
172 gboolean display_img;
177 gboolean display_folder_unread;
180 gboolean show_searchbar;
181 gboolean expand_thread;
183 gboolean use_addr_book;
186 gboolean use_stripes_everywhere;
187 gboolean use_stripes_in_summaries; /* overrides if use_stripes_everywhere is set to TRUE */
188 gint stripes_color_offset;
189 gboolean enable_dotted_lines;
190 gboolean enable_hscrollbar;
191 gboolean bold_unread;
192 gboolean enable_thread;
193 gboolean thread_by_subject;
194 gint thread_by_subject_max_age; /*!< Max. age of a thread which was threaded
195 * by subject (days) */
197 ToolbarStyle toolbar_style;
198 gboolean toolbar_detachable;
199 gboolean show_statusbar;
201 gint folderview_vscrollbar_policy;
207 gint important_score;
210 GSList *actions_list;
212 /* Summary columns visibility, position and size */
213 gboolean summary_col_visible[N_SUMMARY_COLS];
214 gint summary_col_pos[N_SUMMARY_COLS];
215 gint summary_col_size[N_SUMMARY_COLS];
217 gboolean folder_col_visible[N_FOLDER_COLS];
218 gint folder_col_pos[N_FOLDER_COLS];
219 gint folder_col_size[N_FOLDER_COLS];
221 /* Widget visibility, position and size */
224 gint folderview_width;
225 gint folderview_height;
226 gboolean folderview_visible;
228 gint summaryview_width;
229 gint summaryview_height;
235 gboolean msgview_visible;
240 gint mainview_height;
249 gint sourcewin_width;
250 gint sourcewin_height;
258 gboolean enable_color;
259 gboolean enable_bgcolor;
260 gulong quote_level1_col;
261 gulong quote_level2_col;
262 gulong quote_level3_col;
263 gulong quote_level1_bgcol;
264 gulong quote_level2_bgcol;
265 gulong quote_level3_bgcol;
267 gulong tgt_folder_col;
268 gulong signature_col;
269 gboolean recycle_quote_colors;
270 gboolean display_header_pane;
271 gboolean display_header;
272 gboolean display_xface;
274 gboolean render_html;
275 gboolean invoke_plugin_on_html;
276 gboolean textview_cursor_visible;
277 gboolean enable_smooth_scroll;
279 gboolean scroll_halfpage;
280 gboolean respect_flowed_format;
282 gboolean show_other_header;
283 gboolean use_different_print_font;
284 GSList *disphdr_list;
286 gboolean attach_desc;
289 gchar *mime_textviewer;
290 gchar *mime_open_cmd;
291 gchar *attach_save_dir;
292 gchar *attach_load_dir;
294 GList *mime_open_cmd_history;
298 gboolean auto_check_signatures;
299 gboolean gpg_signature_popup;
300 gboolean store_passphrase;
301 gint store_passphrase_timeout;
302 gboolean passphrase_grab;
303 gboolean gpg_warning;
304 #endif /* USE_GPGME */
309 gint statusbar_update_step;
310 gboolean emulate_emacs;
311 gboolean always_show_msg;
312 gboolean mark_as_read_on_new_window;
313 gboolean mark_as_read_delay;
314 gboolean immediate_exec;
315 SelectOnEntry select_on_entry;
316 NextUnreadMsgDialogShow next_unread_msg_dialog;
317 gboolean add_address_by_click;
318 gchar *pixmap_theme_path;
319 int hover_timeout; /* msecs mouse hover timeout */
320 gboolean ask_mark_all_read;
321 gboolean ask_apply_per_account_filtering_rules;
322 gint apply_per_account_filtering_rules;
327 gchar *ext_editor_cmd;
331 gulong log_msg_color;
332 gulong log_warn_color;
333 gulong log_error_color;
335 gulong log_out_color;
337 gboolean confirm_on_exit;
338 gboolean clean_on_exit;
339 gboolean ask_on_clean;
340 gboolean warn_queued_on_exit;
342 gint io_timeout_secs;
345 gint cache_max_mem_usage;
346 gint cache_min_keep_time;
348 /* boolean for work offline
349 stored here for use in inc.c */
350 gboolean work_offline;
352 gint summary_quicksearch_type;
353 gint summary_quicksearch_sticky;
354 gint summary_quicksearch_recurse;
355 gint summary_quicksearch_dynamic;
358 GList *summary_quicksearch_history;
360 gint filteringwin_width;
361 gint filteringwin_height;
362 gint filteringactionwin_width;
363 gint filteringactionwin_height;
364 gint matcherwin_width;
365 gint matcherwin_height;
366 gint templateswin_width;
367 gint templateswin_height;
368 gint actionswin_width;
369 gint actionswin_height;
370 gint addressbookwin_width;
371 gint addressbookwin_height;
372 gint addressbookeditpersonwin_width;
373 gint addressbookeditpersonwin_height;
374 gint addressbookeditgroupwin_width;
375 gint addressbookeditgroupwin_height;
376 gint pluginswin_width;
377 gint pluginswin_height;
379 gint prefswin_height;
380 gint folderitemwin_width;
381 gint folderitemwin_height;
382 gint editaccountwin_width;
383 gint editaccountwin_height;
384 gint accountswin_width;
385 gint accountswin_height;
388 gint folderselwin_width;
389 gint folderselwin_height;
390 gint addressaddwin_width;
391 gint addressaddwin_height;
392 gint addressbook_folderselwin_width;
393 gint addressbook_folderselwin_height;
396 gint broken_are_utf8;
397 gint skip_ssl_cert_check;
398 gint live_dangerously;
399 gint never_send_retrcpt;
403 extern PrefsCommon prefs_common;
405 void prefs_common_read_config (void);
406 void prefs_common_write_config (void);
407 void prefs_common_open (void);
408 PrefsCommon *prefs_common_get (void);
409 void pref_get_unescaped_pref(gchar *out, const gchar *in);
410 void pref_set_textview_from_pref(GtkTextView *textview, const gchar *txt);
411 gchar *pref_get_pref_from_textview(GtkTextView *textview);
413 #endif /* __PREFS_COMMON_H__ */