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