Statistics
| Revision:

root / libsylph / prefs_common.h @ 762

History | View | Annotate | Download (5.5 kB)

1
/*
2
 * LibSylph -- E-Mail client library
3
 * Copyright (C) 1999-2005 Hiroyuki Yamamoto
4
 *
5
 * This library is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU Lesser General Public
7
 * License as published by the Free Software Foundation; either
8
 * version 2.1 of the License, or (at your option) any later version.
9
 *
10
 * This library 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 GNU
13
 * Lesser General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU Lesser General Public
16
 * License along with this library; if not, write to the Free Software
17
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  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 enable_autosave;
82
        gint autosave_itv;
83
        gboolean reply_account_autosel;
84
        gboolean default_reply_list;
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
94
        /* Spelling */
95
        gboolean check_spell;
96
        gchar *spell_lang;
97
98
        /* Display */
99
        gchar *textfont;
100
101
        gboolean trans_hdr;
102
        gboolean display_folder_unread;
103
        gboolean display_folder_num_columns;
104
        gint ng_abbrev_len;
105
106
        gboolean swap_from;
107
        gboolean expand_thread;
108
        gchar *date_format;
109
110
        gboolean enable_rules_hint;
111
        gboolean bold_unread;
112
113
        ToolbarStyle toolbar_style;
114
        gboolean show_statusbar;
115
116
        /* Summary columns visibility, position and size */
117
        gboolean summary_col_visible[N_SUMMARY_COLS];
118
        gint summary_col_pos[N_SUMMARY_COLS];
119
        gint summary_col_size[N_SUMMARY_COLS];
120
121
        /* Widget visibility, position and size */
122
        gint folderwin_x;
123
        gint folderwin_y;
124
        gint folderview_width;
125
        gint folderview_height;
126
        gboolean folderview_visible;
127
128
        gint folder_col_folder;
129
        gint folder_col_new;
130
        gint folder_col_unread;
131
        gint folder_col_total;
132
133
        gint summaryview_width;
134
        gint summaryview_height;
135
136
        gint main_msgwin_x;
137
        gint main_msgwin_y;
138
        gint msgview_width;
139
        gint msgview_height;
140
        gboolean msgview_visible;
141
142
        gint mainview_x;
143
        gint mainview_y;
144
        gint mainview_width;
145
        gint mainview_height;
146
        gint mainwin_x;
147
        gint mainwin_y;
148
        gint mainwin_width;
149
        gint mainwin_height;
150
151
        gint msgwin_width;
152
        gint msgwin_height;
153
154
        gint sourcewin_width;
155
        gint sourcewin_height;
156
157
        gint compose_width;
158
        gint compose_height;
159
160
        /* Message */
161
        gboolean enable_color;
162
        gint quote_level1_col;
163
        gint quote_level2_col;
164
        gint quote_level3_col;
165
        gint uri_col;
166
        gushort sig_col;
167
        gboolean recycle_quote_colors;
168
        gboolean conv_mb_alnum;
169
        gboolean display_header_pane;
170
        gboolean display_header;
171
        gint line_space;
172
        gboolean render_html;
173
        gboolean textview_cursor_visible;
174
        gboolean enable_smooth_scroll;
175
        gint scroll_step;
176
        gboolean scroll_halfpage;
177
178
        gboolean resize_image;
179
        gboolean inline_image;
180
181
        gchar *force_charset;
182
        gchar *default_encoding;
183
184
        gboolean show_other_header;
185
        GSList *disphdr_list;
186
187
        /* MIME viewer */
188
        gchar *mime_image_viewer;
189
        gchar *mime_audio_player;
190
        gchar *mime_open_cmd;
191
192
        GList *mime_open_cmd_history;
193
194
        /* Junk Mail */
195
        gboolean enable_junk;
196
        gchar *junk_learncmd;
197
        gchar *nojunk_learncmd;
198
        gchar *junk_classify_cmd;
199
        gchar *junk_folder;
200
        gboolean filter_junk_on_recv;
201
        gboolean delete_junk_on_recv;
202
        gboolean mark_junk_as_read;
203
204
        /* Privacy */
205
        gboolean auto_check_signatures;
206
        gboolean gpg_signature_popup;
207
        gboolean store_passphrase;
208
        gint store_passphrase_timeout;
209
        gboolean passphrase_grab;
210
        gboolean gpg_warning;
211
212
        /* Interface */
213
        gboolean sep_folder;
214
        gboolean sep_msg;
215
        gboolean always_show_msg;
216
        gboolean open_unread_on_enter;
217
        gboolean mark_as_read_on_new_window;
218
        gboolean open_inbox_on_inc;
219
        gboolean immediate_exec;
220
        RecvDialogMode recv_dialog_mode;
221
        gboolean no_recv_err_panel;
222
        gboolean close_recv_dialog;
223
        gboolean comply_gnome_hig;
224
225
        /* Other */
226
        gchar *uri_cmd;
227
        gchar *print_cmd;
228
        gchar *ext_editor_cmd;
229
230
        gboolean add_address_by_click;
231
232
        gboolean confirm_on_exit;
233
        gboolean clean_on_exit;
234
        gboolean ask_on_clean;
235
        gboolean warn_queued_on_exit;
236
237
        gint logwin_line_limit;
238
239
        /* Advanced */
240
        gboolean strict_cache_check;
241
        gint io_timeout_secs;
242
243
        /* Filtering */
244
        GSList *fltlist;
245
        GSList *junk_fltlist;
246
247
        /* Actions */
248
        GSList *actions_list;
249
250
        /* Online / Offline */
251
        gboolean online_mode;
252
};
253
254
extern PrefsCommon prefs_common;
255
256
PrefParam *prefs_common_get_params        (void);
257
258
void prefs_common_read_config                (void);
259
void prefs_common_write_config                (void);
260
261
void prefs_common_junk_filter_list_set        (void);
262
263
#endif /* __PREFS_COMMON_H__ */