do not use description as attachment name
[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_ACTIVE,
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 inc_local;
68         gboolean filter_on_inc;
69         gchar *spool_path;
70         gboolean scan_all_after_inc;
71         gboolean autochk_newmail;
72         gint autochk_itv;
73         gboolean chk_on_startup;
74         gboolean newmail_notify_auto;
75         gboolean newmail_notify_manu;
76         gchar   *newmail_notify_cmd;
77
78         /* Send */
79         gboolean use_extsend;
80         gchar *extsend_cmd;
81         gboolean savemsg;
82         gboolean queue_msg;
83         gchar *outgoing_charset;
84         TransferEncodingMethod encoding_method;
85
86         /* Compose */
87         gint undolevels;
88         gint linewrap_len;
89         gboolean linewrap_quote;
90         gboolean autowrap;
91         gboolean linewrap_at_send;
92         gboolean auto_exteditor;
93         gboolean reply_account_autosel;
94         gboolean default_reply_list;
95         gboolean forward_account_autosel;
96         gboolean reedit_account_autosel;
97         gboolean show_ruler;
98         gboolean autosave;
99         gint autosave_length;
100         
101         /* Quote */
102         gboolean reply_with_quote;
103         gchar *quotemark;
104         gchar *quotefmt;
105         gchar *fw_quotemark;
106         gchar *fw_quotefmt;
107         gboolean forward_as_attachment;
108         gboolean redirect_keep_from;
109         gboolean smart_wrapping;
110         gboolean block_cursor;
111         gchar *quote_chars;
112         
113 #if USE_ASPELL
114         gboolean enable_aspell;
115         gchar *aspell_path;
116         gchar *dictionary;
117         gint misspelled_col;
118         gint aspell_sugmode;
119         gboolean check_while_typing;
120         gboolean use_alternate;
121 #endif
122         
123         /* Display */
124         gchar *widgetfont;
125         gchar *textfont;
126         gchar *normalfont;
127         gchar *boldfont;
128         gchar *smallfont;
129
130         gboolean trans_hdr;
131         gboolean display_folder_unread;
132         gint ng_abbrev_len;
133
134         gboolean show_searchbar;
135         gboolean swap_from;
136         gboolean expand_thread;
137         gboolean use_addr_book;
138         gchar *date_format;
139
140         gboolean enable_hscrollbar;
141         gboolean bold_unread;
142         gboolean enable_thread;
143         gboolean thread_by_subject;
144
145         ToolbarStyle toolbar_style;
146         gboolean show_statusbar;
147
148         gint folderview_vscrollbar_policy;
149
150         /* Filtering */
151         GSList *fltlist;
152
153         gint kill_score;
154         gint important_score;
155
156         /* Actions */
157         GSList *actions_list;
158
159         /* Summary columns visibility, position and size */
160         gboolean summary_col_visible[N_SUMMARY_COLS];
161         gint summary_col_pos[N_SUMMARY_COLS];
162         gint summary_col_size[N_SUMMARY_COLS];
163
164         /* Widget size */
165         gint folderview_x;
166         gint folderview_y;
167         gint folderview_width;
168         gint folderview_height;
169         gint folder_col_folder;
170         gint folder_col_new;
171         gint folder_col_unread;
172         gint folder_col_total;
173
174         gint summaryview_width;
175         gint summaryview_height;
176
177         gint mainview_x;
178         gint mainview_y;
179         gint mainview_width;
180         gint mainview_height;
181         gint mainwin_x;
182         gint mainwin_y;
183         gint mainwin_width;
184         gint mainwin_height;
185
186         gint msgwin_width;
187         gint msgwin_height;
188
189         gint sourcewin_width;
190         gint sourcewin_height;
191
192         gint compose_width;
193         gint compose_height;
194
195         /* Message */
196         gboolean enable_color;
197         gint quote_level1_col;
198         gint quote_level2_col;
199         gint quote_level3_col;
200         gint uri_col;
201         gint tgt_folder_col;
202         gint signature_col;
203         gboolean recycle_quote_colors;
204         gboolean conv_mb_alnum;
205         gboolean display_header_pane;
206         gboolean display_header;
207         gboolean head_space;
208         gint line_space;
209         gboolean enable_smooth_scroll;
210         gint scroll_step;
211         gboolean scroll_halfpage;
212
213         gboolean display_img;
214         gboolean resize_image;
215
216         gchar *force_charset;
217
218         gboolean show_other_header;
219         GSList *disphdr_list;
220
221         gboolean attach_desc;
222
223         /* MIME viewer */
224         gchar *mime_image_viewer;
225         gchar *mime_audio_player;
226         gchar *mime_open_cmd;
227
228         GList *mime_open_cmd_history;
229
230 #if USE_GPGME
231         /* Privacy */
232         gboolean auto_check_signatures;
233         gboolean gpg_signature_popup;
234         gboolean store_passphrase;
235         gint store_passphrase_timeout;
236         gboolean passphrase_grab;
237         gboolean gpg_warning;
238 #endif /* USE_GPGME */
239
240         /* Interface */
241         gboolean sep_folder;
242         gboolean sep_msg;
243         gboolean emulate_emacs;
244         gboolean show_msg_with_cursor_key;
245         gboolean open_unread_on_enter;
246         gboolean mark_as_read_on_new_window;
247         gboolean open_inbox_on_inc;
248         gboolean immediate_exec;
249         RecvDialogMode recv_dialog_mode;
250         SendDialogMode send_dialog_mode;
251         gboolean close_recv_dialog;
252         gboolean no_recv_err_panel;
253         NextUnreadMsgDialogShow next_unread_msg_dialog;
254         gboolean add_address_by_click;
255         gchar *pixmap_theme_path;
256
257         /* Other */
258         gchar *uri_cmd;
259         gchar *print_cmd;
260         gchar *ext_editor_cmd;
261
262         gboolean cliplog;
263         guint loglength;
264
265         gboolean confirm_on_exit;
266         gboolean clean_on_exit;
267         gboolean ask_on_clean;
268         gboolean warn_queued_on_exit;
269 #if 0
270 #ifdef USE_OPENSSL
271         gboolean ssl_ask_unknown_valid;
272 #endif
273 #endif
274
275         /* Memory cache*/
276         gint cache_max_mem_usage;
277         gint cache_min_keep_time;
278         
279         /* boolean for work offline 
280            stored here for use in inc.c */
281         gboolean work_offline;
282         
283         gint summary_quicksearch_type;
284         gint color_new;
285 };
286
287 extern PrefsCommon prefs_common;
288
289 void prefs_common_init          ();
290 void prefs_common_read_config   (void);
291 void prefs_common_save_config   (void);
292 void prefs_common_open          (void);
293
294 #endif /* __PREFS_COMMON_H__ */