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