sync with sylpheed 0.6.5cvs14
[claws.git] / src / prefs_common.h
1 /*
2  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3  * Copyright (C) 1999-2001 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         gint max_articles;
63
64         /* Send */
65         gboolean use_extsend;
66         gchar *extsend_cmd;
67         gboolean savemsg;
68         gboolean queue_msg;
69         gchar *outgoing_charset;
70
71         /* Compose */
72         gboolean auto_sig;
73         gchar *sig_sep;
74         gint linewrap_len;
75         gboolean linewrap_quote;
76         gboolean linewrap_at_send;
77         gboolean auto_exteditor;
78         gboolean reply_account_autosel;
79         gboolean forward_account_autosel;
80         gboolean reedit_account_autosel;
81         gboolean show_ruler;
82
83         /* Quote */
84         gboolean reply_with_quote;
85         gchar *quotemark;
86         gchar *quotefmt;
87         gchar *fw_quotemark;
88         gchar *fw_quotefmt;
89         gboolean forward_as_attachment;
90         gboolean smart_wrapping;
91         gboolean block_cursor;
92 #if USE_PSPELL
93         gboolean enable_pspell;
94         gchar *pspell_path;
95         gchar *dictionary;
96 #endif
97         
98         /* Display */
99         gchar *widgetfont;
100         gchar *textfont;
101         gchar *normalfont;
102         gchar *boldfont;
103         gchar *smallfont;
104         gboolean display_folder_unread;
105         ToolbarStyle toolbar_style;
106         gboolean show_statusbar;
107         gboolean trans_hdr;
108         gboolean enable_thread;
109         gboolean enable_hscrollbar;
110         gboolean expand_thread;
111         gboolean bold_unread;
112         gboolean swap_from;
113         gboolean use_addr_book;
114         gchar *date_format;
115
116         /* Filtering */
117         GSList *fltlist;
118
119         gint kill_score;
120         gint important_score;
121
122         /* Summary columns visibility, position and size */
123         gboolean summary_col_visible[N_SUMMARY_COLS];
124         gint summary_col_pos[N_SUMMARY_COLS];
125         gint summary_col_size[N_SUMMARY_COLS];
126
127         /* Widget size */
128         gint folderview_x;
129         gint folderview_y;
130         gint folderview_width;
131         gint folderview_height;
132         gint folder_col_folder;
133         gint folder_col_new;
134         gint folder_col_unread;
135         gint folder_col_total;
136
137         gint summaryview_width;
138         gint summaryview_height;
139
140         gint mainview_x;
141         gint mainview_y;
142         gint mainview_width;
143         gint mainview_height;
144         gint mainwin_x;
145         gint mainwin_y;
146         gint mainwin_width;
147         gint mainwin_height;
148
149         gint msgwin_width;
150         gint msgwin_height;
151
152         gint compose_width;
153         gint compose_height;
154
155         /* Message */
156         gboolean enable_color;
157         gint quote_level1_col;
158         gint quote_level2_col;
159         gint quote_level3_col;
160         gint uri_col;
161         gint tgt_folder_col;
162         gushort sig_col;
163         gboolean recycle_quote_colors;
164         gboolean conv_mb_alnum;
165         gboolean display_header_pane;
166         gboolean display_header;
167         gboolean head_space;
168         gint line_space;
169         gboolean enable_smooth_scroll;
170         gint scroll_step;
171         gboolean scroll_halfpage;
172
173         gchar *force_charset;
174
175         gboolean show_other_header;
176         GSList *disphdr_list;
177
178         /* MIME viewer */
179         gchar *mime_image_viewer;
180         gchar *mime_audio_player;
181         gchar *mime_open_cmd;
182
183         GList *mime_open_cmd_history;
184
185         /* Privacy */
186         gboolean default_encrypt;
187         gboolean ascii_armored;
188         gboolean default_sign;
189         gboolean auto_check_signatures;
190         gboolean gpg_signature_popup;
191         gboolean passphrase_grab;
192         gchar *default_signkey;
193         gboolean gpg_warning;
194
195         /* Interface */
196         gboolean sep_folder;
197         gboolean sep_msg;
198         gboolean emulate_emacs;
199         gboolean open_unread_on_enter;
200         gboolean open_inbox_on_inc;
201         gboolean immediate_exec;
202         RecvDialogMode recv_dialog_mode;
203         NextUnreadMsgDialogShow next_unread_msg_dialog;
204         gboolean add_address_by_click;
205
206         gboolean confirm_on_exit;
207         gboolean clean_on_exit;
208         gboolean ask_on_clean;
209         gboolean warn_queued_on_exit;
210         gboolean return_receipt;
211
212         /* Other */
213         gchar *uri_cmd;
214         gchar *print_cmd;
215         gchar *ext_editor_cmd;
216 };
217
218 extern PrefsCommon prefs_common;
219
220 void prefs_common_init          ();
221 void prefs_common_read_config   (void);
222 void prefs_common_save_config   (void);
223 void prefs_common_open          (void);
224
225 void prefs_quote_description    (void);
226
227 #endif /* __PREFS_COMMON_H__ */