sync with 0.8.1cvs12
[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 {
44         NEXTUNREADMSGDIALOG_ALWAYS,
45         NEXTUNREADMSGDIALOG_ASSUME_YES,
46         NEXTUNREADMSGDIALOG_ASSUME_NO
47 } NextUnreadMsgDialogShow;
48
49 struct _PrefsCommon
50 {
51         /* Receive */
52         gboolean use_extinc;
53         gchar *extinc_cmd;
54         gboolean inc_local;
55         gboolean filter_on_inc;
56         gchar *spool_path;
57         gboolean scan_all_after_inc;
58         gboolean autochk_newmail;
59         gint autochk_itv;
60         gboolean chk_on_startup;
61         gboolean newmail_notify_auto;
62         gboolean newmail_notify_manu;
63         gchar   *newmail_notify_cmd;
64         gint max_articles;
65
66         /* Send */
67         gboolean use_extsend;
68         gchar *extsend_cmd;
69         gboolean savemsg;
70         gboolean queue_msg;
71         gchar *outgoing_charset;
72
73         /* Compose */
74         gboolean auto_sig;
75         gchar *sig_sep;
76         gint undolevels;
77         gint linewrap_len;
78         gboolean linewrap_quote;
79         gboolean autowrap;
80         gboolean linewrap_at_send;
81         gboolean auto_exteditor;
82         gboolean reply_account_autosel;
83         gboolean forward_account_autosel;
84         gboolean reedit_account_autosel;
85         gboolean show_ruler;
86
87         /* Quote */
88         gboolean reply_with_quote;
89         gchar *quotemark;
90         gchar *quotefmt;
91         gchar *fw_quotemark;
92         gchar *fw_quotefmt;
93         gboolean forward_as_attachment;
94         gboolean redirect_keep_from;
95         gboolean smart_wrapping;
96         gboolean block_cursor;
97         gchar *quote_chars;
98         
99 #if USE_PSPELL
100         gboolean enable_pspell;
101         gchar *pspell_path;
102         gchar *dictionary;
103         gint misspelled_col;
104         gint pspell_sugmode;
105         gboolean check_while_typing;
106         gboolean use_alternate;
107 #endif
108         
109         /* Display */
110         gchar *widgetfont;
111         gchar *textfont;
112         gchar *normalfont;
113         gchar *boldfont;
114         gchar *smallfont;
115         gboolean display_folder_unread;
116         gboolean display_img;
117         gint ng_abbrev_len;
118         ToolbarStyle toolbar_style;
119         gboolean show_statusbar;
120         gboolean trans_hdr;
121         gboolean enable_thread;
122         gboolean enable_hscrollbar;
123         gboolean expand_thread;
124         gboolean bold_unread;
125         gboolean swap_from;
126         gboolean use_addr_book;
127         gchar *date_format;
128
129         gint folderview_vscrollbar_policy;
130
131         /* Filtering */
132         GSList *fltlist;
133
134         gint kill_score;
135         gint important_score;
136
137         /* Actions */
138         GSList *actions_list;
139
140         /* Summary columns visibility, position and size */
141         gboolean summary_col_visible[N_SUMMARY_COLS];
142         gint summary_col_pos[N_SUMMARY_COLS];
143         gint summary_col_size[N_SUMMARY_COLS];
144
145         /* Widget size */
146         gint folderview_x;
147         gint folderview_y;
148         gint folderview_width;
149         gint folderview_height;
150         gint folder_col_folder;
151         gint folder_col_new;
152         gint folder_col_unread;
153         gint folder_col_total;
154
155         gint summaryview_width;
156         gint summaryview_height;
157
158         gint mainview_x;
159         gint mainview_y;
160         gint mainview_width;
161         gint mainview_height;
162         gint mainwin_x;
163         gint mainwin_y;
164         gint mainwin_width;
165         gint mainwin_height;
166
167         gint msgwin_width;
168         gint msgwin_height;
169
170         gint compose_width;
171         gint compose_height;
172
173         /* Message */
174         gboolean enable_color;
175         gint quote_level1_col;
176         gint quote_level2_col;
177         gint quote_level3_col;
178         gint uri_col;
179         gint tgt_folder_col;
180         gushort sig_col;
181         gboolean recycle_quote_colors;
182         gboolean conv_mb_alnum;
183         gboolean display_header_pane;
184         gboolean display_header;
185         gboolean head_space;
186         gint line_space;
187         gboolean enable_smooth_scroll;
188         gint scroll_step;
189         gboolean scroll_halfpage;
190
191         gchar *force_charset;
192
193         gboolean show_other_header;
194         GSList *disphdr_list;
195
196         /* MIME viewer */
197         gchar *mime_image_viewer;
198         gchar *mime_audio_player;
199         gchar *mime_open_cmd;
200
201         GList *mime_open_cmd_history;
202
203 #if USE_GPGME
204         /* Privacy */
205         gboolean auto_check_signatures;
206         gboolean gpg_signature_popup;
207         gboolean store_passphrase;
208         gint store_passphrase_timeout;
209         gboolean passphrase_grab;
210         gchar *default_signkey;
211         gboolean gpg_warning;
212 #endif /* USE_GPGME */
213
214         /* Interface */
215         gboolean sep_folder;
216         gboolean sep_msg;
217         gboolean emulate_emacs;
218         gboolean show_msg_with_cursor_key;
219         gboolean open_unread_on_enter;
220         gboolean open_inbox_on_inc;
221         gboolean immediate_exec;
222         RecvDialogMode recv_dialog_mode;
223         gboolean no_recv_err_panel;
224         NextUnreadMsgDialogShow next_unread_msg_dialog;
225         gboolean add_address_by_click;
226         gchar *pixmap_theme_path;
227
228         /* Other */
229         gchar *uri_cmd;
230         gchar *print_cmd;
231         gchar *ext_editor_cmd;
232
233         gboolean cliplog;
234         guint loglength;
235
236         gboolean confirm_on_exit;
237         gboolean clean_on_exit;
238         gboolean ask_on_clean;
239         gboolean warn_queued_on_exit;
240
241         /* Memory cache*/
242         gint cache_max_mem_usage;
243         gint cache_min_keep_time;
244         
245         /* boolean for work offline 
246            stored here for use in inc.c */
247         gboolean work_offline;
248
249 };
250
251 extern PrefsCommon prefs_common;
252
253 void prefs_common_init          ();
254 void prefs_common_read_config   (void);
255 void prefs_common_save_config   (void);
256 void prefs_common_open          (void);
257
258 #endif /* __PREFS_COMMON_H__ */