Connect to our own message_list_built signal. Focus the list and select
2002-02-21 Jeffrey Stedfast <fejj@ximian.com> * message-list.c (on_message_list_built): Connect to our own message_list_built signal. Focus the list and select the first unread message (or frst message depending). Fixes bug #3900. svn path=/trunk/; revision=15784
This commit is contained in:

committed by
Jeffrey Stedfast

parent
4f122d673c
commit
17815d8669
@ -1,9 +1,14 @@
|
||||
2002-02-21 Jeffrey Stedfast <fejj@ximian.com>
|
||||
|
||||
* message-list.c (on_message_list_built): Connect to our own
|
||||
message_list_built signal. Focus the list and select the first
|
||||
unread message (or frst message depending). Fixes bug #3900.
|
||||
|
||||
2002-02-20 Anna Marie Dirks <anna@ximian.com>
|
||||
|
||||
* message-tag-editor.c (message_tag_editor_init): Gave the editor
|
||||
window a title and an icon.
|
||||
|
||||
|
||||
2002-02-20 Anna Marie Dirks <anna@ximian.com>
|
||||
|
||||
* message-tags.glade: Changed the policy for table2 so that it
|
||||
@ -11,7 +16,6 @@
|
||||
as much growing room as possible. (And besides, there's no reason for
|
||||
table2 to expand/fill; its child widgets can't change size.
|
||||
|
||||
|
||||
2002-02-19 Jeffrey Stedfast <fejj@ximian.com>
|
||||
|
||||
* mail-callbacks.c (confirm_goto_next_folder): Prompt the user to
|
||||
|
@ -109,6 +109,7 @@ typedef struct _EMailAddress EMailAddress;
|
||||
static ETreeScrolledClass *message_list_parent_class;
|
||||
|
||||
static void on_cursor_activated_cmd (ETree *tree, int row, ETreePath path, gpointer user_data);
|
||||
static void on_message_list_built (MessageList *message_list, gpointer user_data);
|
||||
static gint on_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, MessageList *list);
|
||||
static char *filter_date (time_t date);
|
||||
static char *filter_size (int size);
|
||||
@ -1274,6 +1275,9 @@ message_list_construct (MessageList *message_list)
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (message_list->tree), "click",
|
||||
GTK_SIGNAL_FUNC (on_click), message_list);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (message_list), "message_list_built",
|
||||
GTK_SIGNAL_FUNC (on_message_list_built), message_list);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
@ -1460,7 +1464,6 @@ build_tree (MessageList *ml, CamelFolderThread *thread, CamelFolderChangeInfo *c
|
||||
diff -= start.tv_sec * 1000 + start.tv_usec/1000;
|
||||
printf("Building tree took %ld.%03ld seconds\n", diff / 1000, diff % 1000);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
/* this is about 20% faster than build_subtree_diff,
|
||||
@ -2043,6 +2046,31 @@ on_cursor_activated_cmd (ETree *tree, int row, ETreePath path, gpointer user_dat
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
on_message_list_built (MessageList *message_list, gpointer user_data)
|
||||
{
|
||||
GtkWidget *widget = GTK_WIDGET (message_list);
|
||||
|
||||
if (!GTK_WIDGET_VISIBLE (widget))
|
||||
return;
|
||||
|
||||
if (!GTK_WIDGET_HAS_FOCUS (widget))
|
||||
gtk_widget_grab_focus (widget);
|
||||
|
||||
if (!e_tree_get_cursor (message_list->tree)) {
|
||||
CamelMessageInfo *info;
|
||||
ETreePath node;
|
||||
|
||||
node = e_tree_node_at_row (message_list->tree, 0);
|
||||
e_tree_set_cursor (message_list->tree, node);
|
||||
|
||||
info = e_tree_memory_node_get_data (E_TREE_MEMORY (message_list->model), node);
|
||||
if (info && info->flags & CAMEL_MESSAGE_SEEN)
|
||||
message_list_select (message_list, MESSAGE_LIST_SELECT_NEXT,
|
||||
0, CAMEL_MESSAGE_SEEN, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
static gint
|
||||
on_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, MessageList *list)
|
||||
{
|
||||
|
Reference in New Issue
Block a user