2 * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3 * Copyright (C) 1999-2005 Hiroyuki Yamamoto
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"
36 typedef struct _PrefsCommon PrefsCommon;
49 } TransferEncodingMethod;
53 /* SEND_DIALOG_ACTIVE would be irrelevant */
59 SELECTONENTRY_UNREAD = 1 << 0,
60 SELECTONENTRY_NEW = 1 << 1
65 NEXTUNREADMSGDIALOG_ALWAYS,
66 NEXTUNREADMSGDIALOG_ASSUME_YES,
67 NEXTUNREADMSGDIALOG_ASSUME_NO
68 } NextUnreadMsgDialogShow;
75 gboolean scan_all_after_inc;
76 gboolean autochk_newmail;
78 gboolean chk_on_startup;
79 gboolean open_inbox_on_inc;
80 gboolean newmail_notify_auto;
81 gboolean newmail_notify_manu;
82 gchar *newmail_notify_cmd;
83 RecvDialogMode recv_dialog_mode;
84 gboolean close_recv_dialog;
85 gboolean no_recv_err_panel;
89 gboolean confirm_send_queued_messages;
90 SendDialogMode send_dialog_mode;
91 gchar *outgoing_charset;
92 TransferEncodingMethod encoding_method;
94 gboolean allow_jisx0201_kana;
99 gboolean linewrap_quote;
100 gboolean linewrap_pastes;
102 gboolean linewrap_at_send;
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;
113 gboolean reply_with_quote;
118 gboolean forward_as_attachment;
119 gboolean redirect_keep_from;
120 gboolean block_cursor;
124 gboolean enable_aspell;
127 gulong misspelled_col;
129 gboolean check_while_typing;
130 gboolean use_alternate;
135 gchar *widgetfont_gtk1;
136 gchar *textfont_gtk1;
137 gchar *normalfont_gtk1;
138 gchar *boldfont_gtk1;
139 gchar *smallfont_gtk1;
149 gboolean display_img;
154 gboolean display_folder_unread;
157 gboolean show_searchbar;
158 gboolean expand_thread;
160 gboolean use_addr_book;
163 gboolean enable_rules_hint;
164 gboolean enable_hscrollbar;
165 gboolean bold_unread;
166 gboolean enable_thread;
167 gboolean thread_by_subject;
168 gint thread_by_subject_max_age; /*!< Max. age of a thread which was threaded
169 * by subject (days) */
171 ToolbarStyle toolbar_style;
172 gboolean toolbar_detachable;
173 gboolean show_statusbar;
175 gint folderview_vscrollbar_policy;
181 gint important_score;
184 GSList *actions_list;
186 /* Summary columns visibility, position and size */
187 gboolean summary_col_visible[N_SUMMARY_COLS];
188 gint summary_col_pos[N_SUMMARY_COLS];
189 gint summary_col_size[N_SUMMARY_COLS];
191 gboolean folder_col_visible[N_FOLDER_COLS];
192 gint folder_col_pos[N_FOLDER_COLS];
193 gint folder_col_size[N_FOLDER_COLS];
195 /* Widget visibility, position and size */
198 gint folderview_width;
199 gint folderview_height;
200 gboolean folderview_visible;
202 gint summaryview_width;
203 gint summaryview_height;
209 gboolean msgview_visible;
214 gint mainview_height;
223 gint sourcewin_width;
224 gint sourcewin_height;
232 gboolean enable_color;
233 gulong quote_level1_col;
234 gulong quote_level2_col;
235 gulong quote_level3_col;
237 gulong tgt_folder_col;
238 gulong signature_col;
239 gboolean recycle_quote_colors;
240 gboolean conv_mb_alnum;
241 gboolean display_header_pane;
242 gboolean display_header;
243 gboolean display_xface;
245 gboolean render_html;
246 gboolean textview_cursor_visible;
247 gboolean enable_smooth_scroll;
249 gboolean scroll_halfpage;
251 gboolean show_other_header;
252 GSList *disphdr_list;
254 gboolean attach_desc;
257 gchar *mime_image_viewer;
258 gchar *mime_audio_player;
259 gchar *mime_open_cmd;
260 gchar *attach_save_dir;
262 GList *mime_open_cmd_history;
266 gboolean auto_check_signatures;
267 gboolean gpg_signature_popup;
268 gboolean store_passphrase;
269 gint store_passphrase_timeout;
270 gboolean passphrase_grab;
271 gboolean gpg_warning;
272 #endif /* USE_GPGME */
277 gint statusbar_update_step;
278 gboolean emulate_emacs;
279 gboolean always_show_msg;
280 gboolean mark_as_read_on_new_window;
281 gboolean mark_as_read_delay;
282 gboolean immediate_exec;
283 SelectOnEntry select_on_entry;
284 NextUnreadMsgDialogShow next_unread_msg_dialog;
285 gboolean add_address_by_click;
286 gchar *pixmap_theme_path;
287 int hover_timeout; /* msecs mouse hover timeout */
288 gboolean ask_mark_all_read;
293 gchar *ext_editor_cmd;
298 gboolean confirm_on_exit;
299 gboolean clean_on_exit;
300 gboolean ask_on_clean;
301 gboolean warn_queued_on_exit;
303 gint io_timeout_secs;
307 gboolean ssl_ask_unknown_valid;
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;
354 gint broken_are_utf8;
357 extern PrefsCommon prefs_common;
359 void prefs_common_read_config (void);
360 void prefs_common_write_config (void);
361 void prefs_common_open (void);
362 PrefsCommon *prefs_common_get (void);
363 void pref_set_textview_from_pref(GtkTextView *textview, gchar *txt);
364 gchar *pref_get_pref_from_textview(GtkTextView *textview);
366 #endif /* __PREFS_COMMON_H__ */