From c5f85f4f331f5b8117d24dbec871a312d712e654 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Mon, 4 Mar 2002 22:01:12 +0000 Subject: Connect to the focus-in/out events on the message-list so that we can 2002-03-04 Jeffrey Stedfast * folder-browser.c (my_folder_browser_init): Connect to the focus-in/out events on the message-list so that we can disable the EditInvertSelection and EditSelectThread menu items when the message-list is not in focus. * folder-browser-ui.c (folder_browser_ui_message_list_unfocus): New function to de-sensitize some items if the message-list is not in focus. (folder_browser_ui_message_list_focus): New function to sensitize some items if the message-list is not in focus. * mail-callbacks.c (invert_selection): Only invert the selection of the message-list if it is the widget in focus. * message-list.c (message_list_select): Do not explicitly grab the focus here. svn path=/trunk/; revision=15909 --- mail/mail-callbacks.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'mail/mail-callbacks.c') diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c index 87c7b3e506..4ffc4e4c78 100644 --- a/mail/mail-callbacks.c +++ b/mail/mail-callbacks.c @@ -1696,9 +1696,11 @@ invert_selection (BonoboUIComponent *uih, void *user_data, const char *path) if (FOLDER_BROWSER_IS_DESTROYED (fb)) return; - etsm = e_tree_get_selection_model (fb->message_list->tree); - - e_selection_model_invert_selection (etsm); + if (GTK_WIDGET_HAS_FOCUS (fb->message_list)) { + etsm = e_tree_get_selection_model (fb->message_list->tree); + + e_selection_model_invert_selection (etsm); + } } /* flag all selected messages. Return number flagged */ -- cgit v1.2.3