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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 newmail_notify_auto;
80 gboolean newmail_notify_manu;
81 gchar *newmail_notify_cmd;
82 RecvDialogMode recv_dialog_mode;
83 gboolean close_recv_dialog;
84 gboolean no_recv_err_panel;
88 gboolean confirm_send_queued_messages;
89 SendDialogMode send_dialog_mode;
90 gchar *outgoing_charset;
91 TransferEncodingMethod encoding_method;
93 gboolean allow_jisx0201_kana;
98 gboolean linewrap_quote;
100 gboolean linewrap_at_send;
101 gboolean auto_exteditor;
102 gboolean reply_account_autosel;
103 gboolean default_reply_list;
104 gboolean forward_account_autosel;
105 gboolean reedit_account_autosel;
108 gint autosave_length;
111 gboolean reply_with_quote;
116 gboolean forward_as_attachment;
117 gboolean redirect_keep_from;
118 gboolean block_cursor;
122 gboolean enable_aspell;
125 gulong misspelled_col;
127 gboolean check_while_typing;
128 gboolean use_alternate;
133 gchar *widgetfont_gtk1;
134 gchar *textfont_gtk1;
135 gchar *normalfont_gtk1;
136 gchar *boldfont_gtk1;
137 gchar *smallfont_gtk1;
148 gboolean display_img;
153 gboolean display_folder_unread;
156 gboolean show_searchbar;
157 gboolean expand_thread;
158 gboolean use_addr_book;
161 gboolean enable_rules_hint;
162 gboolean enable_hscrollbar;
163 gboolean bold_unread;
164 gboolean enable_thread;
165 gboolean thread_by_subject;
166 gint thread_by_subject_max_age; /*!< Max. age of a thread which was threaded
167 * by subject (days) */
169 ToolbarStyle toolbar_style;
170 gboolean show_statusbar;
172 gint folderview_vscrollbar_policy;
178 gint important_score;
181 GSList *actions_list;
183 /* Summary columns visibility, position and size */
184 gboolean summary_col_visible[N_SUMMARY_COLS];
185 gint summary_col_pos[N_SUMMARY_COLS];
186 gint summary_col_size[N_SUMMARY_COLS];
188 gboolean folder_col_visible[N_FOLDER_COLS];
189 gint folder_col_pos[N_FOLDER_COLS];
190 gint folder_col_size[N_FOLDER_COLS];
192 /* Widget visibility, position and size */
195 gint folderview_width;
196 gint folderview_height;
197 gboolean folderview_visible;
199 gint summaryview_width;
200 gint summaryview_height;
206 gboolean msgview_visible;
211 gint mainview_height;
220 gint sourcewin_width;
221 gint sourcewin_height;
229 gboolean enable_color;
230 gulong quote_level1_col;
231 gulong quote_level2_col;
232 gulong quote_level3_col;
234 gulong tgt_folder_col;
235 gulong signature_col;
236 gboolean recycle_quote_colors;
237 gboolean conv_mb_alnum;
238 gboolean display_header_pane;
239 gboolean display_header;
241 gboolean render_html;
242 gboolean textview_cursor_visible;
243 gboolean enable_smooth_scroll;
245 gboolean scroll_halfpage;
247 gboolean show_other_header;
248 GSList *disphdr_list;
250 gboolean attach_desc;
253 gchar *mime_image_viewer;
254 gchar *mime_audio_player;
255 gchar *mime_open_cmd;
256 gchar *attach_save_dir;
258 GList *mime_open_cmd_history;
262 gboolean auto_check_signatures;
263 gboolean gpg_signature_popup;
264 gboolean store_passphrase;
265 gint store_passphrase_timeout;
266 gboolean passphrase_grab;
267 gboolean gpg_warning;
268 #endif /* USE_GPGME */
273 gboolean emulate_emacs;
274 gboolean always_show_msg;
275 gboolean mark_as_read_on_new_window;
276 gboolean mark_as_read_delay;
277 gboolean open_inbox_on_inc;
278 gboolean immediate_exec;
279 SelectOnEntry select_on_entry;
280 NextUnreadMsgDialogShow next_unread_msg_dialog;
281 gboolean add_address_by_click;
282 gchar *pixmap_theme_path;
283 int hover_timeout; /* msecs mouse hover timeout */
288 gchar *ext_editor_cmd;
293 gboolean confirm_on_exit;
294 gboolean clean_on_exit;
295 gboolean ask_on_clean;
296 gboolean warn_queued_on_exit;
298 gint io_timeout_secs;
302 gboolean ssl_ask_unknown_valid;
307 gint cache_max_mem_usage;
308 gint cache_min_keep_time;
310 /* boolean for work offline
311 stored here for use in inc.c */
312 gboolean work_offline;
314 gint summary_quicksearch_type;
315 gint summary_quicksearch_sticky;
316 gint summary_quicksearch_recurse;
319 GList *summary_quicksearch_history;
321 gint filteringwin_width;
322 gint filteringwin_height;
326 extern PrefsCommon prefs_common;
328 void prefs_common_read_config (void);
329 void prefs_common_write_config (void);
330 void prefs_common_open (void);
331 PrefsCommon *prefs_common_get (void);
332 void pref_set_textview_from_pref(GtkTextView *textview, gchar *txt);
333 gchar *pref_get_pref_from_textview(GtkTextView *textview);
335 #endif /* __PREFS_COMMON_H__ */