diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-12-08 00:31:17 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-12-26 04:42:17 +0800 |
commit | abc0e4c694fb3d9624e890384880def730769fa0 (patch) | |
tree | 8d411f90f4edb0859ffe0b260c85e02e7d273088 /modules/mail | |
parent | 83dc7625983470bff4ce8b9070fbc23c3370c472 (diff) | |
download | gsoc2013-evolution-abc0e4c694fb3d9624e890384880def730769fa0.tar gsoc2013-evolution-abc0e4c694fb3d9624e890384880def730769fa0.tar.gz gsoc2013-evolution-abc0e4c694fb3d9624e890384880def730769fa0.tar.bz2 gsoc2013-evolution-abc0e4c694fb3d9624e890384880def730769fa0.tar.lz gsoc2013-evolution-abc0e4c694fb3d9624e890384880def730769fa0.tar.xz gsoc2013-evolution-abc0e4c694fb3d9624e890384880def730769fa0.tar.zst gsoc2013-evolution-abc0e4c694fb3d9624e890384880def730769fa0.zip |
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.
Diffstat (limited to 'modules/mail')
-rw-r--r-- | modules/mail/e-mail-shell-view-actions.c | 49 | ||||
-rw-r--r-- | modules/mail/e-mail-shell-view-private.c | 1 | ||||
-rw-r--r-- | modules/mail/e-mail-shell-view.c | 7 |
3 files changed, 4 insertions, 53 deletions
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"), - "<Control>a", - N_("Select all visible messages"), - G_CALLBACK (action_mail_folder_select_all_cb) }, - { "mail-folder-select-thread", NULL, N_("Select Message _Thread"), diff --git a/modules/mail/e-mail-shell-view-private.c b/modules/mail/e-mail-shell-view-private.c index b198b69cd1..85395fd8ed 100644 --- a/modules/mail/e-mail-shell-view-private.c +++ b/modules/mail/e-mail-shell-view-private.c @@ -443,6 +443,7 @@ e_mail_shell_view_private_constructed (EMailShellView *mail_shell_view) shell_content = e_shell_view_get_shell_content (shell_view); shell_sidebar = e_shell_view_get_shell_sidebar (shell_view); shell_window = e_shell_view_get_shell_window (shell_view); + ui_manager = e_shell_window_get_ui_manager (shell_window); shell = e_shell_window_get_shell (shell_window); diff --git a/modules/mail/e-mail-shell-view.c b/modules/mail/e-mail-shell-view.c index de81e131c5..bd0b3cbe48 100644 --- a/modules/mail/e-mail-shell-view.c +++ b/modules/mail/e-mail-shell-view.c @@ -440,6 +440,9 @@ mail_shell_view_update_actions (EShellView *shell_view) gboolean folder_has_unread_rec = FALSE; gboolean folder_tree_and_message_list_agree = TRUE; + /* Chain up to parent's update_actions() method. */ + E_SHELL_VIEW_CLASS (parent_class)->update_actions (shell_view); + mail_shell_view = E_MAIL_SHELL_VIEW (shell_view); shell_window = e_shell_view_get_shell_window (shell_view); @@ -554,10 +557,6 @@ mail_shell_view_update_actions (EShellView *shell_view) folder_tree_and_message_list_agree; gtk_action_set_sensitive (action, sensitive); - action = ACTION (MAIL_FOLDER_SELECT_ALL); - sensitive = !folder_is_store; - gtk_action_set_sensitive (action, sensitive); - action = ACTION (MAIL_FOLDER_SELECT_THREAD); sensitive = !folder_is_store; gtk_action_set_sensitive (action, sensitive); |