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