aboutsummaryrefslogtreecommitdiffstats
path: root/mail/message-list.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-02-20 11:51:20 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-02-20 11:51:20 +0800
commitcf945fcde2d0ee22a0d63e8ba73f7f198eeeb549 (patch)
tree5d994601dbf63d28b237f999578a077fb2ad0756 /mail/message-list.c
parent7f2dde8abdfe9db2726d4ed1302879640208ce03 (diff)
downloadgsoc2013-evolution-cf945fcde2d0ee22a0d63e8ba73f7f198eeeb549.tar
gsoc2013-evolution-cf945fcde2d0ee22a0d63e8ba73f7f198eeeb549.tar.gz
gsoc2013-evolution-cf945fcde2d0ee22a0d63e8ba73f7f198eeeb549.tar.bz2
gsoc2013-evolution-cf945fcde2d0ee22a0d63e8ba73f7f198eeeb549.tar.lz
gsoc2013-evolution-cf945fcde2d0ee22a0d63e8ba73f7f198eeeb549.tar.xz
gsoc2013-evolution-cf945fcde2d0ee22a0d63e8ba73f7f198eeeb549.tar.zst
gsoc2013-evolution-cf945fcde2d0ee22a0d63e8ba73f7f198eeeb549.zip
Prompt the user to find out if he/she wants to go to the next folder with
2002-02-19 Jeffrey Stedfast <fejj@ximian.com> * mail-callbacks.c (confirm_goto_next_folder): Prompt the user to find out if he/she wants to go to the next folder with unread mail in it. (find_current_folder): Find a given CamelFolderInfo node based on a given uri. (find_next_folder_r): Recursively look for a CamelFOlderInfo node which has unread messages. (find_next_folder): Given a currently selected CamelFolderInfo node, look for the next node containing unread messages. (do_evil_kludgy_goto_next_folder_hack): Find the currently selected folder and then find the very next folder after it that contains unread messages and then select it via a CORBA call to the shell. (next_unread_msg): If we fail to find an unread message in the message-list, prompt the user to find out if we should jump to the next fodler containing unread messages. If so, call do_evil_kludgy_goto_next_folder_hack(). * message-list.c (message_list_select): Return a boolean value based on whether the call was successfull or not. * mail-config.c (mail_config_get_confirm_goto_next_folder): (mail_config_set_confirm_goto_next_folder): (mail_config_get_goto_next_folder): (mail_config_set_goto_next_folder): All new functions, yay. (config_read): Read in the confirm_goto_next_folder and goto_next_folder config options. (mail_config_write_on_exit): Same the options here. svn path=/trunk/; revision=15770
Diffstat (limited to 'mail/message-list.c')
-rw-r--r--mail/message-list.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/mail/message-list.c b/mail/message-list.c
index f2dfcf1918..030791faa8 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -403,8 +403,10 @@ search_func (ETreeModel *model, ETreePath path, struct search_func_data *data)
* message, or %MESSAGE_LIST_SELECT_PREVIOUS if it should find the
* previous. If no suitable row is found, the selection will be
* unchanged.
+ *
+ * Returns %TRUE if a new message has been selected or %FALSE otherwise.
**/
-void
+gboolean
message_list_select (MessageList *message_list,
MessageListSelectDirection direction,
guint32 flags,
@@ -413,23 +415,23 @@ message_list_select (MessageList *message_list,
{
struct search_func_data data;
ETreeFindNextParams params = 0;
-
+
if (!GTK_WIDGET_HAS_FOCUS (message_list))
gtk_widget_grab_focus (GTK_WIDGET (message_list));
-
+
data.message_list = message_list;
data.flags = flags;
data.mask = mask;
-
+
if (direction == MESSAGE_LIST_SELECT_NEXT)
params |= E_TREE_FIND_NEXT_FORWARD;
else
params |= E_TREE_FIND_NEXT_BACKWARD;
-
+
if (wraparound)
params |= E_TREE_FIND_NEXT_WRAP;
-
- e_tree_find_next (message_list->tree, params, (ETreePathFunc) search_func, &data);
+
+ return e_tree_find_next (message_list->tree, params, (ETreePathFunc) search_func, &data);
}