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 gboolean enable_bgcolor;
239 gulong quote_level1_col;
240 gulong quote_level2_col;
241 gulong quote_level3_col;
242 gulong quote_level1_bgcol;
243 gulong quote_level2_bgcol;
244 gulong quote_level3_bgcol;
246 gulong tgt_folder_col;
247 gulong signature_col;
248 gboolean recycle_quote_colors;
249 gboolean display_header_pane;
250 gboolean display_header;
251 gboolean display_xface;
253 gboolean render_html;
254 gboolean invoke_plugin_on_html;
255 gboolean textview_cursor_visible;
256 gboolean enable_smooth_scroll;
258 gboolean scroll_halfpage;
260 gboolean show_other_header;
261 GSList *disphdr_list;
263 gboolean attach_desc;
266 gchar *mime_image_viewer;
267 gchar *mime_audio_player;
268 gchar *mime_open_cmd;
269 gchar *attach_save_dir;
270 gchar *attach_load_dir;
272 GList *mime_open_cmd_history;
276 gboolean auto_check_signatures;
277 gboolean gpg_signature_popup;
278 gboolean store_passphrase;
279 gint store_passphrase_timeout;
280 gboolean passphrase_grab;
281 gboolean gpg_warning;
282 #endif /* USE_GPGME */
287 gint statusbar_update_step;
288 gboolean emulate_emacs;
289 gboolean always_show_msg;
290 gboolean mark_as_read_on_new_window;
291 gboolean mark_as_read_delay;
292 gboolean immediate_exec;
293 SelectOnEntry select_on_entry;
294 NextUnreadMsgDialogShow next_unread_msg_dialog;
295 gboolean add_address_by_click;
296 gchar *pixmap_theme_path;
297 int hover_timeout; /* msecs mouse hover timeout */
298 gboolean ask_mark_all_read;
303 gchar *ext_editor_cmd;
308 gboolean confirm_on_exit;
309 gboolean clean_on_exit;
310 gboolean ask_on_clean;
311 gboolean warn_queued_on_exit;
313 gint io_timeout_secs;
316 gint cache_max_mem_usage;
317 gint cache_min_keep_time;
319 /* boolean for work offline
320 stored here for use in inc.c */
321 gboolean work_offline;
323 gint summary_quicksearch_type;
324 gint summary_quicksearch_sticky;
325 gint summary_quicksearch_recurse;
328 GList *summary_quicksearch_history;
330 gint filteringwin_width;
331 gint filteringwin_height;
332 gint filteringactionwin_width;
333 gint filteringactionwin_height;
334 gint matcherwin_width;
335 gint matcherwin_height;
336 gint templateswin_width;
337 gint templateswin_height;
338 gint actionswin_width;
339 gint actionswin_height;
340 gint addressbookwin_width;
341 gint addressbookwin_height;
342 gint addressbookeditpersonwin_width;
343 gint addressbookeditpersonwin_height;
344 gint pluginswin_width;
345 gint pluginswin_height;
347 gint prefswin_height;
348 gint folderitemwin_width;
349 gint folderitemwin_height;
350 gint editaccountwin_width;
351 gint editaccountwin_height;
352 gint accountswin_width;
353 gint accountswin_height;
356 gint folderselwin_width;
357 gint folderselwin_height;
358 gint addressaddwin_width;
359 gint addressaddwin_height;
362 gint broken_are_utf8;
365 extern PrefsCommon prefs_common;
367 void prefs_common_read_config (void);
368 void prefs_common_write_config (void);
369 void prefs_common_open (void);
370 PrefsCommon *prefs_common_get (void);
371 void pref_set_textview_from_pref(GtkTextView *textview, gchar *txt);
372 gchar *pref_get_pref_from_textview(GtkTextView *textview);
374 #endif /* __PREFS_COMMON_H__ */