2007-06-05 [wwp] 2.9.2cvs40
[claws.git] / src / compose.h
index 36a4d2c32b9920f31ab9a9fd6726899703fa97bb..5be9c8a51a7b678ce995800c75c810ffc36c6955 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2006 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2007 Hiroyuki Yamamoto
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -37,11 +37,14 @@ typedef struct _AttachInfo  AttachInfo;
 #include "codeconv.h"
 #include "template.h"
 #include "textview.h"
+#include "folder.h"
 
 #ifdef USE_ASPELL
 #include "gtkaspell.h"
 #endif
 
+#define COMPOSE_CHECK_BEFORE_SEND_HOOKLIST "compose_check_before_send"
+
 typedef enum
 {
        COMPOSE_TO,
@@ -109,6 +112,9 @@ struct _Compose
        GtkWidget *savemsg_checkbtn;
        GtkWidget *savemsg_entry;
 
+       /* Headers notebook */
+       GtkWidget *notebook;
+
        /* Textedit */
        GtkWidget *edit_vbox;
        GtkWidget *ruler_hbox;
@@ -180,6 +186,7 @@ struct _Compose
        GSList *newsgroup_list;
 
        PrefsAccount *account;
+       FolderItem *folder;
 
        UndoMain *undostruct;
 
@@ -215,6 +222,8 @@ struct _Compose
        gboolean updating;
        gboolean deferred_destroy;
        ComposeMode rmode;
+       GtkWidget *first_combo;
+       GtkWidget *first_entry;
 };
 
 struct _AttachInfo
@@ -226,6 +235,14 @@ struct _AttachInfo
        off_t size;
 };
 
+typedef enum
+{
+       COMPOSE_QUIT_EDITING,
+       COMPOSE_KEEP_EDITING,
+       COMPOSE_AUTO_SAVE,
+       COMPOSE_DRAFT_FOR_EXIT
+} ComposeDraftAction;
+
 /*#warning FIXME_GTK2 */
 /* attache_files will be locale encode */
 Compose *compose_new                   (PrefsAccount   *account,
@@ -239,30 +256,12 @@ Compose *compose_new_with_folderitem      (PrefsAccount   *account,
 Compose *compose_new_with_list         (PrefsAccount   *account,
                                         GList          *listAddress);
 
-Compose *compose_reply_mode            (ComposeMode     mode, 
-                                        GSList         *msginfo_list, 
-                                        gchar          *body);
-/* remove */
-Compose *compose_followup_and_reply_to (MsgInfo        *msginfo,
-                                        gboolean        quote,
-                                        gboolean        to_all,
-                                        gboolean        to_sender,
-                                        const gchar    *body);
-Compose *compose_reply                 (MsgInfo        *msginfo,
-                                        gboolean        quote,
-                                        gboolean        to_all,
-                                        gboolean        to_ml,
-                                        gboolean        to_sender,
-                                        const gchar    *body);
 Compose *compose_forward               (PrefsAccount *account,
                                         MsgInfo        *msginfo,
                                         gboolean        as_attach,
                                         const gchar    *body,
                                         gboolean        no_extedit,
                                         gboolean        batch);
-Compose *compose_forward_multiple      (PrefsAccount   *account, 
-                                        GSList         *msginfo_list);
-/* remove end */
 
 Compose *compose_redirect              (PrefsAccount   *account,
                                         MsgInfo        *msginfo,
@@ -272,24 +271,19 @@ Compose *compose_reedit                   (MsgInfo        *msginfo,
 
 GList *compose_get_compose_list                (void);
 
-void compose_template_apply_fields(Compose *compose, Template *tmpl);
-
 void compose_entry_append              (Compose          *compose,
                                         const gchar      *address,
                                         ComposeEntryType  type);
 
-void compose_entry_mark_default_to     (Compose          *compose,
-                                        const gchar      *address);
 
 gint compose_send                      (Compose          *compose);
 
 void compose_update_actions_menu       (Compose        *compose);
-void compose_update_privacy_systems_menu(Compose       *compose);
 void compose_reflect_prefs_all                 (void);
 void compose_reflect_prefs_pixmap_theme        (void);
 
 void compose_destroy_all                (void);
-void compose_draft                     (gpointer data);
+void compose_draft                     (gpointer data, guint action);
 void compose_toolbar_cb                        (gint           action, 
                                         gpointer       data);
 void compose_reply_from_messageview    (MessageView    *msgview, 
@@ -311,4 +305,7 @@ gint compose_queue                  (Compose *compose,
                                         gchar **msgpath,
                                         gboolean remove_reedit_target);
 gboolean compose_close                 (Compose *compose);
+void compose_close_toolbar             (Compose *compose);
+void compose_clear_exit_drafts         (void);
+void compose_reopen_exit_drafts                (void);
 #endif /* __COMPOSE_H__ */