Statistics
| Revision:

root / libsylph / prefs_common.h @ 3081

History | View | Annotate | Download (7.7 kB)

1 1 hiro
/*
2 578 hiro
 * LibSylph -- E-Mail client library
3 3043 hiro
 * Copyright (C) 1999-2012 Hiroyuki Yamamoto
4 1 hiro
 *
5 578 hiro
 * This library is free software; you can redistribute it and/or
6 578 hiro
 * modify it under the terms of the GNU Lesser General Public
7 578 hiro
 * License as published by the Free Software Foundation; either
8 578 hiro
 * version 2.1 of the License, or (at your option) any later version.
9 1 hiro
 *
10 578 hiro
 * This library is distributed in the hope that it will be useful,
11 1 hiro
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 578 hiro
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 578 hiro
 * Lesser General Public License for more details.
14 1 hiro
 *
15 578 hiro
 * You should have received a copy of the GNU Lesser General Public
16 578 hiro
 * License along with this library; if not, write to the Free Software
17 578 hiro
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18 1 hiro
 */
19 1 hiro
20 1 hiro
#ifndef __PREFS_COMMON_H__
21 1 hiro
#define __PREFS_COMMON_H__
22 1 hiro
23 1 hiro
#ifdef HAVE_CONFIG_H
24 1 hiro
#  include "config.h"
25 1 hiro
#endif
26 1 hiro
27 1 hiro
#include <glib.h>
28 1 hiro
29 533 hiro
typedef struct _PrefsCommon        PrefsCommon;
30 533 hiro
31 535 hiro
#include "enums.h"
32 533 hiro
#include "prefs.h"
33 1 hiro
34 1 hiro
typedef enum {
35 1 hiro
        RECV_DIALOG_ALWAYS,
36 1 hiro
        RECV_DIALOG_MANUAL,
37 1 hiro
        RECV_DIALOG_NEVER
38 1 hiro
} RecvDialogMode;
39 1 hiro
40 1 hiro
typedef enum {
41 1 hiro
        CTE_AUTO,
42 1 hiro
        CTE_BASE64,
43 1 hiro
        CTE_QUOTED_PRINTABLE,
44 1 hiro
        CTE_8BIT
45 1 hiro
} TransferEncodingMethod;
46 1 hiro
47 1052 hiro
typedef enum {
48 1052 hiro
        FENC_MIME,
49 1052 hiro
        FENC_RFC2231,
50 1052 hiro
        FENC_NONE
51 1052 hiro
} MIMEFilenameEncodingMethod;
52 1052 hiro
53 1 hiro
struct _PrefsCommon
54 1 hiro
{
55 1 hiro
        /* Receive */
56 1 hiro
        gboolean scan_all_after_inc;
57 1 hiro
        gboolean autochk_newmail;
58 1 hiro
        gint autochk_itv;
59 1 hiro
        gboolean chk_on_startup;
60 351 hiro
        gboolean enable_newmsg_notify;
61 351 hiro
        gchar *newmsg_notify_cmd;
62 1 hiro
63 766 hiro
        gboolean inc_local;
64 766 hiro
        gboolean filter_on_inc;
65 766 hiro
        gchar *spool_path;
66 766 hiro
67 1 hiro
        /* Send */
68 1 hiro
        gboolean savemsg;
69 317 hiro
        gboolean filter_sent;
70 1 hiro
        TransferEncodingMethod encoding_method;
71 1052 hiro
        MIMEFilenameEncodingMethod mime_fencoding_method;
72 1 hiro
73 1968 hiro
        gboolean check_attach;
74 1968 hiro
        gchar *check_attach_str;
75 1970 hiro
        gboolean check_recipients;
76 1985 hiro
        gchar *check_recp_exclude;
77 1968 hiro
78 1 hiro
        gboolean allow_jisx0201_kana;
79 1 hiro
80 1 hiro
        /* Compose */
81 1 hiro
        gboolean auto_sig;
82 1 hiro
        gchar *sig_sep;
83 1 hiro
        gint undolevels;
84 1 hiro
        gint linewrap_len;
85 1 hiro
        gboolean linewrap_quote;
86 1 hiro
        gboolean autowrap;
87 1 hiro
        gboolean auto_exteditor;
88 718 hiro
        gboolean enable_autosave;
89 718 hiro
        gint autosave_itv;
90 1 hiro
        gboolean reply_account_autosel;
91 1 hiro
        gboolean default_reply_list;
92 1384 hiro
        gboolean inherit_recipient_on_self_reply;
93 1384 hiro
94 1 hiro
        gboolean show_ruler;
95 1 hiro
96 1 hiro
        /* Quote */
97 1 hiro
        gboolean reply_with_quote;
98 1 hiro
        gchar *quotemark;
99 1 hiro
        gchar *quotefmt;
100 1 hiro
        gchar *fw_quotemark;
101 1 hiro
        gchar *fw_quotefmt;
102 1 hiro
103 762 hiro
        /* Spelling */
104 762 hiro
        gboolean check_spell;
105 762 hiro
        gchar *spell_lang;
106 762 hiro
107 1 hiro
        /* Display */
108 1 hiro
        gchar *textfont;
109 1 hiro
110 1 hiro
        gboolean trans_hdr;
111 1 hiro
        gboolean display_folder_unread;
112 589 hiro
        gboolean display_folder_num_columns;
113 1 hiro
        gint ng_abbrev_len;
114 1 hiro
115 1 hiro
        gboolean swap_from;
116 1 hiro
        gboolean expand_thread;
117 1 hiro
        gchar *date_format;
118 1 hiro
119 253 hiro
        gboolean enable_rules_hint;
120 1 hiro
        gboolean bold_unread;
121 1 hiro
122 1688 hiro
        gboolean persist_qsearch_filter;
123 1688 hiro
124 1 hiro
        ToolbarStyle toolbar_style;
125 901 hiro
        gboolean show_searchbar;
126 1 hiro
        gboolean show_statusbar;
127 1 hiro
128 1497 hiro
        gchar *main_toolbar_setting;
129 1497 hiro
        gchar *compose_toolbar_setting;
130 1497 hiro
131 1949 hiro
        LayoutType layout_type;
132 1949 hiro
133 1 hiro
        /* Summary columns visibility, position and size */
134 1 hiro
        gboolean summary_col_visible[N_SUMMARY_COLS];
135 1 hiro
        gint summary_col_pos[N_SUMMARY_COLS];
136 1894 hiro
        gboolean summary_sent_col_visible[N_SUMMARY_COLS];
137 1894 hiro
        gint summary_sent_col_pos[N_SUMMARY_COLS];
138 1 hiro
        gint summary_col_size[N_SUMMARY_COLS];
139 1 hiro
140 1 hiro
        /* Widget visibility, position and size */
141 1 hiro
        gint folderwin_x;
142 1 hiro
        gint folderwin_y;
143 1 hiro
        gint folderview_width;
144 1 hiro
        gint folderview_height;
145 1 hiro
        gboolean folderview_visible;
146 1 hiro
147 1 hiro
        gint folder_col_folder;
148 1 hiro
        gint folder_col_new;
149 1 hiro
        gint folder_col_unread;
150 1 hiro
        gint folder_col_total;
151 1 hiro
152 1 hiro
        gint summaryview_width;
153 1 hiro
        gint summaryview_height;
154 1949 hiro
        gint summaryview_vwidth;
155 1949 hiro
        gint summaryview_vheight;
156 1 hiro
157 1 hiro
        gint main_msgwin_x;
158 1 hiro
        gint main_msgwin_y;
159 1 hiro
        gint msgview_width;
160 1 hiro
        gint msgview_height;
161 1949 hiro
        gint msgview_vwidth;
162 1949 hiro
        gint msgview_vheight;
163 1 hiro
        gboolean msgview_visible;
164 1 hiro
165 1 hiro
        gint mainview_x;
166 1 hiro
        gint mainview_y;
167 1 hiro
        gint mainview_width;
168 1 hiro
        gint mainview_height;
169 1 hiro
        gint mainwin_x;
170 1 hiro
        gint mainwin_y;
171 1 hiro
        gint mainwin_width;
172 1 hiro
        gint mainwin_height;
173 1 hiro
174 1 hiro
        gint msgwin_width;
175 1 hiro
        gint msgwin_height;
176 1 hiro
177 838 hiro
        gboolean mainwin_maximized;
178 838 hiro
179 1 hiro
        gint sourcewin_width;
180 1 hiro
        gint sourcewin_height;
181 1 hiro
182 769 hiro
        gint compose_x;
183 769 hiro
        gint compose_y;
184 1 hiro
        gint compose_width;
185 1 hiro
        gint compose_height;
186 1 hiro
187 1990 hiro
        gboolean compose_maximized;
188 1990 hiro
189 1028 hiro
        gint addressbook_x;
190 1028 hiro
        gint addressbook_y;
191 946 hiro
        gint addressbook_width;
192 946 hiro
        gint addressbook_height;
193 946 hiro
194 1 hiro
        /* Message */
195 1 hiro
        gboolean enable_color;
196 1 hiro
        gint quote_level1_col;
197 1 hiro
        gint quote_level2_col;
198 1 hiro
        gint quote_level3_col;
199 1 hiro
        gint uri_col;
200 1 hiro
        gushort sig_col;
201 1 hiro
        gboolean recycle_quote_colors;
202 1 hiro
        gboolean conv_mb_alnum;
203 1 hiro
        gboolean display_header_pane;
204 1 hiro
        gboolean display_header;
205 1 hiro
        gint line_space;
206 177 hiro
        gboolean render_html;
207 1947 hiro
        gboolean html_only_as_attach;
208 269 hiro
        gboolean textview_cursor_visible;
209 1 hiro
        gboolean enable_smooth_scroll;
210 1 hiro
        gint scroll_step;
211 1 hiro
        gboolean scroll_halfpage;
212 1 hiro
213 1 hiro
        gboolean resize_image;
214 97 hiro
        gboolean inline_image;
215 1 hiro
216 766 hiro
        /* Encoding */
217 1 hiro
        gchar *force_charset;
218 716 hiro
        gchar *default_encoding;
219 786 hiro
        gchar *outgoing_charset;
220 1 hiro
221 1 hiro
        gboolean show_other_header;
222 1 hiro
        GSList *disphdr_list;
223 1 hiro
224 1 hiro
        /* MIME viewer */
225 1 hiro
        gchar *mime_image_viewer;
226 1 hiro
        gchar *mime_audio_player;
227 1 hiro
        gchar *mime_open_cmd;
228 1035 hiro
        gchar *mime_cmd;
229 1 hiro
230 1 hiro
        GList *mime_open_cmd_history;
231 1 hiro
232 306 hiro
        /* Junk Mail */
233 306 hiro
        gboolean enable_junk;
234 306 hiro
        gchar *junk_learncmd;
235 306 hiro
        gchar *nojunk_learncmd;
236 336 hiro
        gchar *junk_classify_cmd;
237 306 hiro
        gchar *junk_folder;
238 336 hiro
        gboolean filter_junk_on_recv;
239 1097 hiro
        gboolean filter_junk_before;
240 689 hiro
        gboolean delete_junk_on_recv;
241 710 hiro
        gboolean mark_junk_as_read;
242 306 hiro
243 1 hiro
        /* Privacy */
244 1 hiro
        gboolean auto_check_signatures;
245 1 hiro
        gboolean gpg_signature_popup;
246 1 hiro
        gboolean store_passphrase;
247 1 hiro
        gint store_passphrase_timeout;
248 1 hiro
        gboolean passphrase_grab;
249 1 hiro
        gboolean gpg_warning;
250 1 hiro
251 1 hiro
        /* Interface */
252 1 hiro
        gboolean sep_folder;
253 1 hiro
        gboolean sep_msg;
254 1 hiro
        gboolean always_show_msg;
255 1 hiro
        gboolean open_unread_on_enter;
256 1262 hiro
        gboolean remember_last_selected;
257 1 hiro
        gboolean mark_as_read_on_new_window;
258 1 hiro
        gboolean open_inbox_on_inc;
259 1260 hiro
        gboolean open_inbox_on_startup;
260 1 hiro
        gboolean immediate_exec;
261 766 hiro
        gboolean comply_gnome_hig;
262 896 hiro
        gboolean show_trayicon;
263 1189 hiro
        gboolean minimize_to_tray;
264 1466 hiro
        gboolean toggle_window_on_trayicon_click;
265 766 hiro
266 766 hiro
        /* Other */
267 1 hiro
        RecvDialogMode recv_dialog_mode;
268 405 hiro
        gboolean no_recv_err_panel;
269 1 hiro
        gboolean close_recv_dialog;
270 1 hiro
271 405 hiro
        gboolean add_address_by_click;
272 405 hiro
273 1 hiro
        gboolean confirm_on_exit;
274 1 hiro
        gboolean clean_on_exit;
275 1 hiro
        gboolean ask_on_clean;
276 1 hiro
        gboolean warn_queued_on_exit;
277 1 hiro
278 360 hiro
        gint logwin_line_limit;
279 360 hiro
280 766 hiro
        /* External commands */
281 766 hiro
        gchar *uri_cmd;
282 766 hiro
        gchar *ext_editor_cmd;
283 766 hiro
284 1385 hiro
        gboolean use_print_cmd;
285 1385 hiro
        gchar *print_cmd;
286 1385 hiro
287 766 hiro
        gboolean use_extinc;
288 766 hiro
        gchar *extinc_cmd;
289 766 hiro
        gboolean use_extsend;
290 766 hiro
        gchar *extsend_cmd;
291 766 hiro
292 2164 hiro
        /* Update check */
293 2164 hiro
        gboolean auto_update_check;
294 2164 hiro
        gboolean use_http_proxy;
295 2164 hiro
        gchar *http_proxy_host;
296 2164 hiro
297 360 hiro
        /* Advanced */
298 360 hiro
        gboolean strict_cache_check;
299 1 hiro
        gint io_timeout_secs;
300 1 hiro
301 1 hiro
        /* Filtering */
302 1 hiro
        GSList *fltlist;
303 2767 hiro
304 2767 hiro
        /* deprecated: do not use */
305 336 hiro
        GSList *junk_fltlist;
306 1125 hiro
        GSList *manual_junk_fltlist;
307 1 hiro
308 1 hiro
        /* Actions */
309 1 hiro
        GSList *actions_list;
310 1 hiro
311 1 hiro
        /* Online / Offline */
312 1 hiro
        gboolean online_mode;
313 2356 hiro
314 2356 hiro
        /* Append new members here */
315 2480 hiro
        gboolean folder_col_visible[4];      /* Display */
316 2480 hiro
        gboolean reply_address_only;         /* Compose */
317 2480 hiro
        gboolean recipients_autoreg;         /* Send */
318 2480 hiro
        gboolean enable_address_completion;  /* Compose */
319 2565 hiro
        gboolean fullauto_completion_mode;   /* Compose */
320 2577 hiro
321 2577 hiro
        gchar *user_agent_str;
322 2649 hiro
323 2649 hiro
        gboolean change_account_on_folder_sel; /* Interface */
324 2729 hiro
        gboolean always_mark_read_on_show_msg; /* Interface */
325 2759 hiro
326 2759 hiro
        gboolean always_add_address_only;    /* Compose */
327 2781 hiro
        gboolean show_send_dialog;           /* Send */
328 2840 hiro
329 2840 hiro
        gint addressbook_folder_width;
330 2840 hiro
        gint addressbook_col_name;
331 2840 hiro
        gint addressbook_col_addr;
332 2840 hiro
        gint addressbook_col_rem;
333 3043 hiro
334 3043 hiro
        gchar *prev_open_dir;
335 3043 hiro
        gchar *prev_save_dir;
336 3043 hiro
        gchar *prev_folder_dir;
337 3053 hiro
338 3053 hiro
        gboolean enable_newmsg_notify_sound; /* Receive */
339 3053 hiro
        gchar *newmsg_notify_sound;          /* Receive */
340 1 hiro
};
341 1 hiro
342 1 hiro
extern PrefsCommon prefs_common;
343 1 hiro
344 1325 hiro
PrefsCommon *prefs_common_get                (void);
345 1325 hiro
346 533 hiro
PrefParam *prefs_common_get_params        (void);
347 1 hiro
348 533 hiro
void prefs_common_read_config                (void);
349 533 hiro
void prefs_common_write_config                (void);
350 1 hiro
351 2767 hiro
/* deprecated */
352 1864 hiro
void prefs_common_junk_filter_list_set                (void);
353 2767 hiro
354 1864 hiro
void prefs_common_junk_folder_rename_path        (const gchar        *old_path,
355 1864 hiro
                                                 const gchar        *new_path);
356 533 hiro
357 1 hiro
#endif /* __PREFS_COMMON_H__ */