sync with 0.8.5
[claws.git] / src / compose.h
index 3d531f85031b27da608dd85b3d6619471e821889..b1c289823bffe0b66a767dc58b02865ec326b370 100644 (file)
@@ -25,6 +25,7 @@
 #include <gtk/gtkitemfactory.h>
 
 typedef struct _Compose                Compose;
+typedef struct _ComposeToolbar  ComposeToolbar;
 typedef struct _AttachInfo     AttachInfo;
 
 #include "procmsg.h"
@@ -33,8 +34,8 @@ typedef struct _AttachInfo    AttachInfo;
 #include "prefs_account.h"
 #include "undo.h"
 
-#ifdef USE_PSPELL
-#include "gtkspell.h"
+#ifdef USE_ASPELL
+#include "gtkaspell.h"
 #endif
 
 typedef enum
@@ -59,6 +60,9 @@ typedef enum
        COMPOSE_REPLY_TO_ALL,
        COMPOSE_REPLY_TO_ALL_WITH_QUOTE,
        COMPOSE_REPLY_TO_ALL_WITHOUT_QUOTE,
+       COMPOSE_REPLY_TO_LIST,
+       COMPOSE_REPLY_TO_LIST_WITH_QUOTE,
+       COMPOSE_REPLY_TO_LIST_WITHOUT_QUOTE,
        COMPOSE_FORWARD,
        COMPOSE_FORWARD_AS_ATTACH,
        COMPOSE_FORWARD_INLINE,
@@ -79,18 +83,10 @@ struct _Compose
        GtkWidget *window;
        GtkWidget *vbox;
        GtkWidget *menubar;
-
+       
+       /* Toolbar handlebox */
        GtkWidget *handlebox;
-       GtkWidget *toolbar;
-       GtkWidget *send_btn;
-       GtkWidget *sendl_btn;
-       GtkWidget *draft_btn;
-       GtkWidget *insert_btn;
-       GtkWidget *attach_btn;
-       GtkWidget *sig_btn;
-       GtkWidget *exteditor_btn;
-       GtkWidget *linewrap_btn;
-       GtkWidget *addrbook_btn;
+       ComposeToolbar *toolbar;
 
        GtkWidget *vbox2;
 
@@ -154,7 +150,8 @@ struct _Compose
        gchar   *bcc;
        gchar   *newsgroups;
        gchar   *followup_to;
-       gchar   *mailinglist;
+
+       gchar   *ml_post;
 
        gchar   *inreplyto;
        gchar   *references;
@@ -165,8 +162,8 @@ struct _Compose
        gboolean use_cc;
        gboolean use_bcc;
        gboolean use_replyto;
+       gboolean use_newsgroups;
        gboolean use_followupto;
-       gboolean use_mailinglist;
        gboolean use_attach;
 
        /* privacy settings */
@@ -175,6 +172,8 @@ struct _Compose
 
        gboolean modified;
 
+       gboolean sending;
+       
        gboolean return_receipt;
        gboolean paste_as_quotation;
 
@@ -182,7 +181,6 @@ struct _Compose
        GSList *newsgroup_list;
 
        PrefsAccount *account;
-       PrefsAccount *orig_account;
 
        UndoMain *undostruct;
 
@@ -192,9 +190,9 @@ struct _Compose
        gint   exteditor_readdes;
        gint   exteditor_tag;
 
-#if USE_PSPELL
-        /* Pspell spell checker */
-        GtkPspell *gtkpspell;
+#if USE_ASPELL
+        /* GNU/aspell spell checker */
+        GtkAspell *gtkaspell;
 #endif
 
        /* Priority */
@@ -203,6 +201,24 @@ struct _Compose
        gchar *redirect_filename;
 };
 
+struct _ComposeToolbar {
+
+       GtkWidget *toolbar;
+
+       GtkWidget *send_btn;
+       GtkWidget *sendl_btn;
+       GtkWidget *draft_btn;
+       GtkWidget *insert_btn;
+       GtkWidget *attach_btn;
+       GtkWidget *sig_btn;
+       GtkWidget *exteditor_btn;
+       GtkWidget *linewrap_btn;
+       GtkWidget *addrbook_btn;
+
+       GSList    *t_action_list;
+       GSList    *t_item_list;
+};
+
 struct _AttachInfo
 {
        gchar *file;
@@ -212,10 +228,9 @@ struct _AttachInfo
        off_t size;
 };
 
-Compose *compose_new                   (PrefsAccount   *account);
-
-Compose *compose_new_with_recipient    (PrefsAccount   *account,
-                                        const gchar    *to);
+Compose *compose_new                   (PrefsAccount   *account,
+                                        const gchar    *mailto,
+                                        GPtrArray      *attach_files);
 
 Compose *compose_new_with_folderitem   (PrefsAccount   *account,
                                         FolderItem     *item);
@@ -228,6 +243,7 @@ void compose_followup_and_reply_to  (MsgInfo        *msginfo,
 void compose_reply                     (MsgInfo        *msginfo,
                                         gboolean        quote,
                                         gboolean        to_all,
+                                        gboolean        to_ml,
                                         gboolean        ignore_replyto,
                                         const gchar    *body);
 Compose *compose_forward               (PrefsAccount *account,
@@ -246,9 +262,14 @@ void compose_entry_append          (Compose          *compose,
                                         const gchar      *address,
                                         ComposeEntryType  type);
 
+void compose_entry_select              (Compose          *compose,
+                                        const gchar      *address);
+
 gint compose_send                      (Compose          *compose);
 
 void compose_reflect_prefs_all                 (void);
 void compose_reflect_prefs_pixmap_theme        (void);
 
+void compose_destroy_all                (void);
+
 #endif /* __COMPOSE_H__ */