diff options
author | Not Zed <NotZed@Ximian.com> | 2004-07-28 10:55:52 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-07-28 10:55:52 +0800 |
commit | 7d0353e2687bb60018421e2c9c885c9e9794ae7b (patch) | |
tree | e8a2ce8d0ab684e668f304e336feb4f0799eb016 /mail/em-folder-view.c | |
parent | 7fcf69af0f8a9019d5114a4741ff1bbf3aa9a3dc (diff) | |
download | gsoc2013-evolution-7d0353e2687bb60018421e2c9c885c9e9794ae7b.tar.gz gsoc2013-evolution-7d0353e2687bb60018421e2c9c885c9e9794ae7b.tar.zst gsoc2013-evolution-7d0353e2687bb60018421e2c9c885c9e9794ae7b.zip |
** See #57972.
2004-07-27 Not Zed <NotZed@Ximian.com>
** See #57972.
* message-list.c (search_func): removed.
(ml_search_path): new function to just search, not actually change
the cursor like e_tree_find does.
(message_list_can_select): new function, returns true if the
selection specified is possible without changing the selection.
(message_list_select): rewritten.
(select_path): helper to select a path in a way that 'works
reliably'.
(message_list_select_next_thread): rewritten to use the
table-adapter, so it properly handles arbitrary sorting.
* em-folder-view.c (em_folder_view_get_popup_target): setup
next/prev flags as appropriate.
(emfv_enable_map[]): setup next/prev flags.
* em-folder-view.h: added last and first message status bits to
folder view select mask.
svn path=/trunk/; revision=26749
Diffstat (limited to 'mail/em-folder-view.c')
-rw-r--r-- | mail/em-folder-view.c | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c index 51d5eee890..85c6cd9f92 100644 --- a/mail/em-folder-view.c +++ b/mail/em-folder-view.c @@ -724,7 +724,7 @@ emfv_popup_mark_junk (GtkWidget *w, EMFolderView *emfv) CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_JUNK|CAMEL_MESSAGE_JUNK_LEARN, CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_JUNK|CAMEL_MESSAGE_JUNK_LEARN); if (uids->len == 1) - message_list_select(emfv->list, MESSAGE_LIST_SELECT_NEXT, 0, 0, FALSE); + message_list_select(emfv->list, MESSAGE_LIST_SELECT_NEXT, 0, 0); message_list_free_uids(emfv->list, uids); } @@ -739,7 +739,7 @@ emfv_popup_mark_nojunk (GtkWidget *w, EMFolderView *emfv) CAMEL_MESSAGE_JUNK|CAMEL_MESSAGE_JUNK_LEARN, CAMEL_MESSAGE_JUNK_LEARN); if (uids->len == 1) - message_list_select(emfv->list, MESSAGE_LIST_SELECT_NEXT, 0, 0, FALSE); + message_list_select(emfv->list, MESSAGE_LIST_SELECT_NEXT, 0, 0); message_list_free_uids(emfv->list, uids); } @@ -753,8 +753,8 @@ emfv_popup_delete(GtkWidget *w, EMFolderView *emfv) em_folder_view_mark_selected(emfv, CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_DELETED, CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_DELETED); if (uids->len == 1) { - if (!message_list_select (emfv->list, MESSAGE_LIST_SELECT_NEXT, 0, 0, FALSE) && emfv->hide_deleted) - message_list_select (emfv->list, MESSAGE_LIST_SELECT_PREVIOUS, 0, 0, FALSE); + if (!message_list_select (emfv->list, MESSAGE_LIST_SELECT_NEXT, 0, 0) && emfv->hide_deleted) + message_list_select (emfv->list, MESSAGE_LIST_SELECT_PREVIOUS, 0, 0); } em_utils_uids_free(uids); } @@ -1110,7 +1110,7 @@ emfv_mail_next(BonoboUIComponent *uid, void *data, const char *path) { EMFolderView *emfv = data; - message_list_select(emfv->list, MESSAGE_LIST_SELECT_NEXT, 0, 0, FALSE); + message_list_select(emfv->list, MESSAGE_LIST_SELECT_NEXT, 0, 0); } static void @@ -1118,7 +1118,7 @@ emfv_mail_next_flagged(BonoboUIComponent *uid, void *data, const char *path) { EMFolderView *emfv = data; - message_list_select(emfv->list, MESSAGE_LIST_SELECT_NEXT, CAMEL_MESSAGE_FLAGGED, CAMEL_MESSAGE_FLAGGED, TRUE); + message_list_select(emfv->list, MESSAGE_LIST_SELECT_NEXT|MESSAGE_LIST_SELECT_WRAP, CAMEL_MESSAGE_FLAGGED, CAMEL_MESSAGE_FLAGGED); } static void @@ -1126,7 +1126,7 @@ emfv_mail_next_unread(BonoboUIComponent *uid, void *data, const char *path) { EMFolderView *emfv = data; - message_list_select(emfv->list, MESSAGE_LIST_SELECT_NEXT, 0, CAMEL_MESSAGE_SEEN, TRUE); + message_list_select(emfv->list, MESSAGE_LIST_SELECT_NEXT|MESSAGE_LIST_SELECT_WRAP, 0, CAMEL_MESSAGE_SEEN); } static void @@ -1142,7 +1142,7 @@ emfv_mail_previous(BonoboUIComponent *uid, void *data, const char *path) { EMFolderView *emfv = data; - message_list_select(emfv->list, MESSAGE_LIST_SELECT_PREVIOUS, 0, 0, FALSE); + message_list_select(emfv->list, MESSAGE_LIST_SELECT_PREVIOUS, 0, 0); } static void @@ -1150,7 +1150,7 @@ emfv_mail_previous_flagged(BonoboUIComponent *uid, void *data, const char *path) { EMFolderView *emfv = data; - message_list_select(emfv->list, MESSAGE_LIST_SELECT_PREVIOUS, CAMEL_MESSAGE_FLAGGED, CAMEL_MESSAGE_FLAGGED, TRUE); + message_list_select(emfv->list, MESSAGE_LIST_SELECT_PREVIOUS|MESSAGE_LIST_SELECT_WRAP, CAMEL_MESSAGE_FLAGGED, CAMEL_MESSAGE_FLAGGED); } static void @@ -1158,7 +1158,7 @@ emfv_mail_previous_unread(BonoboUIComponent *uid, void *data, const char *path) { EMFolderView *emfv = data; - message_list_select(emfv->list, MESSAGE_LIST_SELECT_PREVIOUS, 0, CAMEL_MESSAGE_SEEN, TRUE); + message_list_select(emfv->list, MESSAGE_LIST_SELECT_PREVIOUS|MESSAGE_LIST_SELECT_WRAP, 0, CAMEL_MESSAGE_SEEN); } static void @@ -1549,11 +1549,11 @@ static const EMFolderViewEnable emfv_enable_map[] = { { "EditPaste", EM_POPUP_SELECT_FOLDER }, /* FIXME: should these be single-selection? */ - { "MailNext", EM_POPUP_SELECT_MANY }, + { "MailNext", EM_POPUP_SELECT_MANY|EM_FOLDER_VIEW_SELECT_NEXT_MSG }, { "MailNextFlagged", EM_POPUP_SELECT_MANY }, { "MailNextUnread", EM_POPUP_SELECT_MANY }, { "MailNextThread", EM_POPUP_SELECT_MANY }, - { "MailPrevious", EM_POPUP_SELECT_MANY }, + { "MailPrevious", EM_POPUP_SELECT_MANY|EM_FOLDER_VIEW_SELECT_PREV_MSG }, { "MailPreviousFlagged", EM_POPUP_SELECT_MANY }, { "MailPreviousUnread", EM_POPUP_SELECT_MANY }, @@ -1870,6 +1870,12 @@ em_folder_view_get_popup_target(EMFolderView *emfv) if (message_list_hidden(emfv->list) != 0) t->mask &= ~EM_FOLDER_VIEW_SELECT_HIDDEN; + if (message_list_can_select(emfv->list, MESSAGE_LIST_SELECT_NEXT, 0, 0)) + t->mask &= ~EM_FOLDER_VIEW_SELECT_NEXT_MSG; + + if (message_list_can_select(emfv->list, MESSAGE_LIST_SELECT_PREVIOUS, 0, 0)) + t->mask &= ~EM_FOLDER_VIEW_SELECT_PREV_MSG; + /* See bug #54770 */ if (!emfv->hide_deleted) t->mask &= ~EM_POPUP_SELECT_DELETE; |