add ability to leave downloaded mail on server for n days
[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 noerrorpanel;
62         gboolean newmail_notify_auto;
63         gboolean newmail_notify_manu;
64         gchar   *newmail_notify_cmd;
65         gint max_articles;
66
67         /* Send */
68         gboolean use_extsend;
69         gchar *extsend_cmd;
70         gboolean savemsg;
71         gboolean queue_msg;
72         gchar *outgoing_charset;
73
74         /* Compose */
75         gboolean auto_sig;
76         gchar *sig_sep;
77         gint undolevels;
78         gint linewrap_len;
79         gboolean linewrap_quote;
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 smart_wrapping;
95         gboolean block_cursor;
96 #if USE_PSPELL
97         gboolean enable_pspell;
98         gchar *pspell_path;
99         gchar *dictionary;
100         gint misspelled_col;
101         gint pspell_sugmode;
102         gboolean check_while_typing;
103         gboolean use_alternate;
104 #endif
105         
106         /* Display */
107         gchar *widgetfont;
108         gchar *textfont;
109         gchar *normalfont;
110         gchar *boldfont;
111         gchar *smallfont;
112         gboolean display_folder_unread;
113         ToolbarStyle toolbar_style;
114         gboolean show_statusbar;
115         gboolean trans_hdr;
116         gboolean enable_thread;
117         gboolean enable_hscrollbar;
118         gboolean expand_thread;
119         gboolean bold_unread;
120         gboolean swap_from;
121         gboolean use_addr_book;
122         gchar *date_format;
123
124         /* Filtering */
125         GSList *fltlist;
126
127         gint kill_score;
128         gint important_score;
129
130         /* Actions */
131         GSList *actionslst;
132
133         /* Summary columns visibility, position and size */
134         gboolean summary_col_visible[N_SUMMARY_COLS];
135         gint summary_col_pos[N_SUMMARY_COLS];
136         gint summary_col_size[N_SUMMARY_COLS];
137
138         /* Widget size */
139         gint folderview_x;
140         gint folderview_y;
141         gint folderview_width;
142         gint folderview_height;
143         gint folder_col_folder;
144         gint folder_col_new;
145         gint folder_col_unread;
146         gint folder_col_total;
147
148         gint summaryview_width;
149         gint summaryview_height;
150
151         gint mainview_x;
152         gint mainview_y;
153         gint mainview_width;
154         gint mainview_height;
155         gint mainwin_x;
156         gint mainwin_y;
157         gint mainwin_width;
158         gint mainwin_height;
159
160         gint msgwin_width;
161         gint msgwin_height;
162
163         gint compose_width;
164         gint compose_height;
165
166         /* Message */
167         gboolean enable_color;
168         gint quote_level1_col;
169         gint quote_level2_col;
170         gint quote_level3_col;
171         gint uri_col;
172         gint tgt_folder_col;
173         gushort sig_col;
174         gboolean recycle_quote_colors;
175         gboolean conv_mb_alnum;
176         gboolean display_header_pane;
177         gboolean display_header;
178         gboolean head_space;
179         gint line_space;
180         gboolean enable_smooth_scroll;
181         gint scroll_step;
182         gboolean scroll_halfpage;
183
184         gchar *force_charset;
185
186         gboolean show_other_header;
187         GSList *disphdr_list;
188
189         /* MIME viewer */
190         gchar *mime_image_viewer;
191         gchar *mime_audio_player;
192         gchar *mime_open_cmd;
193
194         GList *mime_open_cmd_history;
195
196 #if USE_GPGME 
197         /* Privacy */
198         gboolean auto_check_signatures;
199         gboolean gpg_signature_popup;
200         gboolean passphrase_grab;
201         gchar *default_signkey;
202         gboolean gpg_warning;
203 #endif /* USE_GPGME */
204
205         /* Interface */
206         gboolean sep_folder;
207         gboolean sep_msg;
208         gboolean emulate_emacs;
209         gboolean open_unread_on_enter;
210         gboolean open_inbox_on_inc;
211         gboolean immediate_exec;
212         RecvDialogMode recv_dialog_mode;
213         NextUnreadMsgDialogShow next_unread_msg_dialog;
214         gboolean add_address_by_click;
215         gchar *pixmap_theme_path;
216
217         /* Other */
218         gchar *uri_cmd;
219         gchar *print_cmd;
220         gchar *ext_editor_cmd;
221
222         gboolean confirm_on_exit;
223         gboolean clean_on_exit;
224         gboolean ask_on_clean;
225         gboolean warn_queued_on_exit;
226         gboolean return_receipt;
227 };
228
229 extern PrefsCommon prefs_common;
230
231 void prefs_common_init          ();
232 void prefs_common_read_config   (void);
233 void prefs_common_save_config   (void);
234 void prefs_common_open          (void);
235
236 #endif /* __PREFS_COMMON_H__ */