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