2 * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3 * Copyright (C) 1999-2012 Hiroyuki Yamamoto
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 3 of the License, or
8 * (at your option) any later version.
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.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
23 typedef struct _Compose Compose;
24 typedef struct _AttachInfo AttachInfo;
31 #ifndef USE_NEW_ADDRBOOK
32 #include "addressbook.h"
34 #include "prefs_account.h"
37 #include "messageview.h"
44 #include "gtkaspell.h"
47 #define COMPOSE_CHECK_BEFORE_SEND_HOOKLIST "compose_check_before_send"
48 #define COMPOSE_CREATED_HOOKLIST "compose_created"
64 COMPOSE_REPLY_WITH_QUOTE,
65 COMPOSE_REPLY_WITHOUT_QUOTE,
66 COMPOSE_REPLY_TO_SENDER,
67 COMPOSE_REPLY_TO_ADDRESS,
68 COMPOSE_FOLLOWUP_AND_REPLY_TO,
69 COMPOSE_REPLY_TO_SENDER_WITH_QUOTE,
70 COMPOSE_REPLY_TO_SENDER_WITHOUT_QUOTE,
72 COMPOSE_REPLY_TO_ALL_WITH_QUOTE,
73 COMPOSE_REPLY_TO_ALL_WITHOUT_QUOTE,
74 COMPOSE_REPLY_TO_LIST,
75 COMPOSE_REPLY_TO_LIST_WITH_QUOTE,
76 COMPOSE_REPLY_TO_LIST_WITHOUT_QUOTE,
78 COMPOSE_FORWARD_AS_ATTACH,
79 COMPOSE_FORWARD_INLINE,
101 ComposePrefType type;
102 } ComposeHeaderEntry;
106 /* start with window widget don`t change order */
111 /* Toolbar handlebox */
112 GtkWidget *handlebox;
118 GtkWidget *table_vbox;
120 GtkWidget *account_combo;
121 GtkWidget *subject_entry;
125 GtkWidget *attach_scrwin;
126 GtkWidget *attach_clist;
127 GtkWidget *attach_label;
130 GtkWidget *savemsg_checkbtn;
131 GtkWidget *savemsg_combo;
133 /* Headers notebook */
137 GtkWidget *edit_vbox;
138 GtkWidget *ruler_hbox;
140 GtkWidget *scrolledwin;
142 GtkWidget *from_name;
143 #if !GTK_CHECK_VERSION(2,12,0)
144 GtkTooltips *tooltips;
147 GtkWidget *focused_editable;
149 GtkWidget *popupmenu;
151 GtkWidget *tmpl_menu;
157 MsgInfo *autosaved_draft;
160 GtkWidget *header_table;
162 guint header_nextrow;
163 ComposeHeaderEntry *header_last;
165 GHashTable *email_hashtable;
186 gboolean use_replyto;
187 gboolean use_newsgroups;
188 gboolean use_followupto;
191 CharSet out_encoding;
193 /* privacy settings */
194 gboolean use_signing;
195 gboolean use_encryption;
196 gchar *privacy_system;
202 gboolean return_receipt;
207 GSList *newsgroup_list;
209 PrefsAccount *account;
212 UndoMain *undostruct;
215 gboolean sig_inserted;
217 /* external editor */
218 gchar *exteditor_file;
220 GIOChannel *exteditor_ch;
226 gchar *redirect_filename;
228 gboolean remove_references;
230 guint draft_timeout_tag;
232 GtkTextTag *no_wrap_tag;
233 GtkTextTag *no_join_tag;
234 GtkTextTag *signature_tag;
235 GtkTextTag *quote0_tag;
236 GtkTextTag *quote1_tag;
237 GtkTextTag *quote2_tag;
240 gboolean automatic_break;
246 gboolean deferred_destroy;
248 GtkWidget *first_combo;
249 GtkWidget *first_entry;
251 GtkUIManager *ui_manager;
253 /* GNU/aspell spell checker */
254 GtkAspell *gtkaspell;
255 GtkWidget *aspell_options_menu;
263 EncodingType encoding;
271 COMPOSE_QUIT_EDITING,
272 COMPOSE_KEEP_EDITING,
274 COMPOSE_DRAFT_FOR_EXIT
275 } ComposeDraftAction;
277 /*#warning FIXME_GTK2 */
278 /* attache_files will be locale encode */
279 Compose *compose_new (PrefsAccount *account,
281 GList *attach_files);
283 Compose *compose_new_with_folderitem (PrefsAccount *account,
285 const gchar *mailto);
287 Compose *compose_new_with_list (PrefsAccount *account,
290 Compose *compose_forward (PrefsAccount *account,
297 Compose *compose_redirect (PrefsAccount *account,
300 Compose *compose_reedit (MsgInfo *msginfo,
303 GList *compose_get_compose_list (void);
305 void compose_entry_append (Compose *compose,
306 const gchar *address,
307 ComposeEntryType type,
308 ComposePrefType pref_type);
311 gint compose_send (Compose *compose);
313 void compose_update_actions_menu (Compose *compose);
314 void compose_reflect_prefs_all (void);
315 void compose_reflect_prefs_pixmap_theme (void);
317 void compose_destroy_all (void);
318 gboolean compose_draft (gpointer data, guint action);
319 void compose_toolbar_cb (gint action,
321 void compose_reply_to_address (MessageView *msgview,
323 const gchar *address);
324 void compose_reply_from_messageview (MessageView *msgview,
325 GSList *msginfo_list,
327 void compose_action_cb (void *data);
329 void compose_set_position (Compose *compose,
331 gboolean compose_search_string (Compose *compose,
334 gboolean compose_search_string_backward (Compose *compose,
337 gint compose_queue (Compose *compose,
341 gboolean remove_reedit_target);
342 gboolean compose_close (Compose *compose);
343 void compose_close_toolbar (Compose *compose);
344 void compose_clear_exit_drafts (void);
345 void compose_reopen_exit_drafts (void);
346 void compose_attach_from_list (Compose *compose, GList *file_list, gboolean free_data);
347 void compose_check_for_email_account(Compose *compose);
348 #endif /* __COMPOSE_H__ */