aboutsummaryrefslogtreecommitdiffstats
path: root/mail/message-list.c
diff options
context:
space:
mode:
authorChris Toshok <toshok@src.gnome.org>2000-04-17 15:59:16 +0800
committerChris Toshok <toshok@src.gnome.org>2000-04-17 15:59:16 +0800
commit7aa932f07e5b50cadb8173312119e3252f8c9366 (patch)
treebb1d3efbab6437032664df130b6f213b0b648cae /mail/message-list.c
parentece07d1b3afb6e305f0446d318f26bcaaa522ab3 (diff)
downloadgsoc2013-evolution-7aa932f07e5b50cadb8173312119e3252f8c9366.tar
gsoc2013-evolution-7aa932f07e5b50cadb8173312119e3252f8c9366.tar.gz
gsoc2013-evolution-7aa932f07e5b50cadb8173312119e3252f8c9366.tar.bz2
gsoc2013-evolution-7aa932f07e5b50cadb8173312119e3252f8c9366.tar.lz
gsoc2013-evolution-7aa932f07e5b50cadb8173312119e3252f8c9366.tar.xz
gsoc2013-evolution-7aa932f07e5b50cadb8173312119e3252f8c9366.tar.zst
gsoc2013-evolution-7aa932f07e5b50cadb8173312119e3252f8c9366.zip
new function, actually calls select_msg. (on_row_selection_cmd): register
* message-list.c (on_row_selection_idle): new function, actually calls select_msg. (on_row_selection_cmd): register an idle instead of calling select_msg directly. this fixes the lag before the row is selected - selection is instantaneous now, with message loading happening afterward. * message-list.h: add row_to_select and an idle_id to the message list to make the select_msg call happen in an idle func. svn path=/trunk/; revision=2470
Diffstat (limited to 'mail/message-list.c')
-rw-r--r--mail/message-list.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/mail/message-list.c b/mail/message-list.c
index 98cf6c5893..be4fac5b9e 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -645,6 +645,8 @@ message_list_new (FolderBrowser *parent_folder_browser)
message_list->parent_folder_browser = parent_folder_browser;
+ message_list->idle_id = 0;
+
message_list_construct (message_list, corba_object);
return BONOBO_OBJECT (message_list);
@@ -728,6 +730,16 @@ message_list_get_widget (MessageList *message_list)
E_MAKE_TYPE (message_list, "MessageList", MessageList, message_list_class_init, message_list_init, PARENT_TYPE);
+static gboolean
+on_row_selection_idle (gpointer data)
+{
+ MessageList *message_list = data;
+
+ select_msg (message_list, message_list->row_to_select);
+
+ message_list->idle_id = 0;
+ return FALSE;
+}
static void
on_row_selection_cmd (ETable *table,
@@ -735,12 +747,15 @@ on_row_selection_cmd (ETable *table,
gboolean selected,
gpointer user_data)
{
- MessageList *message_list;
+ if (selected) {
+ MessageList *message_list;
- message_list = MESSAGE_LIST (user_data);
+ message_list = MESSAGE_LIST (user_data);
+ message_list->row_to_select = row;
- if (selected)
- select_msg (message_list, row);
+ if (!message_list->idle_id)
+ g_idle_add_full (G_PRIORITY_LOW, on_row_selection_idle, message_list, NULL);
+ }
}