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