sync with sylpheed 0.7.0cvs27
[claws.git] / src / summaryview.h
index f76ed6b..98b7e1d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2001 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2002 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
 #include <gtk/gtkctree.h>
 #include <gtk/gtkdnd.h>
 
-typedef struct _SummaryView    SummaryView;
+typedef struct _SummaryView            SummaryView;
+typedef struct _SummaryColumnState     SummaryColumnState;
 
 #include "mainwindow.h"
 #include "folderview.h"
 #include "headerview.h"
 #include "messageview.h"
 #include "headerwindow.h"
+#include "compose.h"
+#include "prefs_filter.h"
 #include "folder.h"
 #include "gtksctree.h"
 
 typedef enum
 {
-       S_COL_MARK      = 0,
-       S_COL_UNREAD    = 1,
-       S_COL_MIME      = 2,
-       S_COL_NUMBER    = 3,
-       S_COL_SCORE     = 4,
-       S_COL_SIZE      = 5,
-       S_COL_DATE      = 6,
-       S_COL_FROM      = 7,
-       S_COL_SUBJECT   = 8
-} SummaryColumnPos;
-
-#define N_SUMMARY_COLS 9
+       S_COL_MARK,
+       S_COL_UNREAD,
+       S_COL_MIME,
+       S_COL_SUBJECT,
+       S_COL_FROM,
+       S_COL_DATE,
+       S_COL_SIZE,
+       S_COL_NUMBER,
+       S_COL_SCORE,
+       S_COL_LOCKED
+} SummaryColumnType;
+
+#define N_SUMMARY_COLS 10
 
 typedef enum
 {
@@ -61,6 +65,7 @@ typedef enum
        SORT_BY_FROM,
        SORT_BY_SUBJECT,
        SORT_BY_SCORE,
+       SORT_BY_LOCKED,
        SORT_BY_LABEL,
        SORT_BY_MARK,
        SORT_BY_UNREAD,
@@ -83,6 +88,12 @@ typedef enum
 
 extern GtkTargetEntry summary_drag_types[1];
 
+struct _SummaryColumnState
+{
+       SummaryColumnType type;
+       gboolean visible;
+};
+
 struct _SummaryView
 {
        GtkWidget *vbox;
@@ -92,8 +103,8 @@ struct _SummaryView
        GtkWidget *statlabel_folder;
        GtkWidget *statlabel_select;
        GtkWidget *statlabel_msgs;
-       GtkWidget *toggle_eventbox;
-       GtkWidget *toggle_arrow;
+       GtkWidget *toggle_view_btn;
+       GtkWidget *toggle_view_arrow;
        GtkWidget *popupmenu;
        GtkWidget *colorlabel_menu;
 
@@ -108,9 +119,14 @@ struct _SummaryView
        gboolean display_msg;
 
        GdkColor color_important;
+       SummaryColumnState col_state[N_SUMMARY_COLS];
+       gint col_pos[N_SUMMARY_COLS];
+
        GdkColor color_marked;
        GdkColor color_dim;
 
+       guint lock_count;
+
        MainWindow   *mainwin;
        FolderView   *folderview;
        HeaderView   *headerview;
@@ -147,9 +163,6 @@ private:
        SummarySortType sort_mode;
        GtkSortType sort_type;
 
-       /* tell filtering happened recently */
-       gboolean filtering_happened;
-
 };
 
 SummaryView    *summary_create(void);
@@ -161,6 +174,10 @@ gboolean summary_show                (SummaryView          *summaryview,
 void summary_clear_list                  (SummaryView          *summaryview);
 void summary_clear_all           (SummaryView          *summaryview);
 
+void summary_lock                (SummaryView          *summaryview);
+void summary_unlock              (SummaryView          *summaryview);
+gboolean summary_is_locked       (SummaryView          *summaryview);
+
 SummarySelection summary_get_selection_type    (SummaryView    *summaryview);
 
 void summary_select_prev_unread          (SummaryView          *summaryview);
@@ -172,21 +189,32 @@ void summary_select_next_labeled  (SummaryView            *summaryview);
 void summary_select_by_msgnum    (SummaryView          *summaryview,
                                   guint                 msgnum);
 guint summary_get_current_msgnum  (SummaryView         *summaryview);
-void summary_thread_build        (SummaryView          *summaryview,
-                                  gboolean              init);
+void summary_select_node         (SummaryView          *summaryview,
+                                  GtkCTreeNode         *node,
+                                  gboolean              display_msg);
+
+void summary_thread_build        (SummaryView          *summaryview);
 void summary_unthread            (SummaryView          *summaryview);
+
 void summary_filter              (SummaryView          *summaryview);
+void summary_filter_open         (SummaryView          *summaryview,
+                                  PrefsFilterType       type);
+
 void summary_sort                (SummaryView          *summaryview,
                                   SummarySortType       type);
 
 void summary_delete              (SummaryView          *summaryview);
 void summary_delete_duplicated   (SummaryView          *summaryview);
-void summary_execute             (SummaryView          *summaryview);
+
+gboolean summary_execute         (SummaryView          *summaryview);
+
 void summary_attract_by_subject          (SummaryView          *summaryview);
+
 gint summary_write_cache         (SummaryView          *summaryview);
+
 void summary_pass_key_press_event (SummaryView         *summaryview,
                                   GdkEventKey          *event);
-void summary_change_display_item  (SummaryView         *summaryview);
+
 void summary_redisplay_msg       (SummaryView          *summaryview);
 void summary_open_msg            (SummaryView          *summaryview);
 void summary_view_source         (SummaryView          *summaryview);
@@ -212,6 +240,9 @@ void summary_add_address      (SummaryView          *summaryview);
 void summary_select_all                  (SummaryView          *summaryview);
 void summary_unselect_all        (SummaryView          *summaryview);
 
+void summary_reply               (SummaryView          *summaryview,
+                                  ComposeMode           mode);
+
 void summary_set_colorlabel      (SummaryView          *summaryview,
                                   guint                 labelcolor,
                                   GtkWidget            *widget);
@@ -219,4 +250,12 @@ void summary_set_colorlabel_color (GtkCTree                *ctree,
                                   GtkCTreeNode         *node,
                                   guint                 labelcolor);
 
+void summary_set_column_order    (SummaryView          *summaryview);
+
+void processing_apply();
+
+void summary_toggle_show_read_messages (SummaryView *summaryview);
+
+void summary_toggle_view_real  (SummaryView    *summaryview);
+
 #endif /* __SUMMARY_H__ */