03ab4ed8e035dc2941c606af68240c9dc24f9aea
[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 "codeconv.h"
31 #include "textview.h"
32
33 typedef struct _PrefsCommon     PrefsCommon;
34
35 typedef enum {
36         RECV_DIALOG_ALWAYS,
37         RECV_DIALOG_ACTIVE,
38         RECV_DIALOG_NEVER
39 } RecvDialogMode;
40
41 typedef enum
42 {
43         NEXTUNREADMSGDIALOG_ALWAYS,
44         NEXTUNREADMSGDIALOG_ASSUME_YES,
45         NEXTUNREADMSGDIALOG_ASSUME_NO
46 } NextUnreadMsgDialogShow;
47
48 struct _PrefsCommon
49 {
50         /* Receive */
51         gboolean use_extinc;
52         gchar *extinc_cmd;
53         gboolean inc_local;
54         gboolean filter_on_inc;
55         gchar *spool_path;
56         gboolean scan_all_after_inc;
57         gboolean autochk_newmail;
58         gint autochk_itv;
59         gboolean chk_on_startup;
60         gboolean noerrorpanel;
61         gint max_articles;
62
63         /* Send */
64         gboolean use_extsend;
65         gchar *extsend_cmd;
66         gboolean savemsg;
67         gboolean queue_msg;
68         gchar *outgoing_charset;
69
70         /* Compose */
71         gboolean reply_with_quote;
72         gchar *quotemark;
73         gchar *quotefmt;
74         gboolean auto_sig;
75         gchar *sig_sep;
76         gint linewrap_len;
77         gboolean linewrap_quote;
78         gboolean linewrap_at_send;
79         gboolean auto_exteditor;
80         gboolean reply_account_autosel;
81         gboolean forward_account_autosel;
82         gboolean reedit_account_autosel;
83         gboolean show_ruler;
84         gchar *fw_quotemark;
85         gchar *fw_quotefmt;
86         gboolean forward_as_attachment;
87         gboolean smart_wrapping;
88 #if USE_PSPELL
89         gboolean enable_pspell;
90         gchar *pspell_path;
91         gchar *dictionary;
92 #endif
93         
94         /* Display */
95         gchar *widgetfont;
96         gchar *textfont;
97         gchar *normalfont;
98         gchar *boldfont;
99         gchar *smallfont;
100         gboolean display_folder_unread;
101         ToolbarStyle toolbar_style;
102         gboolean show_statusbar;
103         gboolean trans_hdr;
104         gboolean enable_thread;
105         gboolean enable_hscrollbar;
106         gboolean expand_thread;
107         gboolean bold_unread;
108         gboolean swap_from;
109         gboolean use_addr_book;
110         gchar *date_format;
111
112         /* Filtering */
113         GSList *fltlist;
114
115         gint kill_score;
116         gint important_score;
117
118         gboolean show_mark;
119         gboolean show_unread;
120         gboolean show_mime;
121         gboolean show_number;
122         gboolean show_score;
123         gboolean show_size;
124         gboolean show_date;
125         gboolean show_from;
126         gboolean show_subject;
127
128         /* Widget size */
129         gint folderview_x;
130         gint folderview_y;
131         gint folderview_width;
132         gint folderview_height;
133         gint folder_col_folder;
134         gint folder_col_new;
135         gint folder_col_unread;
136         gint folder_col_total;
137
138         gint summaryview_width;
139         gint summaryview_height;
140         gint summary_col_mark;
141         gint summary_col_unread;
142         gint summary_col_mime;
143         gint summary_col_number;
144         gint summary_col_size;
145         gint summary_col_date;
146         gint summary_col_from;
147         gint summary_col_subject;
148         gint summary_col_score;
149
150         gint mainview_x;
151         gint mainview_y;
152         gint mainview_width;
153         gint mainview_height;
154         gint mainwin_x;
155         gint mainwin_y;
156         gint mainwin_width;
157         gint mainwin_height;
158
159         gint msgwin_width;
160         gint msgwin_height;
161
162         gint compose_width;
163         gint compose_height;
164
165         /* Message */
166         gboolean enable_color;
167         gint quote_level1_col;
168         gint quote_level2_col;
169         gint quote_level3_col;
170         gint uri_col;
171         gint tgt_folder_col;
172         gushort sig_col;
173         gboolean recycle_quote_colors;
174         gboolean conv_mb_alnum;
175         gboolean display_header_pane;
176         gboolean display_header;
177         gboolean head_space;
178         gint line_space;
179         gboolean enable_smooth_scroll;
180         gint scroll_step;
181         gboolean scroll_halfpage;
182
183         gchar *force_charset;
184
185         gboolean show_other_header;
186         GSList *disphdr_list;
187
188         /* MIME viewer */
189         gchar *mime_image_viewer;
190         gchar *mime_audio_player;
191
192         /* Privacy */
193         gboolean default_encrypt;
194         gboolean default_sign;
195         gboolean auto_check_signatures;
196         gboolean gpg_signature_popup;
197         gboolean passphrase_grab;
198         gchar *default_signkey;
199         gboolean gpg_warning;
200
201         /* Interface */
202         gboolean sep_folder;
203         gboolean sep_msg;
204         gboolean emulate_emacs;
205         gboolean open_unread_on_enter;
206         gboolean open_inbox_on_inc;
207         gboolean immediate_exec;
208         RecvDialogMode recv_dialog_mode;
209         NextUnreadMsgDialogShow next_unread_msg_dialog;
210         gboolean add_address_by_click;
211
212         gboolean confirm_on_exit;
213         gboolean clean_on_exit;
214         gboolean ask_on_clean;
215         gboolean warn_queued_on_exit;
216         gboolean return_receipt;
217
218         /* Other */
219         gchar *uri_cmd;
220         gchar *print_cmd;
221         gchar *ext_editor_cmd;
222 };
223
224 extern PrefsCommon prefs_common;
225
226 void prefs_common_read_config   (void);
227 void prefs_common_save_config   (void);
228 void prefs_common_open          (void);
229
230 void prefs_summary_display_item_set     (void);
231
232 #endif /* __PREFS_COMMON_H__ */