2 * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
3 * Copyright (C) 1999-2015 Hiroyuki Yamamoto and the Claws Mail team
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #include <sys/types.h>
29 #include "viewtypes.h"
30 typedef struct _SummaryColumnState SummaryColumnState
;
32 #define MAIL_MANUAL_FILTERING_HOOKLIST "mail_manual_filtering_hooklist"
50 #define N_SUMMARY_COLS 12
55 SUMMARY_SELECTED_NONE
,
56 SUMMARY_SELECTED_SINGLE
,
57 SUMMARY_SELECTED_MULTIPLE
64 TARGET_MAIL_CM_PATH_LIST
,
67 #include "mainwindow.h"
70 #include "gtksctree.h"
71 #include "prefs_filtering.h"
72 #include "quicksearch.h"
74 extern GtkTargetEntry summary_drag_types
[3];
76 struct _SummaryColumnState
78 SummaryColumnType type
;
85 GtkWidget
*mainwidget_book
;
86 GtkWidget
*scrolledwin
;
93 GtkWidget
*folder_pixmap
;
94 GtkWidget
*folder_pixmap_eventbox
;
95 GtkWidget
*statlabel_folder
;
96 GtkWidget
*statlabel_select
;
97 GtkWidget
*statlabel_msgs
;
98 GtkWidget
*toggle_eventbox
;
99 GtkWidget
*toggle_arrow
;
101 GtkWidget
*multiple_sel_togbtn
;
102 GtkWidget
*multiple_sel_image
;
104 GtkWidget
*toggle_search
;
105 GtkWidget
*quick_search_pixmap
;
106 GtkWidget
*popupmenu
;
107 GtkWidget
*colorlabel_menu
;
108 GtkWidget
*tags_menu
;
112 GtkCMCTreeNode
*selected
;
113 GtkCMCTreeNode
*displayed
;
115 gboolean display_msg
;
117 GdkColor color_important
;
118 SummaryColumnState col_state
[N_SUMMARY_COLS
];
119 gint col_pos
[N_SUMMARY_COLS
];
121 GdkColor color_marked
;
127 FolderView
*folderview
;
128 HeaderView
*headerview
;
129 MessageView
*messageview
;
130 MessageView
*ext_messageview
;
131 QuickSearch
*quicksearch
;
133 FolderItem
*folder_item
;
135 /* summaryview prefs */
136 gint important_score
;
137 FolderSortKey sort_key
;
138 FolderSortType sort_type
;
140 guint thread_collapsed
;
142 /* Extra data for summaryview */
143 regex_t
*simplify_subject_preg
;
145 /* current message status */
155 /* table for looking up message-id */
156 GHashTable
*msgid_table
;
157 GHashTable
*subject_table
;
159 /* list for moving/deleting messages */
161 int msginfo_update_callback_id
;
163 /* update folder label when renaming */
164 gint folder_item_update_callback_id
;
165 gint folder_update_callback_id
;
167 GtkTargetList
*target_list
; /* DnD */
169 // folders with matches for recursive quicksearch queries
170 GSList
*recursive_matched_folders
;
171 FolderItem
*search_root_folder
;
173 guint mark_as_read_timeout_tag
;
176 SummaryView
*summary_create(MainWindow
*mainwin
);
177 void summaryview_destroy(SummaryView
*summaryview
);
178 void summary_init (SummaryView
*summaryview
);
179 gboolean
summary_show (SummaryView
*summaryview
,
181 void summary_clear_list (SummaryView
*summaryview
);
182 void summary_clear_all (SummaryView
*summaryview
);
184 void summary_lock (SummaryView
*summaryview
);
185 void summary_unlock (SummaryView
*summaryview
);
186 void summary_freeze (SummaryView
*summaryview
);
187 void summary_thaw (SummaryView
*summaryview
);
188 void summary_thaw_with_status (SummaryView
*summaryview
);
189 void summary_grab_focus (SummaryView
*summaryview
);
190 GtkWidget
*summary_get_main_widget(SummaryView
*summaryview
);
191 gboolean
summary_is_locked (SummaryView
*summaryview
);
193 SummarySelection
summary_get_selection_type (SummaryView
*summaryview
);
194 MsgInfo
*summary_get_selected_msg (SummaryView
*summaryview
);
195 GSList
*summary_get_selected_msg_list (SummaryView
*summaryview
);
197 void summary_select_prev (SummaryView
*summaryview
);
198 void summary_select_next (SummaryView
*summaryview
);
199 void summary_select_prev_unread (SummaryView
*summaryview
);
200 void summary_select_next_unread (SummaryView
*summaryview
);
201 void summary_select_prev_new (SummaryView
*summaryview
);
202 void summary_select_next_new (SummaryView
*summaryview
);
203 void summary_select_prev_marked (SummaryView
*summaryview
);
204 void summary_select_next_marked (SummaryView
*summaryview
);
205 void summary_select_prev_labeled (SummaryView
*summaryview
);
206 void summary_select_next_labeled (SummaryView
*summaryview
);
207 void summary_select_parent (SummaryView
*summaryview
);
208 void summary_select_by_msgnum (SummaryView
*summaryview
,
210 void summary_display_by_msgnum (SummaryView
*summaryview
,
212 void summary_select_by_msg_list (SummaryView
*summaryview
, GSList
*msginfos
);
213 guint
summary_get_current_msgnum (SummaryView
*summaryview
);
214 void summary_select_node (SummaryView
*summaryview
,
215 GtkCMCTreeNode
*node
,
218 void summary_expand_threads (SummaryView
*summaryview
);
219 void summary_collapse_threads (SummaryView
*summaryview
);
220 void summary_toggle_ignore_thread (SummaryView
*summaryview
);
221 void summary_toggle_watch_thread (SummaryView
*summaryview
);
223 void summary_filter (SummaryView
*summaryview
,
224 gboolean selected_only
);
225 void summary_filter_open (SummaryView
*summaryview
,
226 PrefsFilterType type
,
227 gint processing_rule
);
228 void summary_msginfo_filter_open (FolderItem
* item
, MsgInfo
*msginfo
,
229 PrefsFilterType type
, gint processing_rule
);
231 void summary_sort (SummaryView
*summaryview
,
232 FolderSortKey sort_key
,
233 FolderSortType sort_type
);
235 void summary_delete (SummaryView
*summaryview
);
236 void summary_delete_trash (SummaryView
*summaryview
);
238 void summary_cancel (SummaryView
*summaryview
);
240 gboolean
summary_execute (SummaryView
*summaryview
);
241 gboolean
summary_expunge (SummaryView
*summaryview
);
243 void summary_attract_by_subject (SummaryView
*summaryview
);
245 gint
summary_write_cache (SummaryView
*summaryview
);
247 gboolean
summary_pass_key_press_event (SummaryView
*summaryview
,
250 void summary_display_msg_selected (SummaryView
*summaryview
,
251 gboolean all_headers
);
252 void summary_redisplay_msg (SummaryView
*summaryview
);
253 void summary_open_msg (SummaryView
*summaryview
);
254 void summary_open_row (GtkSCTree
*sctree
, SummaryView
*summaryview
);
255 void summary_view_source (SummaryView
*summaryview
);
256 void summary_reedit (SummaryView
*summaryview
);
257 gboolean
summary_step (SummaryView
*summaryview
,
259 void summary_toggle_view (SummaryView
*summaryview
);
260 void summary_set_marks_selected (SummaryView
*summaryview
);
261 guint
summary_get_msgnum (SummaryView
*summaryview
,
262 GtkCMCTreeNode
*node
);
264 void summary_move_selected_to (SummaryView
*summaryview
,
265 FolderItem
*to_folder
);
266 void summary_move_to (SummaryView
*summaryview
);
267 void summary_copy_selected_to (SummaryView
*summaryview
,
268 FolderItem
*to_folder
);
269 GSList
*summary_get_selection (SummaryView
*summaryview
);
270 void summary_copy_to (SummaryView
*summaryview
);
271 void summary_save_as (SummaryView
*summaryview
);
272 void summary_print (SummaryView
*summaryview
);
273 void summary_mark (SummaryView
*summaryview
);
274 void summary_unmark (SummaryView
*summaryview
);
275 void summary_mark_as_unread (SummaryView
*summaryview
);
276 void summary_mark_as_read (SummaryView
*summaryview
);
277 void summary_msgs_lock (SummaryView
*summaryview
);
278 void summary_msgs_unlock (SummaryView
*summaryview
);
279 void summary_mark_all_read (SummaryView
*summaryview
);
280 void summary_mark_as_spam (SummaryView
*summaryview
,
283 void summary_ignore_thread (SummaryView
*summaryview
);
284 void summary_unignore_thread (SummaryView
*summaryview
);
285 void summary_watch_thread (SummaryView
*summaryview
);
286 void summary_unwatch_thread (SummaryView
*summaryview
);
288 void summary_add_address (SummaryView
*summaryview
);
289 void summary_select_all (SummaryView
*summaryview
);
290 void summary_unselect_all (SummaryView
*summaryview
);
291 void summary_select_thread (SummaryView
*summaryview
,
292 gboolean delete_thread
,
293 gboolean trash_thread
);
295 void summary_set_colorlabel (SummaryView
*summaryview
,
298 void summary_set_tag (SummaryView
*summaryview
,
302 void summary_set_column_order (SummaryView
*summaryview
);
304 void summary_toggle_show_read_messages
305 (SummaryView
*summaryview
);
306 void summary_toggle_show_read_threads
307 (SummaryView
*summaryview
);
308 void summary_toggle_show_del_messages
309 (SummaryView
*summaryview
);
311 void summary_toggle_view_real (SummaryView
*summaryview
);
313 void summary_reflect_prefs_pixmap_theme
314 (SummaryView
*summaryview
);
315 void summary_reflect_prefs_custom_colors(SummaryView
*summaryview
);
316 void summary_reflect_tags_changes(SummaryView
*summaryview
);
317 void summary_harvest_address (SummaryView
*summaryview
);
318 void summary_set_prefs_from_folderitem
319 (SummaryView
*summaryview
, FolderItem
*item
);
320 void summary_save_prefs_to_folderitem
321 (SummaryView
*summaryview
, FolderItem
*item
);
322 gint
summaryview_export_mbox_list (SummaryView
*summaryview
);
323 void summaryview_lock(SummaryView
*summaryview
, FolderItem
*item
);
324 void summaryview_unlock(SummaryView
*summaryview
, FolderItem
*item
);
325 void summary_reflect_prefs(void);
326 void summaryview_activate_quicksearch(SummaryView
*summaryview
, gboolean show
);
327 void summary_set_menu_sensitive (SummaryView
*summaryview
);
328 void summary_relayout(SummaryView
*summaryview
);
329 void summary_update_unread(SummaryView
*summaryview
, FolderItem
*removed_item
);
330 gboolean
summary_is_list(SummaryView
*summaryview
);
331 gboolean
summaryview_search_root_progress(gpointer data
, guint at
, guint matched
, guint total
);
332 #endif /* __SUMMARY_H__ */