aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar/e-memo-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/calendar/e-memo-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/calendar/e-memo-shell-view.c')
-rw-r--r--modules/calendar/e-memo-shell-view.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/modules/calendar/e-memo-shell-view.c b/modules/calendar/e-memo-shell-view.c
index 29a82524c4..0afbe18e77 100644
--- a/modules/calendar/e-memo-shell-view.c
+++ b/modules/calendar/e-memo-shell-view.c
@@ -175,7 +175,6 @@ memo_shell_view_update_actions (EShellView *shell_view)
/* Be descriptive. */
gboolean any_memos_selected;
gboolean can_delete_primary_source;
- gboolean clipboard_has_calendar;
gboolean has_primary_source;
gboolean multiple_memos_selected;
gboolean primary_source_is_system;
@@ -184,6 +183,9 @@ memo_shell_view_update_actions (EShellView *shell_view)
gboolean sources_are_editable;
gboolean refresh_supported;
+ /* Chain up to parent's update_actions() method. */
+ E_SHELL_VIEW_CLASS (parent_class)->update_actions (shell_view);
+
priv = E_MEMO_SHELL_VIEW_GET_PRIVATE (shell_view);
shell_window = e_shell_view_get_shell_window (shell_view);
@@ -199,8 +201,6 @@ memo_shell_view_update_actions (EShellView *shell_view)
(state & E_MEMO_SHELL_CONTENT_SELECTION_CAN_EDIT);
selection_has_url =
(state & E_MEMO_SHELL_CONTENT_SELECTION_HAS_URL);
- clipboard_has_calendar =
- (state & E_MEMO_SHELL_CONTENT_CLIPBOARD_HAS_CALENDAR);
shell_sidebar = e_shell_view_get_shell_sidebar (shell_view);
state = e_shell_sidebar_check_state (shell_sidebar);
@@ -217,18 +217,6 @@ memo_shell_view_update_actions (EShellView *shell_view)
any_memos_selected =
(single_memo_selected || multiple_memos_selected);
- action = ACTION (MEMO_CLIPBOARD_COPY);
- sensitive = any_memos_selected;
- gtk_action_set_sensitive (action, sensitive);
-
- action = ACTION (MEMO_CLIPBOARD_CUT);
- sensitive = any_memos_selected && sources_are_editable;
- gtk_action_set_sensitive (action, sensitive);
-
- action = ACTION (MEMO_CLIPBOARD_PASTE);
- sensitive = sources_are_editable && clipboard_has_calendar;
- gtk_action_set_sensitive (action, sensitive);
-
action = ACTION (MEMO_DELETE);
sensitive = any_memos_selected && sources_are_editable;
gtk_action_set_sensitive (action, sensitive);