aboutsummaryrefslogtreecommitdiffstats
path: root/modules/addressbook/e-book-shell-view.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-12-08 00:31:17 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-12-26 04:42:17 +0800
commitabc0e4c694fb3d9624e890384880def730769fa0 (patch)
tree8d411f90f4edb0859ffe0b260c85e02e7d273088 /modules/addressbook/e-book-shell-view.c
parent83dc7625983470bff4ce8b9070fbc23c3370c472 (diff)
downloadgsoc2013-evolution-abc0e4c694fb3d9624e890384880def730769fa0.tar.gz
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/addressbook/e-book-shell-view.c')
-rw-r--r--modules/addressbook/e-book-shell-view.c25
1 files changed, 3 insertions, 22 deletions
diff --git a/modules/addressbook/e-book-shell-view.c b/modules/addressbook/e-book-shell-view.c
index fa5e5bbe29..9ab9cb743a 100644
--- a/modules/addressbook/e-book-shell-view.c
+++ b/modules/addressbook/e-book-shell-view.c
@@ -268,8 +268,9 @@ book_shell_view_update_actions (EShellView *shell_view)
gboolean selection_has_email;
gboolean source_is_busy;
gboolean source_is_editable;
- gboolean source_is_empty;
- gboolean clipboard_has_directory;
+
+ /* Chain up to parent's update_actions() method. */
+ E_SHELL_VIEW_CLASS (parent_class)->update_actions (shell_view);
priv = E_BOOK_SHELL_VIEW_GET_PRIVATE (shell_view);
@@ -290,10 +291,6 @@ book_shell_view_update_actions (EShellView *shell_view)
(state & E_BOOK_SHELL_CONTENT_SOURCE_IS_BUSY);
source_is_editable =
(state & E_BOOK_SHELL_CONTENT_SOURCE_IS_EDITABLE);
- source_is_empty =
- (state & E_BOOK_SHELL_CONTENT_SOURCE_IS_EMPTY);
- clipboard_has_directory =
- (state & E_BOOK_SHELL_CONTENT_CLIPBOARD_HAS_DIRECTORY);
shell_sidebar = e_shell_view_get_shell_sidebar (shell_view);
state = e_shell_sidebar_check_state (shell_sidebar);
@@ -328,18 +325,6 @@ book_shell_view_update_actions (EShellView *shell_view)
sensitive = source_is_busy;
gtk_action_set_sensitive (action, sensitive);
- action = ACTION (CONTACT_CLIPBOARD_COPY);
- sensitive = any_contacts_selected;
- gtk_action_set_sensitive (action, sensitive);
-
- action = ACTION (CONTACT_CLIPBOARD_CUT);
- sensitive = source_is_editable && any_contacts_selected;
- gtk_action_set_sensitive (action, sensitive);
-
- action = ACTION (CONTACT_CLIPBOARD_PASTE);
- sensitive = source_is_editable && clipboard_has_directory;
- gtk_action_set_sensitive (action, sensitive);
-
action = ACTION (CONTACT_COPY);
sensitive = any_contacts_selected;
gtk_action_set_sensitive (action, sensitive);
@@ -381,10 +366,6 @@ book_shell_view_update_actions (EShellView *shell_view)
sensitive = any_contacts_selected;
gtk_action_set_sensitive (action, sensitive);
- action = ACTION (CONTACT_SELECT_ALL);
- sensitive = !(source_is_empty);
- gtk_action_set_sensitive (action, sensitive);
-
action = ACTION (CONTACT_SEND_MESSAGE);
sensitive = any_contacts_selected && selection_has_email;
gtk_action_set_sensitive (action, sensitive);