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 gboolean close_recv_dialog;
98 gboolean no_recv_err_panel;
102 gboolean confirm_send_queued_messages;
103 SendDialogMode send_dialog_mode;
104 gchar *outgoing_charset;
105 TransferEncodingMethod encoding_method;
107 gboolean allow_jisx0201_kana;
112 gboolean linewrap_quote;
113 gboolean linewrap_pastes;
115 gboolean auto_exteditor;
116 gboolean reply_account_autosel;
117 gboolean default_reply_list;
118 gboolean forward_account_autosel;
119 gboolean reedit_account_autosel;
122 gint autosave_length;
123 gboolean compose_no_markup;
124 ComposeDndInsertOrAttach compose_dnd_mode;
127 gboolean reply_with_quote;
132 gboolean forward_as_attachment;
133 gboolean redirect_keep_from;
134 gboolean block_cursor;
138 gboolean enable_aspell;
141 gulong misspelled_col;
143 gboolean check_while_typing;
144 gboolean recheck_when_changing_dict;
145 gboolean use_alternate;
150 gchar *widgetfont_gtk1;
151 gchar *textfont_gtk1;
152 gchar *normalfont_gtk1;
153 gchar *boldfont_gtk1;
154 gchar *smallfont_gtk1;
165 ColorlabelPrefs custom_colorlabel[COLORLABELS];
168 gboolean display_img;
173 gboolean display_folder_unread;
176 gboolean show_searchbar;
177 gboolean expand_thread;
179 gboolean use_addr_book;
182 gboolean use_stripes_everywhere;
183 gboolean use_stripes_in_summaries; /* overrides if use_stripes_everywhere is set to TRUE */
184 gint stripes_color_offset;
185 gboolean enable_dotted_lines;
186 gboolean enable_hscrollbar;
187 gboolean bold_unread;
188 gboolean enable_thread;
189 gboolean thread_by_subject;
190 gint thread_by_subject_max_age; /*!< Max. age of a thread which was threaded
191 * by subject (days) */
193 ToolbarStyle toolbar_style;
194 gboolean toolbar_detachable;
195 gboolean show_statusbar;
197 gint folderview_vscrollbar_policy;
203 gint important_score;
206 GSList *actions_list;
208 /* Summary columns visibility, position and size */
209 gboolean summary_col_visible[N_SUMMARY_COLS];
210 gint summary_col_pos[N_SUMMARY_COLS];
211 gint summary_col_size[N_SUMMARY_COLS];
213 gboolean folder_col_visible[N_FOLDER_COLS];
214 gint folder_col_pos[N_FOLDER_COLS];
215 gint folder_col_size[N_FOLDER_COLS];
217 /* Widget visibility, position and size */
220 gint folderview_width;
221 gint folderview_height;
222 gboolean folderview_visible;
224 gint summaryview_width;
225 gint summaryview_height;
231 gboolean msgview_visible;
236 gint mainview_height;
245 gint sourcewin_width;
246 gint sourcewin_height;
254 gboolean enable_color;
255 gboolean enable_bgcolor;
256 gulong quote_level1_col;
257 gulong quote_level2_col;
258 gulong quote_level3_col;
259 gulong quote_level1_bgcol;
260 gulong quote_level2_bgcol;
261 gulong quote_level3_bgcol;
263 gulong tgt_folder_col;
264 gulong signature_col;
265 gboolean recycle_quote_colors;
266 gboolean display_header_pane;
267 gboolean display_header;
268 gboolean display_xface;
270 gboolean render_html;
271 gboolean invoke_plugin_on_html;
272 gboolean textview_cursor_visible;
273 gboolean enable_smooth_scroll;
275 gboolean scroll_halfpage;
277 gboolean show_other_header;
278 gboolean use_different_print_font;
279 GSList *disphdr_list;
281 gboolean attach_desc;
284 gchar *mime_textviewer;
285 gchar *mime_open_cmd;
286 gchar *attach_save_dir;
287 gchar *attach_load_dir;
289 GList *mime_open_cmd_history;
293 gboolean auto_check_signatures;
294 gboolean gpg_signature_popup;
295 gboolean store_passphrase;
296 gint store_passphrase_timeout;
297 gboolean passphrase_grab;
298 gboolean gpg_warning;
299 #endif /* USE_GPGME */
304 gint statusbar_update_step;
305 gboolean emulate_emacs;
306 gboolean always_show_msg;
307 gboolean mark_as_read_on_new_window;
308 gboolean mark_as_read_delay;
309 gboolean immediate_exec;
310 SelectOnEntry select_on_entry;
311 NextUnreadMsgDialogShow next_unread_msg_dialog;
312 gboolean add_address_by_click;
313 gchar *pixmap_theme_path;
314 int hover_timeout; /* msecs mouse hover timeout */
315 gboolean ask_mark_all_read;
316 gboolean ask_apply_per_account_filtering_rules;
317 gint apply_per_account_filtering_rules;
322 gchar *ext_editor_cmd;
326 gulong log_msg_color;
327 gulong log_warn_color;
328 gulong log_error_color;
330 gulong log_out_color;
332 gboolean confirm_on_exit;
333 gboolean clean_on_exit;
334 gboolean ask_on_clean;
335 gboolean warn_queued_on_exit;
337 gint io_timeout_secs;
340 gint cache_max_mem_usage;
341 gint cache_min_keep_time;
343 /* boolean for work offline
344 stored here for use in inc.c */
345 gboolean work_offline;
347 gint summary_quicksearch_type;
348 gint summary_quicksearch_sticky;
349 gint summary_quicksearch_recurse;
352 GList *summary_quicksearch_history;
354 gint filteringwin_width;
355 gint filteringwin_height;
356 gint filteringactionwin_width;
357 gint filteringactionwin_height;
358 gint matcherwin_width;
359 gint matcherwin_height;
360 gint templateswin_width;
361 gint templateswin_height;
362 gint actionswin_width;
363 gint actionswin_height;
364 gint addressbookwin_width;
365 gint addressbookwin_height;
366 gint addressbookeditpersonwin_width;
367 gint addressbookeditpersonwin_height;
368 gint pluginswin_width;
369 gint pluginswin_height;
371 gint prefswin_height;
372 gint folderitemwin_width;
373 gint folderitemwin_height;
374 gint editaccountwin_width;
375 gint editaccountwin_height;
376 gint accountswin_width;
377 gint accountswin_height;
380 gint folderselwin_width;
381 gint folderselwin_height;
382 gint addressaddwin_width;
383 gint addressaddwin_height;
384 gint addressbook_folderselwin_width;
385 gint addressbook_folderselwin_height;
388 gint broken_are_utf8;
389 gint skip_ssl_cert_check;
390 gint live_dangerously;
391 gint never_send_retrcpt;
395 extern PrefsCommon prefs_common;
397 void prefs_common_read_config (void);
398 void prefs_common_write_config (void);
399 void prefs_common_open (void);
400 PrefsCommon *prefs_common_get (void);
401 void pref_set_textview_from_pref(GtkTextView *textview, gchar *txt);
402 gchar *pref_get_pref_from_textview(GtkTextView *textview);
404 #endif /* __PREFS_COMMON_H__ */