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