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 SELECTONENTRY_UNREAD = 1 << 0,
61 SELECTONENTRY_NEW = 1 << 1
66 NEXTUNREADMSGDIALOG_ALWAYS,
67 NEXTUNREADMSGDIALOG_ASSUME_YES,
68 NEXTUNREADMSGDIALOG_ASSUME_NO
69 } NextUnreadMsgDialogShow;
76 gboolean scan_all_after_inc;
77 gboolean autochk_newmail;
79 gboolean chk_on_startup;
80 gboolean open_inbox_on_inc;
81 gboolean newmail_notify_auto;
82 gboolean newmail_notify_manu;
83 gchar *newmail_notify_cmd;
84 RecvDialogMode recv_dialog_mode;
85 gboolean close_recv_dialog;
86 gboolean no_recv_err_panel;
90 gboolean confirm_send_queued_messages;
91 SendDialogMode send_dialog_mode;
92 gchar *outgoing_charset;
93 TransferEncodingMethod encoding_method;
95 gboolean allow_jisx0201_kana;
100 gboolean linewrap_quote;
101 gboolean linewrap_pastes;
103 gboolean auto_exteditor;
104 gboolean reply_account_autosel;
105 gboolean default_reply_list;
106 gboolean forward_account_autosel;
107 gboolean reedit_account_autosel;
110 gint autosave_length;
111 gboolean compose_no_markup;
114 gboolean reply_with_quote;
119 gboolean forward_as_attachment;
120 gboolean redirect_keep_from;
121 gboolean block_cursor;
125 gboolean enable_aspell;
128 gulong misspelled_col;
130 gboolean check_while_typing;
131 gboolean recheck_when_changing_dict;
132 gboolean use_alternate;
137 gchar *widgetfont_gtk1;
138 gchar *textfont_gtk1;
139 gchar *normalfont_gtk1;
140 gchar *boldfont_gtk1;
141 gchar *smallfont_gtk1;
151 ColorlabelPrefs custom_colorlabel[COLORLABELS];
154 gboolean display_img;
159 gboolean display_folder_unread;
162 gboolean show_searchbar;
163 gboolean expand_thread;
165 gboolean use_addr_book;
168 gboolean enable_rules_hint;
169 gboolean enable_hscrollbar;
170 gboolean bold_unread;
171 gboolean enable_thread;
172 gboolean thread_by_subject;
173 gint thread_by_subject_max_age; /*!< Max. age of a thread which was threaded
174 * by subject (days) */
176 ToolbarStyle toolbar_style;
177 gboolean toolbar_detachable;
178 gboolean show_statusbar;
180 gint folderview_vscrollbar_policy;
186 gint important_score;
189 GSList *actions_list;
191 /* Summary columns visibility, position and size */
192 gboolean summary_col_visible[N_SUMMARY_COLS];
193 gint summary_col_pos[N_SUMMARY_COLS];
194 gint summary_col_size[N_SUMMARY_COLS];
196 gboolean folder_col_visible[N_FOLDER_COLS];
197 gint folder_col_pos[N_FOLDER_COLS];
198 gint folder_col_size[N_FOLDER_COLS];
200 /* Widget visibility, position and size */
203 gint folderview_width;
204 gint folderview_height;
205 gboolean folderview_visible;
207 gint summaryview_width;
208 gint summaryview_height;
214 gboolean msgview_visible;
219 gint mainview_height;
228 gint sourcewin_width;
229 gint sourcewin_height;
237 gboolean enable_color;
238 gulong quote_level1_col;
239 gulong quote_level2_col;
240 gulong quote_level3_col;
242 gulong tgt_folder_col;
243 gulong signature_col;
244 gboolean recycle_quote_colors;
245 gboolean display_header_pane;
246 gboolean display_header;
247 gboolean display_xface;
249 gboolean render_html;
250 gboolean invoke_plugin_on_html;
251 gboolean textview_cursor_visible;
252 gboolean enable_smooth_scroll;
254 gboolean scroll_halfpage;
256 gboolean show_other_header;
257 GSList *disphdr_list;
259 gboolean attach_desc;
262 gchar *mime_image_viewer;
263 gchar *mime_audio_player;
264 gchar *mime_open_cmd;
265 gchar *attach_save_dir;
266 gchar *attach_load_dir;
268 GList *mime_open_cmd_history;
272 gboolean auto_check_signatures;
273 gboolean gpg_signature_popup;
274 gboolean store_passphrase;
275 gint store_passphrase_timeout;
276 gboolean passphrase_grab;
277 gboolean gpg_warning;
278 #endif /* USE_GPGME */
283 gint statusbar_update_step;
284 gboolean emulate_emacs;
285 gboolean always_show_msg;
286 gboolean mark_as_read_on_new_window;
287 gboolean mark_as_read_delay;
288 gboolean immediate_exec;
289 SelectOnEntry select_on_entry;
290 NextUnreadMsgDialogShow next_unread_msg_dialog;
291 gboolean add_address_by_click;
292 gchar *pixmap_theme_path;
293 int hover_timeout; /* msecs mouse hover timeout */
294 gboolean ask_mark_all_read;
299 gchar *ext_editor_cmd;
304 gboolean confirm_on_exit;
305 gboolean clean_on_exit;
306 gboolean ask_on_clean;
307 gboolean warn_queued_on_exit;
309 gint io_timeout_secs;
312 gint cache_max_mem_usage;
313 gint cache_min_keep_time;
315 /* boolean for work offline
316 stored here for use in inc.c */
317 gboolean work_offline;
319 gint summary_quicksearch_type;
320 gint summary_quicksearch_sticky;
321 gint summary_quicksearch_recurse;
324 GList *summary_quicksearch_history;
326 gint filteringwin_width;
327 gint filteringwin_height;
328 gint filteringactionwin_width;
329 gint filteringactionwin_height;
330 gint matcherwin_width;
331 gint matcherwin_height;
332 gint templateswin_width;
333 gint templateswin_height;
334 gint actionswin_width;
335 gint actionswin_height;
336 gint addressbookwin_width;
337 gint addressbookwin_height;
338 gint addressbookeditpersonwin_width;
339 gint addressbookeditpersonwin_height;
340 gint pluginswin_width;
341 gint pluginswin_height;
343 gint prefswin_height;
344 gint folderitemwin_width;
345 gint folderitemwin_height;
346 gint editaccountwin_width;
347 gint editaccountwin_height;
348 gint accountswin_width;
349 gint accountswin_height;
352 gint folderselwin_width;
353 gint folderselwin_height;
354 gint addressaddwin_width;
355 gint addressaddwin_height;
358 gint broken_are_utf8;
361 extern PrefsCommon prefs_common;
363 void prefs_common_read_config (void);
364 void prefs_common_write_config (void);
365 void prefs_common_open (void);
366 PrefsCommon *prefs_common_get (void);
367 void pref_set_textview_from_pref(GtkTextView *textview, gchar *txt);
368 gchar *pref_get_pref_from_textview(GtkTextView *textview);
370 #endif /* __PREFS_COMMON_H__ */