0.8.6claws111
[claws.git] / src / prefs_common.h
1 /*
2  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3  * Copyright (C) 1999-2002 Hiroyuki Yamamoto
4  *
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.
9  *
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.
14  *
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.
18  */
19
20 #ifndef __PREFS_COMMON_H__
21 #define __PREFS_COMMON_H__
22
23 #ifdef HAVE_CONFIG_H
24 #  include "config.h"
25 #endif
26
27 #include <glib.h>
28
29 #include "mainwindow.h"
30 #include "summaryview.h"
31 #include "codeconv.h"
32 #include "textview.h"
33
34 typedef struct _PrefsCommon     PrefsCommon;
35
36 typedef enum {
37         RECV_DIALOG_ALWAYS,
38         RECV_DIALOG_ACTIVE,
39         RECV_DIALOG_NEVER
40 } RecvDialogMode;
41
42 typedef enum {
43         SEND_DIALOG_ALWAYS,
44         /* SEND_DIALOG_ACTIVE would be irrelevant */
45         SEND_DIALOG_NEVER
46 } SendDialogMode;
47
48 typedef enum
49 {
50         NEXTUNREADMSGDIALOG_ALWAYS,
51         NEXTUNREADMSGDIALOG_ASSUME_YES,
52         NEXTUNREADMSGDIALOG_ASSUME_NO
53 } NextUnreadMsgDialogShow;
54
55 struct _PrefsCommon
56 {
57         /* Receive */
58         gboolean use_extinc;
59         gchar *extinc_cmd;
60         gboolean inc_local;
61         gboolean filter_on_inc;
62         gchar *spool_path;
63         gboolean scan_all_after_inc;
64         gboolean autochk_newmail;
65         gint autochk_itv;
66         gboolean chk_on_startup;
67         gboolean newmail_notify_auto;
68         gboolean newmail_notify_manu;
69         gchar   *newmail_notify_cmd;
70         gint max_articles;
71
72         /* Send */
73         gboolean use_extsend;
74         gchar *extsend_cmd;
75         gboolean savemsg;
76         gboolean queue_msg;
77         gchar *outgoing_charset;
78
79         /* Compose */
80         gboolean auto_sig;
81         gchar *sig_sep;
82         gint undolevels;
83         gint linewrap_len;
84         gboolean linewrap_quote;
85         gboolean autowrap;
86         gboolean linewrap_at_send;
87         gboolean auto_exteditor;
88         gboolean reply_account_autosel;
89         gboolean default_reply_list;
90         gboolean forward_account_autosel;
91         gboolean reedit_account_autosel;
92         gboolean show_ruler;
93         gboolean autosave;
94         gint autosave_length;
95         
96         /* Quote */
97         gboolean reply_with_quote;
98         gchar *quotemark;
99         gchar *quotefmt;
100         gchar *fw_quotemark;
101         gchar *fw_quotefmt;
102         gboolean forward_as_attachment;
103         gboolean redirect_keep_from;
104         gboolean smart_wrapping;
105         gboolean block_cursor;
106         gchar *quote_chars;
107         
108 #if USE_ASPELL
109         gboolean enable_aspell;
110         gchar *aspell_path;
111         gchar *dictionary;
112         gint misspelled_col;
113         gint aspell_sugmode;
114         gboolean check_while_typing;
115         gboolean use_alternate;
116 #endif
117         
118         /* Display */
119         gchar *widgetfont;
120         gchar *textfont;
121         gchar *normalfont;
122         gchar *boldfont;
123         gchar *smallfont;
124
125         gboolean trans_hdr;
126         gboolean display_folder_unread;
127         gint ng_abbrev_len;
128
129         gboolean show_searchbar;
130         gboolean swap_from;
131         gboolean expand_thread;
132         gboolean use_addr_book;
133         gchar *date_format;
134
135         gboolean enable_hscrollbar;
136         gboolean bold_unread;
137         gboolean enable_thread;
138
139         ToolbarStyle toolbar_style;
140         gboolean show_statusbar;
141
142         gint folderview_vscrollbar_policy;
143
144         /* Filtering */
145         GSList *fltlist;
146
147         gint kill_score;
148         gint important_score;
149
150         /* Actions */
151         GSList *actions_list;
152
153         /* Summary columns visibility, position and size */
154         gboolean summary_col_visible[N_SUMMARY_COLS];
155         gint summary_col_pos[N_SUMMARY_COLS];
156         gint summary_col_size[N_SUMMARY_COLS];
157
158         /* Widget size */
159         gint folderview_x;
160         gint folderview_y;
161         gint folderview_width;
162         gint folderview_height;
163         gint folder_col_folder;
164         gint folder_col_new;
165         gint folder_col_unread;
166         gint folder_col_total;
167
168         gint summaryview_width;
169         gint summaryview_height;
170
171         gint mainview_x;
172         gint mainview_y;
173         gint mainview_width;
174         gint mainview_height;
175         gint mainwin_x;
176         gint mainwin_y;
177         gint mainwin_width;
178         gint mainwin_height;
179
180         gint msgwin_width;
181         gint msgwin_height;
182
183         gint compose_width;
184         gint compose_height;
185
186         /* Message */
187         gboolean enable_color;
188         gint quote_level1_col;
189         gint quote_level2_col;
190         gint quote_level3_col;
191         gint uri_col;
192         gint tgt_folder_col;
193         gint signature_col;
194         gboolean recycle_quote_colors;
195         gboolean conv_mb_alnum;
196         gboolean display_header_pane;
197         gboolean display_header;
198         gboolean head_space;
199         gint line_space;
200         gboolean enable_smooth_scroll;
201         gint scroll_step;
202         gboolean scroll_halfpage;
203
204         gboolean display_img;
205         gboolean resize_image;
206
207         gchar *force_charset;
208
209         gboolean show_other_header;
210         GSList *disphdr_list;
211
212         /* MIME viewer */
213         gchar *mime_image_viewer;
214         gchar *mime_audio_player;
215         gchar *mime_open_cmd;
216
217         GList *mime_open_cmd_history;
218
219 #if USE_GPGME
220         /* Privacy */
221         gboolean auto_check_signatures;
222         gboolean gpg_signature_popup;
223         gboolean store_passphrase;
224         gint store_passphrase_timeout;
225         gboolean passphrase_grab;
226         gboolean gpg_warning;
227 #endif /* USE_GPGME */
228
229         /* Interface */
230         gboolean sep_folder;
231         gboolean sep_msg;
232         gboolean emulate_emacs;
233         gboolean show_msg_with_cursor_key;
234         gboolean open_unread_on_enter;
235         gboolean mark_as_read_on_new_window;
236         gboolean open_inbox_on_inc;
237         gboolean immediate_exec;
238         RecvDialogMode recv_dialog_mode;
239         SendDialogMode send_dialog_mode;
240         gboolean close_recv_dialog;
241         gboolean no_recv_err_panel;
242         NextUnreadMsgDialogShow next_unread_msg_dialog;
243         gboolean add_address_by_click;
244         gchar *pixmap_theme_path;
245
246         /* Other */
247         gchar *uri_cmd;
248         gchar *print_cmd;
249         gchar *ext_editor_cmd;
250
251         gboolean cliplog;
252         guint loglength;
253
254         gboolean confirm_on_exit;
255         gboolean clean_on_exit;
256         gboolean ask_on_clean;
257         gboolean warn_queued_on_exit;
258 #if 0
259 #ifdef USE_OPENSSL
260         gboolean ssl_ask_unknown_valid;
261 #endif
262 #endif
263         /* Memory cache*/
264         gint cache_max_mem_usage;
265         gint cache_min_keep_time;
266         
267         /* boolean for work offline 
268            stored here for use in inc.c */
269         gboolean work_offline;
270         
271         gint summary_quicksearch_type;
272
273 };
274
275 extern PrefsCommon prefs_common;
276
277 void prefs_common_init          ();
278 void prefs_common_read_config   (void);
279 void prefs_common_save_config   (void);
280 void prefs_common_open          (void);
281
282 #endif /* __PREFS_COMMON_H__ */