From abc0e4c694fb3d9624e890384880def730769fa0 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Mon, 7 Dec 2009 11:31:17 -0500 Subject: Introduce ESelectable and EFocusTracker. EFocusTracker tracks the input focus within a window and helps keep the sensitivity of "selectable" actions in the main menu up-to-date. Selectable actions include Cut, Copy, Paste, Select All and Delete. EFocusTracker has built-in support for widgets that implement the GtkEditable interface such as GtkEntry and GtkTextView. It also supports custom widgets that implement the ESelectable interface, which is a subset of GtkEditable and can apply to anything that displays selectable content (esp. tree views and ETables). This commit integrates EFocusTracker with EShellWindow, CompEditor, EMsgComposer, and ESignatureManager. It also bumps the GtkHTML requirement to 2.29.5 to utilize the new GtkhtmlEditor:html constructor property. --- modules/mail/e-mail-shell-view-actions.c | 49 -------------------------------- 1 file changed, 49 deletions(-) (limited to 'modules/mail/e-mail-shell-view-actions.c') diff --git a/modules/mail/e-mail-shell-view-actions.c b/modules/mail/e-mail-shell-view-actions.c index 2ab36d46fb..139dd9474f 100644 --- a/modules/mail/e-mail-shell-view-actions.c +++ b/modules/mail/e-mail-shell-view-actions.c @@ -353,48 +353,6 @@ action_mail_folder_rename_cb (GtkAction *action, em_folder_tree_edit_selected (folder_tree); } -/* Helper for action_mail_folder_select_all_cb() */ -static gboolean -action_mail_folder_select_all_timeout_cb (GtkWidget *message_list) -{ - message_list_select_all (MESSAGE_LIST (message_list)); - gtk_widget_grab_focus (message_list); - - return FALSE; -} - -static void -action_mail_folder_select_all_cb (GtkAction *action, - EMailShellView *mail_shell_view) -{ - EMailReader *reader; - GtkWidget *message_list; - EShellWindow *shell_window; - EShellView *shell_view; - - shell_view = E_SHELL_VIEW (mail_shell_view); - shell_window = e_shell_view_get_shell_window (shell_view); - - reader = E_MAIL_READER (mail_shell_view->priv->mail_shell_content); - message_list = e_mail_reader_get_message_list (reader); - - if (MESSAGE_LIST (message_list)->threaded) { - gtk_action_activate (ACTION (MAIL_THREADS_EXPAND_ALL)); - - /* XXX The timeout below is added so that the execution - * thread to expand all conversation threads would - * have completed. The timeout 505 is just to ensure - * that the value is a small delta more than the - * timeout value in mail_regen_list(). */ - g_timeout_add ( - 505, (GSourceFunc) - action_mail_folder_select_all_timeout_cb, - message_list); - } else - /* If there is no threading, just select all immediately. */ - action_mail_folder_select_all_timeout_cb (message_list); -} - static void action_mail_folder_select_thread_cb (GtkAction *action, EMailShellView *mail_shell_view) @@ -1059,13 +1017,6 @@ static GtkActionEntry mail_entries[] = { N_("Change the name of this folder"), G_CALLBACK (action_mail_folder_rename_cb) }, - { "mail-folder-select-all", - NULL, - N_("Select _All Messages"), - "a", - N_("Select all visible messages"), - G_CALLBACK (action_mail_folder_select_all_cb) }, - { "mail-folder-select-thread", NULL, N_("Select Message _Thread"), -- cgit