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;
158 ColorlabelPrefs custom_colorlabel[COLORLABELS];
161 gboolean display_img;
166 gboolean display_folder_unread;
169 gboolean show_searchbar;
170 gboolean expand_thread;
172 gboolean use_addr_book;
175 gboolean enable_rules_hint;
176 gboolean enable_hscrollbar;
177 gboolean bold_unread;
178 gboolean enable_thread;
179 gboolean thread_by_subject;
180 gint thread_by_subject_max_age; /*!< Max. age of a thread which was threaded
181 * by subject (days) */
183 ToolbarStyle toolbar_style;
184 gboolean toolbar_detachable;
185 gboolean show_statusbar;
187 gint folderview_vscrollbar_policy;
193 gint important_score;
196 GSList *actions_list;
198 /* Summary columns visibility, position and size */
199 gboolean summary_col_visible[N_SUMMARY_COLS];
200 gint summary_col_pos[N_SUMMARY_COLS];
201 gint summary_col_size[N_SUMMARY_COLS];
203 gboolean folder_col_visible[N_FOLDER_COLS];
204 gint folder_col_pos[N_FOLDER_COLS];
205 gint folder_col_size[N_FOLDER_COLS];
207 /* Widget visibility, position and size */
210 gint folderview_width;
211 gint folderview_height;
212 gboolean folderview_visible;
214 gint summaryview_width;
215 gint summaryview_height;
221 gboolean msgview_visible;
226 gint mainview_height;
235 gint sourcewin_width;
236 gint sourcewin_height;
244 gboolean enable_color;
245 gboolean enable_bgcolor;
246 gulong quote_level1_col;
247 gulong quote_level2_col;
248 gulong quote_level3_col;
249 gulong quote_level1_bgcol;
250 gulong quote_level2_bgcol;
251 gulong quote_level3_bgcol;
253 gulong tgt_folder_col;
254 gulong signature_col;
255 gboolean recycle_quote_colors;
256 gboolean display_header_pane;
257 gboolean display_header;
258 gboolean display_xface;
260 gboolean render_html;
261 gboolean invoke_plugin_on_html;
262 gboolean textview_cursor_visible;
263 gboolean enable_smooth_scroll;
265 gboolean scroll_halfpage;
267 gboolean show_other_header;
268 gboolean use_different_print_font;
269 GSList *disphdr_list;
271 gboolean attach_desc;
274 gchar *mime_image_viewer;
275 gchar *mime_audio_player;
276 gchar *mime_open_cmd;
277 gchar *attach_save_dir;
278 gchar *attach_load_dir;
280 GList *mime_open_cmd_history;
284 gboolean auto_check_signatures;
285 gboolean gpg_signature_popup;
286 gboolean store_passphrase;
287 gint store_passphrase_timeout;
288 gboolean passphrase_grab;
289 gboolean gpg_warning;
290 #endif /* USE_GPGME */
295 gint statusbar_update_step;
296 gboolean emulate_emacs;
297 gboolean always_show_msg;
298 gboolean mark_as_read_on_new_window;
299 gboolean mark_as_read_delay;
300 gboolean immediate_exec;
301 SelectOnEntry select_on_entry;
302 NextUnreadMsgDialogShow next_unread_msg_dialog;
303 gboolean add_address_by_click;
304 gchar *pixmap_theme_path;
305 int hover_timeout; /* msecs mouse hover timeout */
306 gboolean ask_mark_all_read;
311 gchar *ext_editor_cmd;
315 gulong log_msg_color;
316 gulong log_warn_color;
317 gulong log_error_color;
319 gulong log_out_color;
321 gboolean confirm_on_exit;
322 gboolean clean_on_exit;
323 gboolean ask_on_clean;
324 gboolean warn_queued_on_exit;
326 gint io_timeout_secs;
329 gint cache_max_mem_usage;
330 gint cache_min_keep_time;
332 /* boolean for work offline
333 stored here for use in inc.c */
334 gboolean work_offline;
336 gint summary_quicksearch_type;
337 gint summary_quicksearch_sticky;
338 gint summary_quicksearch_recurse;
341 GList *summary_quicksearch_history;
343 gint filteringwin_width;
344 gint filteringwin_height;
345 gint filteringactionwin_width;
346 gint filteringactionwin_height;
347 gint matcherwin_width;
348 gint matcherwin_height;
349 gint templateswin_width;
350 gint templateswin_height;
351 gint actionswin_width;
352 gint actionswin_height;
353 gint addressbookwin_width;
354 gint addressbookwin_height;
355 gint addressbookeditpersonwin_width;
356 gint addressbookeditpersonwin_height;
357 gint pluginswin_width;
358 gint pluginswin_height;
360 gint prefswin_height;
361 gint folderitemwin_width;
362 gint folderitemwin_height;
363 gint editaccountwin_width;
364 gint editaccountwin_height;
365 gint accountswin_width;
366 gint accountswin_height;
369 gint folderselwin_width;
370 gint folderselwin_height;
371 gint addressaddwin_width;
372 gint addressaddwin_height;
375 gint broken_are_utf8;
376 gint skip_ssl_cert_check;
377 gint live_dangerously;
378 gint never_send_retrcpt;
381 extern PrefsCommon prefs_common;
383 void prefs_common_read_config (void);
384 void prefs_common_write_config (void);
385 void prefs_common_open (void);
386 PrefsCommon *prefs_common_get (void);
387 void pref_set_textview_from_pref(GtkTextView *textview, gchar *txt);
388 gchar *pref_get_pref_from_textview(GtkTextView *textview);
390 #endif /* __PREFS_COMMON_H__ */