Statistics
| Revision:

root / libsylph / prefs_common.h @ 548

History | View | Annotate | Download (5.3 kB)

1
/*
2
 * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3
 * Copyright (C) 1999-2005 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
typedef struct _PrefsCommon        PrefsCommon;
30
31
#include "enums.h"
32
#include "prefs.h"
33
34
typedef enum {
35
        RECV_DIALOG_ALWAYS,
36
        RECV_DIALOG_MANUAL,
37
        RECV_DIALOG_NEVER
38
} RecvDialogMode;
39
40
typedef enum {
41
        CTE_AUTO,
42
        CTE_BASE64,
43
        CTE_QUOTED_PRINTABLE,
44
        CTE_8BIT
45
} TransferEncodingMethod;
46
47
struct _PrefsCommon
48
{
49
        /* Receive */
50
        gboolean use_extinc;
51
        gchar *extinc_cmd;
52
        gboolean inc_local;
53
        gboolean filter_on_inc;
54
        gchar *spool_path;
55
        gboolean scan_all_after_inc;
56
        gboolean autochk_newmail;
57
        gint autochk_itv;
58
        gboolean chk_on_startup;
59
        gboolean enable_newmsg_notify;
60
        gchar *newmsg_notify_cmd;
61
62
        /* Send */
63
        gboolean use_extsend;
64
        gchar *extsend_cmd;
65
        gboolean savemsg;
66
        gboolean filter_sent;
67
        gchar *outgoing_charset;
68
        TransferEncodingMethod encoding_method;
69
70
        gboolean allow_jisx0201_kana;
71
72
        /* Compose */
73
        gboolean auto_sig;
74
        gchar *sig_sep;
75
        gint undolevels;
76
        gint linewrap_len;
77
        gboolean linewrap_quote;
78
        gboolean autowrap;
79
        gboolean linewrap_at_send;
80
        gboolean auto_exteditor;
81
        gboolean reply_account_autosel;
82
        gboolean default_reply_list;
83
        gboolean show_ruler;
84
85
        /* Quote */
86
        gboolean reply_with_quote;
87
        gchar *quotemark;
88
        gchar *quotefmt;
89
        gchar *fw_quotemark;
90
        gchar *fw_quotefmt;
91
92
        /* Display */
93
        gchar *textfont;
94
95
        gboolean trans_hdr;
96
        gboolean display_folder_unread;
97
        gint ng_abbrev_len;
98
99
        gboolean swap_from;
100
        gboolean expand_thread;
101
        gchar *date_format;
102
103
        gboolean enable_rules_hint;
104
        gboolean bold_unread;
105
106
        ToolbarStyle toolbar_style;
107
        gboolean show_statusbar;
108
109
        gint folderview_vscrollbar_policy;
110
111
        /* Summary columns visibility, position and size */
112
        gboolean summary_col_visible[N_SUMMARY_COLS];
113
        gint summary_col_pos[N_SUMMARY_COLS];
114
        gint summary_col_size[N_SUMMARY_COLS];
115
116
        /* Widget visibility, position and size */
117
        gint folderwin_x;
118
        gint folderwin_y;
119
        gint folderview_width;
120
        gint folderview_height;
121
        gboolean folderview_visible;
122
123
        gint folder_col_folder;
124
        gint folder_col_new;
125
        gint folder_col_unread;
126
        gint folder_col_total;
127
128
        gint summaryview_width;
129
        gint summaryview_height;
130
131
        gint main_msgwin_x;
132
        gint main_msgwin_y;
133
        gint msgview_width;
134
        gint msgview_height;
135
        gboolean msgview_visible;
136
137
        gint mainview_x;
138
        gint mainview_y;
139
        gint mainview_width;
140
        gint mainview_height;
141
        gint mainwin_x;
142
        gint mainwin_y;
143
        gint mainwin_width;
144
        gint mainwin_height;
145
146
        gint msgwin_width;
147
        gint msgwin_height;
148
149
        gint sourcewin_width;
150
        gint sourcewin_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
        gushort sig_col;
162
        gboolean recycle_quote_colors;
163
        gboolean conv_mb_alnum;
164
        gboolean display_header_pane;
165
        gboolean display_header;
166
        gint line_space;
167
        gboolean render_html;
168
        gboolean textview_cursor_visible;
169
        gboolean enable_smooth_scroll;
170
        gint scroll_step;
171
        gboolean scroll_halfpage;
172
173
        gboolean resize_image;
174
        gboolean inline_image;
175
176
        gchar *force_charset;
177
178
        gboolean show_other_header;
179
        GSList *disphdr_list;
180
181
        /* MIME viewer */
182
        gchar *mime_image_viewer;
183
        gchar *mime_audio_player;
184
        gchar *mime_open_cmd;
185
186
        GList *mime_open_cmd_history;
187
188
        /* Junk Mail */
189
        gboolean enable_junk;
190
        gchar *junk_learncmd;
191
        gchar *nojunk_learncmd;
192
        gchar *junk_classify_cmd;
193
        gchar *junk_folder;
194
        gboolean filter_junk_on_recv;
195
196
#if USE_GPGME
197
        /* Privacy */
198
        gboolean auto_check_signatures;
199
        gboolean gpg_signature_popup;
200
        gboolean store_passphrase;
201
        gint store_passphrase_timeout;
202
        gboolean passphrase_grab;
203
        gboolean gpg_warning;
204
#endif /* USE_GPGME */
205
206
        /* Interface */
207
        gboolean sep_folder;
208
        gboolean sep_msg;
209
        gboolean always_show_msg;
210
        gboolean open_unread_on_enter;
211
        gboolean mark_as_read_on_new_window;
212
        gboolean open_inbox_on_inc;
213
        gboolean immediate_exec;
214
        RecvDialogMode recv_dialog_mode;
215
        gboolean no_recv_err_panel;
216
        gboolean close_recv_dialog;
217
        gboolean comply_gnome_hig;
218
219
        /* Other */
220
        gchar *uri_cmd;
221
        gchar *print_cmd;
222
        gchar *ext_editor_cmd;
223
224
        gboolean add_address_by_click;
225
226
        gboolean confirm_on_exit;
227
        gboolean clean_on_exit;
228
        gboolean ask_on_clean;
229
        gboolean warn_queued_on_exit;
230
231
        gint logwin_line_limit;
232
233
        /* Advanced */
234
        gboolean strict_cache_check;
235
        gint io_timeout_secs;
236
237
        /* Filtering */
238
        GSList *fltlist;
239
        GSList *junk_fltlist;
240
241
        /* Actions */
242
        GSList *actions_list;
243
244
        /* Online / Offline */
245
        gboolean online_mode;
246
};
247
248
extern PrefsCommon prefs_common;
249
250
PrefParam *prefs_common_get_params        (void);
251
252
void prefs_common_read_config                (void);
253
void prefs_common_write_config                (void);
254
255
void prefs_common_junk_filter_list_set        (void);
256
257
#endif /* __PREFS_COMMON_H__ */