aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-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 /shell/e-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 'shell/e-shell-view.c')
-rw-r--r--shell/e-shell-view.c45
1 files changed, 29 insertions, 16 deletions
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index d87f8b7632..fdffe92fd6 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -507,21 +507,6 @@ shell_view_constructed (GObject *object)
}
static void
-shell_view_clear_search (EShellView *shell_view)
-{
- e_shell_view_set_search_rule (shell_view, NULL);
- e_shell_view_execute_search (shell_view);
-}
-
-static void
-shell_view_custom_search (EShellView *shell_view,
- EFilterRule *custom_rule)
-{
- e_shell_view_set_search_rule (shell_view, custom_rule);
- e_shell_view_execute_search (shell_view);
-}
-
-static void
shell_view_toggled (EShellView *shell_view)
{
EShellViewPrivate *priv = shell_view->priv;
@@ -553,6 +538,33 @@ shell_view_toggled (EShellView *shell_view)
}
static void
+shell_view_clear_search (EShellView *shell_view)
+{
+ e_shell_view_set_search_rule (shell_view, NULL);
+ e_shell_view_execute_search (shell_view);
+}
+
+static void
+shell_view_custom_search (EShellView *shell_view,
+ EFilterRule *custom_rule)
+{
+ e_shell_view_set_search_rule (shell_view, custom_rule);
+ e_shell_view_execute_search (shell_view);
+}
+
+static void
+shell_view_update_actions (EShellView *shell_view)
+{
+ EShellWindow *shell_window;
+ EFocusTracker *focus_tracker;
+
+ shell_window = e_shell_view_get_shell_window (shell_view);
+ focus_tracker = e_shell_window_get_focus_tracker (shell_window);
+
+ e_focus_tracker_update_actions (focus_tracker);
+}
+
+static void
shell_view_class_init (EShellViewClass *class)
{
GObjectClass *object_class;
@@ -574,9 +586,10 @@ shell_view_class_init (EShellViewClass *class)
class->new_shell_sidebar = e_shell_sidebar_new;
class->new_shell_taskbar = e_shell_taskbar_new;
+ class->toggled = shell_view_toggled;
class->clear_search = shell_view_clear_search;
class->custom_search = shell_view_custom_search;
- class->toggled = shell_view_toggled;
+ class->update_actions = shell_view_update_actions;
/**
* EShellView:action: