give full control of display or non-display of Execute icon to Custom toolbar settings
[claws.git] / src / mainwindow.h
index e8cb412b3931beb8ed317dd7f3108595136b5db1..271b2d8d640f17a12f5ec5e2d7d3cb2c492f5262 100644 (file)
 
 #include <glib.h>
 
-typedef struct _MainWindow     MainWindow;
+typedef struct _MainWindow  MainWindow;
 
 #include "folderview.h"
 #include "summaryview.h"
 #include "headerview.h"
 #include "messageview.h"
-#include "headerwindow.h"
 #include "logwindow.h"
+#include "toolbar.h"
+
+typedef enum
+{
+       M_UNLOCKED            = 1 << 0,
+       M_MSG_EXIST           = 1 << 1,
+       M_TARGET_EXIST        = 1 << 2,
+       M_SINGLE_TARGET_EXIST = 1 << 3,
+       M_EXEC                = 1 << 4,
+       M_ALLOW_REEDIT        = 1 << 5,
+       M_HAVE_ACCOUNT        = 1 << 6,
+       M_THREADED            = 1 << 7,
+       M_UNTHREADED          = 1 << 8,
+       M_ALLOW_DELETE        = 1 << 9,
+       M_INC_ACTIVE          = 1 << 10,
+       M_NEWS                = 1 << 11,
+       M_HAVE_NEWS_ACCOUNT   = 1 << 12,
+       M_HIDE_READ_MSG       = 1 << 13,
+       M_DELAY_EXEC          = 1 << 14
+} SensitiveCond;
 
 typedef enum
 {
@@ -47,12 +66,6 @@ typedef enum
        TOOLBAR_BOTH    = 3
 } ToolbarStyle;
 
-typedef enum 
-{
-       COMPOSEBUTTON_MAIL,
-       COMPOSEBUTTON_NEWS
-} ComposeButtonType;
-
 struct _MainWindow
 {
        SeparateType type;
@@ -81,39 +94,24 @@ struct _MainWindow
        GtkWidget *vbox;
        GtkWidget *menubar;
 
-       /* toolbar */
+       GtkItemFactory *menu_factory;
+       
+       /* Toolbar handlebox */
        GtkWidget *handlebox;
-       GtkWidget *toolbar;
-       GtkWidget *get_btn;
-       GtkWidget *getall_btn;
-
-       /* compose button stuff */
-       GtkWidget *compose_mail_btn;            /* a la Leandro */
-       GtkWidget *compose_news_btn;            /* a la Leandro */
-       GtkWidget *compose_mail_btn_plain;      /* plain (text/icon only) */
-       GtkWidget *compose_news_btn_plain;      /* plain (text/icon only) */
-       ComposeButtonType compose_btn_type;
        
-       GtkWidget *reply_btn;
-       GtkWidget *replyall_btn;
-       GtkWidget *replysender_btn;
-       GtkWidget *fwd_btn;
-       GtkWidget *send_btn;
-       /*
-       GtkWidget *prefs_btn;
-       GtkWidget *account_btn;
-       */
-       GtkWidget *next_btn;
-       GtkWidget *delete_btn;
-       GtkWidget *exec_btn;
+       MainToolbar *toolbar;
 
        /* body */
        GtkWidget *vbox_body;
        GtkWidget *hbox_stat;
        GtkWidget *statusbar;
+       GtkWidget *progressbar;
+       GtkWidget *statuslabel;
        GtkWidget *ac_button;
        GtkWidget *ac_label;
        GtkWidget *ac_menu;
+       GtkWidget *online_switch;
+       GtkWidget *offline_switch;
 
        /* context IDs for status bar */
        gint mainwin_cid;
@@ -123,12 +121,12 @@ struct _MainWindow
        ToolbarStyle toolbar_style;
 
        guint lock_count;
+       guint menu_lock_count;
        guint cursor_count;
 
        FolderView      *folderview;
        SummaryView     *summaryview;
        MessageView     *messageview;
-       HeaderWindow    *headerwin;
        LogWindow       *logwin;
 };
 
@@ -140,11 +138,15 @@ void main_window_cursor_normal            (MainWindow     *mainwin);
 void main_window_lock                  (MainWindow     *mainwin);
 void main_window_unlock                        (MainWindow     *mainwin);
 
+void main_window_reflect_prefs_all_real                (gboolean pixmap_theme_changed);
 void main_window_reflect_prefs_all     (void);
+void main_window_set_summary_column    (void);
 void main_window_set_account_menu      (GList          *account_list);
 void main_window_separation_change     (MainWindow     *mainwin,
                                         SeparateType    type);
 
+void main_window_toggle_message_view   (MainWindow *mainwin);
+
 void main_window_get_size              (MainWindow     *mainwin);
 void main_window_get_position          (MainWindow     *mainwin);
 
@@ -152,11 +154,42 @@ void main_window_empty_trash              (MainWindow     *mainwin,
                                         gboolean        confirm);
 void main_window_add_mailbox           (MainWindow     *mainwin);
 
-void main_window_set_toolbar_sensitive (MainWindow     *mainwin,
-                                        gboolean        sensitive);
 void main_window_set_menu_sensitive    (MainWindow     *mainwin);
 
+
 void main_window_popup                 (MainWindow     *mainwin);
-/*void main_window_set_thread_option      (MainWindow *mainwin);*/
+
+void main_window_toolbar_set_compose_button    (MainWindow *mainwin, 
+                                        ComposeButtonType compose_btn_type);
+
+SensitiveCond main_window_get_current_state   (MainWindow *mainwin);
+
+void reply_cb                            (MainWindow   *mainwin,
+                                        guint           action,
+                                        GtkWidget      *widget);
+
+void inc_mail_cb                                 (MainWindow   *mainwin,
+                                        guint           action,
+                                        GtkWidget      *widget);
+
+void inc_all_account_mail_cb             (MainWindow   *mainwin,
+                                        guint           action,
+                                        GtkWidget      *widget);
+
+void send_queue_cb                       (MainWindow   *mainwin,
+                                        guint           action,
+                                        GtkWidget      *widget);
+
+void compose_mail_cb                          (MainWindow       *mainwin, 
+                                        guint action,
+                                          GtkWidget         *widget);
+
+void compose_news_cb                          (MainWindow       *mainwin, 
+                                        guint action,
+                                          GtkWidget         *widget);
+
+void next_unread_cb                       (MainWindow  *mainwin,
+                                         guint          action,
+                                         GtkWidget     *widget);
 
 #endif /* __MAINWINDOW_H__ */