add 'Re-edit' to the message context menu in the Drafts folder
[claws.git] / src / mainwindow.h
index 7dbc8ace8c2eb8505e83e6cecd25d72c9c952eb3..0d1ffb14af60a8be0b5968b74b40b5194c46e0c9 100644 (file)
@@ -1,6 +1,6 @@
 /*
- * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2009 Hiroyuki Yamamoto and the Claws Mail team
+ * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
+ * Copyright (C) 1999-2016 Hiroyuki Yamamoto and the Claws Mail team
  *
  * 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
@@ -14,7 +14,6 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * 
  */
 
 #ifndef __MAINWINDOW_H__
 
 typedef struct _MainWindow  MainWindow;
 
-#include "folderview.h"
-#include "summaryview.h"
-#include "headerview.h"
-#include "messageview.h"
+#include "viewtypes.h"
 #include "logwindow.h"
+#include "procmsg.h"
 #include "toolbar.h"
 
 #define OFFLINE_SWITCH_HOOKLIST "offline_switch"
@@ -38,41 +35,54 @@ typedef struct _MainWindow  MainWindow;
 #define THEME_CHANGED_HOOKLIST "theme_changed"
 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,
-       M_NOT_NEWS            = 1 << 15,
-       M_CAN_LEARN_SPAM      = 1 << 16,
-       M_ACTIONS_EXIST       = 1 << 17,
-       M_HAVE_QUEUED_MAILS   = 1 << 18,
-       M_WANT_SYNC           = 1 << 19,
-       M_TAGS_EXIST          = 1 << 20,
-       M_HAVE_PROCESSING     = 1 << 21,
-       M_SUMMARY_ISLIST      = 1 << 22,
-       M_IN_MSGLIST          = 1 << 23,
-       M_HAVE_MULTI_ACCOUNT  = 1 << 24,
-       M_FOLDER_SELECTED     = 1 << 25,
-       M_SESSION_PASSWORDS   = 1 << 26,
-       M_DELETED_EXISTS      = 1 << 27
+       M_UNLOCKED,
+       M_MSG_EXIST,
+       M_TARGET_EXIST,
+       M_SINGLE_TARGET_EXIST,
+       M_EXEC,
+       M_ALLOW_REEDIT,
+       M_HAVE_ACCOUNT,
+       M_THREADED,
+       M_UNTHREADED,
+       M_ALLOW_DELETE,
+       M_INC_ACTIVE,
+       M_SEND_ACTIVE,
+       M_NEWS,
+       M_HAVE_NEWS_ACCOUNT,
+       M_HIDE_READ_MSG,
+       M_DELAY_EXEC,
+       M_NOT_NEWS,
+       M_CAN_LEARN_SPAM,
+       M_ACTIONS_EXIST,
+       M_HAVE_QUEUED_MAILS,
+       M_WANT_SYNC,
+       M_TAGS_EXIST,
+       M_HAVE_PROCESSING,
+       M_SUMMARY_ISLIST,
+       M_IN_MSGLIST,
+       M_HAVE_MULTI_ACCOUNT,
+       M_FOLDER_SELECTED,
+       M_SESSION_PASSWORDS,
+       M_MASTER_PASSPHRASE,
+       M_DELETED_EXISTS,
+       M_NOT_TRASH,
+       M_HIDE_READ_THREADS,
+       M_HAVE_RETRIEVABLE_ACCOUNT,
+       M_HAVE_ANY_RETRIEVABLE_ACCOUNT,
+       M_NOT_DRAFT,
+       M_DRAFT,
+
+/* reserved */
+    M_MAX_RESERVED
 } SensitiveCond;
 
+typedef guint64 SensitiveCondMask;
+
 typedef enum
 {
-       NORMAL_LAYOUT    = 0,
-       VERTICAL_LAYOUT  = 1 << 0,
-       WIDE_LAYOUT = 1 << 1,
+       NORMAL_LAYOUT       = 0,
+       VERTICAL_LAYOUT     = 1 << 0,
+       WIDE_LAYOUT         = 1 << 1,
        WIDE_MSGLIST_LAYOUT = 1 << 2,
        SMALL_LAYOUT
 } LayoutType;
@@ -177,6 +187,11 @@ void main_window_get_position              (MainWindow     *mainwin);
 
 void main_window_progress_on           (MainWindow     *mainwin);
 void main_window_progress_off          (MainWindow     *mainwin);
+gboolean main_window_empty_trash       (MainWindow     *mainwin,
+                                        gboolean        confirm,
+                                        gboolean        for_quit);
+
+SensitiveCondMask main_window_get_mask(SensitiveCond cond, ...);
 
 void main_window_set_menu_sensitive    (MainWindow     *mainwin);
 
@@ -185,7 +200,7 @@ void main_window_show                       (MainWindow     *mainwin);
 void main_window_hide                  (MainWindow     *mainwin);
 void main_window_popup                 (MainWindow     *mainwin);
 
-SensitiveCond main_window_get_current_state   (MainWindow *mainwin);
+SensitiveCondMask main_window_get_current_state   (MainWindow *mainwin);
 
 void toolbar_set_compose_button               (Toolbar          *toolbar, 
                                               ComposeButtonType  compose_btn_type);
@@ -202,18 +217,13 @@ void mainwindow_jump_to                         (const gchar       *target,
                                               gboolean popup);
 void mainwindow_show_error                   (void);
 void mainwindow_clear_error                  (MainWindow *mainwin);
+void mainwindow_delete_duplicated     (MainWindow *mainwin);
+void mainwindow_delete_duplicated_all (MainWindow *mainwin);
 gboolean mainwindow_is_obscured                      (void);
 void mainwindow_exit_folder                  (MainWindow *mainwin);
 void mainwindow_enter_folder                 (MainWindow *mainwin);
 void mainwindow_reset_paned                  (GtkPaned *paned);
 
-#ifdef MAEMO
-gboolean maemo_mainwindow_is_fullscreen               (GtkWidget *widget);
-void maemo_window_full_screen_if_needed               (GtkWindow *window);
-void maemo_connect_key_press_to_mainwindow    (GtkWindow *window);
-void mainwindow_maemo_led_set(gboolean state);
-#endif
-
 void mainwin_accel_changed_cb (GtkAccelGroup *accelgroup, guint keyval, GdkModifierType modifier,
                                  GClosure *closure, GtkMenuItem *item);