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;
50 } TransferEncodingMethod;
54 /* SEND_DIALOG_ACTIVE would be irrelevant */
60 /* U = unread, N = new, M = marked */
61 SELECTONENTRY_NOTHING,
72 NEXTUNREADMSGDIALOG_ALWAYS,
73 NEXTUNREADMSGDIALOG_ASSUME_YES,
74 NEXTUNREADMSGDIALOG_ASSUME_NO
75 } NextUnreadMsgDialogShow;
82 gboolean scan_all_after_inc;
83 gboolean autochk_newmail;
85 gboolean chk_on_startup;
86 gboolean open_inbox_on_inc;
87 gboolean newmail_notify_auto;
88 gboolean newmail_notify_manu;
89 gchar *newmail_notify_cmd;
90 RecvDialogMode recv_dialog_mode;
91 gboolean close_recv_dialog;
92 gboolean no_recv_err_panel;
96 gboolean confirm_send_queued_messages;
97 SendDialogMode send_dialog_mode;
98 gchar *outgoing_charset;
99 TransferEncodingMethod encoding_method;
101 gboolean allow_jisx0201_kana;
106 gboolean linewrap_quote;
107 gboolean linewrap_pastes;
109 gboolean auto_exteditor;
110 gboolean reply_account_autosel;
111 gboolean default_reply_list;
112 gboolean forward_account_autosel;
113 gboolean reedit_account_autosel;
116 gint autosave_length;
117 gboolean compose_no_markup;
120 gboolean reply_with_quote;
125 gboolean forward_as_attachment;
126 gboolean redirect_keep_from;
127 gboolean block_cursor;
131 gboolean enable_aspell;
134 gulong misspelled_col;
136 gboolean check_while_typing;
137 gboolean recheck_when_changing_dict;
138 gboolean use_alternate;
143 gchar *widgetfont_gtk1;
144 gchar *textfont_gtk1;
145 gchar *normalfont_gtk1;
146 gchar *boldfont_gtk1;
147 gchar *smallfont_gtk1;
157 ColorlabelPrefs custom_colorlabel[COLORLABELS];
160 gboolean display_img;
165 gboolean display_folder_unread;
168 gboolean show_searchbar;
169 gboolean expand_thread;
171 gboolean use_addr_book;
174 gboolean enable_rules_hint;
175 gboolean enable_hscrollbar;
176 gboolean bold_unread;
177 gboolean enable_thread;
178 gboolean thread_by_subject;
179 gint thread_by_subject_max_age; /*!< Max. age of a thread which was threaded
180 * by subject (days) */
182 ToolbarStyle toolbar_style;
183 gboolean toolbar_detachable;
184 gboolean show_statusbar;
186 gint folderview_vscrollbar_policy;
192 gint important_score;
195 GSList *actions_list;
197 /* Summary columns visibility, position and size */
198 gboolean summary_col_visible[N_SUMMARY_COLS];
199 gint summary_col_pos[N_SUMMARY_COLS];
200 gint summary_col_size[N_SUMMARY_COLS];
202 gboolean folder_col_visible[N_FOLDER_COLS];
203 gint folder_col_pos[N_FOLDER_COLS];
204 gint folder_col_size[N_FOLDER_COLS];
206 /* Widget visibility, position and size */
209 gint folderview_width;
210 gint folderview_height;
211 gboolean folderview_visible;
213 gint summaryview_width;
214 gint summaryview_height;
220 gboolean msgview_visible;
225 gint mainview_height;
234 gint sourcewin_width;
235 gint sourcewin_height;
243 gboolean enable_color;
244 gboolean enable_bgcolor;
245 gulong quote_level1_col;
246 gulong quote_level2_col;
247 gulong quote_level3_col;
248 gulong quote_level1_bgcol;
249 gulong quote_level2_bgcol;
250 gulong quote_level3_bgcol;
252 gulong tgt_folder_col;
253 gulong signature_col;
254 gboolean recycle_quote_colors;
255 gboolean display_header_pane;
256 gboolean display_header;
257 gboolean display_xface;
259 gboolean render_html;
260 gboolean invoke_plugin_on_html;
261 gboolean textview_cursor_visible;
262 gboolean enable_smooth_scroll;
264 gboolean scroll_halfpage;
266 gboolean show_other_header;
267 GSList *disphdr_list;
269 gboolean attach_desc;
272 gchar *mime_image_viewer;
273 gchar *mime_audio_player;
274 gchar *mime_open_cmd;
275 gchar *attach_save_dir;
276 gchar *attach_load_dir;
278 GList *mime_open_cmd_history;
282 gboolean auto_check_signatures;
283 gboolean gpg_signature_popup;
284 gboolean store_passphrase;
285 gint store_passphrase_timeout;
286 gboolean passphrase_grab;
287 gboolean gpg_warning;
288 #endif /* USE_GPGME */
293 gint statusbar_update_step;
294 gboolean emulate_emacs;
295 gboolean always_show_msg;
296 gboolean mark_as_read_on_new_window;
297 gboolean mark_as_read_delay;
298 gboolean immediate_exec;
299 SelectOnEntry select_on_entry;
300 NextUnreadMsgDialogShow next_unread_msg_dialog;
301 gboolean add_address_by_click;
302 gchar *pixmap_theme_path;
303 int hover_timeout; /* msecs mouse hover timeout */
304 gboolean ask_mark_all_read;
309 gchar *ext_editor_cmd;
313 gulong log_msg_color;
314 gulong log_warn_color;
315 gulong log_error_color;
317 gulong log_out_color;
319 gboolean confirm_on_exit;
320 gboolean clean_on_exit;
321 gboolean ask_on_clean;
322 gboolean warn_queued_on_exit;
324 gint io_timeout_secs;
327 gint cache_max_mem_usage;
328 gint cache_min_keep_time;
330 /* boolean for work offline
331 stored here for use in inc.c */
332 gboolean work_offline;
334 gint summary_quicksearch_type;
335 gint summary_quicksearch_sticky;
336 gint summary_quicksearch_recurse;
339 GList *summary_quicksearch_history;
341 gint filteringwin_width;
342 gint filteringwin_height;
343 gint filteringactionwin_width;
344 gint filteringactionwin_height;
345 gint matcherwin_width;
346 gint matcherwin_height;
347 gint templateswin_width;
348 gint templateswin_height;
349 gint actionswin_width;
350 gint actionswin_height;
351 gint addressbookwin_width;
352 gint addressbookwin_height;
353 gint addressbookeditpersonwin_width;
354 gint addressbookeditpersonwin_height;
355 gint pluginswin_width;
356 gint pluginswin_height;
358 gint prefswin_height;
359 gint folderitemwin_width;
360 gint folderitemwin_height;
361 gint editaccountwin_width;
362 gint editaccountwin_height;
363 gint accountswin_width;
364 gint accountswin_height;
367 gint folderselwin_width;
368 gint folderselwin_height;
369 gint addressaddwin_width;
370 gint addressaddwin_height;
373 gint broken_are_utf8;
374 gint skip_ssl_cert_check;
377 extern PrefsCommon prefs_common;
379 void prefs_common_read_config (void);
380 void prefs_common_write_config (void);
381 void prefs_common_open (void);
382 PrefsCommon *prefs_common_get (void);
383 void pref_set_textview_from_pref(GtkTextView *textview, gchar *txt);
384 gchar *pref_get_pref_from_textview(GtkTextView *textview);
386 #endif /* __PREFS_COMMON_H__ */