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 /shell/e-shell-window.c | |
parent | 83dc7625983470bff4ce8b9070fbc23c3370c472 (diff) | |
download | gsoc2013-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-window.c')
-rw-r--r-- | shell/e-shell-window.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c index 25b56caecb..d3d6107e24 100644 --- a/shell/e-shell-window.c +++ b/shell/e-shell-window.c @@ -29,6 +29,7 @@ enum { PROP_0, PROP_ACTIVE_VIEW, + PROP_FOCUS_TRACKER, PROP_GEOMETRY, PROP_SAFE_MODE, PROP_SHELL, @@ -234,6 +235,12 @@ shell_window_get_property (GObject *object, E_SHELL_WINDOW (object))); return; + case PROP_FOCUS_TRACKER: + g_value_set_object ( + value, e_shell_window_get_focus_tracker ( + E_SHELL_WINDOW (object))); + return; + case PROP_SAFE_MODE: g_value_set_boolean ( value, e_shell_window_get_safe_mode ( @@ -609,6 +616,21 @@ shell_window_class_init (EShellWindowClass *class) G_PARAM_READWRITE)); /** + * EShellWindow:focus-tracker + * + * The shell window's #EFocusTracker. + **/ + g_object_class_install_property ( + object_class, + PROP_FOCUS_TRACKER, + g_param_spec_object ( + "focus-tracker", + _("Focus Tracker"), + _("The shell window's EFocusTracker"), + E_TYPE_FOCUS_TRACKER, + G_PARAM_READABLE)); + + /** * EShellWindow:geometry * * User-specified initial window geometry string. @@ -886,6 +908,24 @@ e_shell_window_get_shell_view_action (EShellWindow *shell_window, } /** + * e_shell_window_get_focus_tracker: + * @shell_window: an #EShellWindow + * + * Returns @shell_window<!-- -->'s focus tracker, which directs + * Cut, Copy, Paste and Select All main menu activations to the + * appropriate editable or selectable widget. + * + * Returns: the #EFocusTracker for @shell_window + **/ +EFocusTracker * +e_shell_window_get_focus_tracker (EShellWindow *shell_window) +{ + g_return_val_if_fail (E_IS_SHELL_WINDOW (shell_window), NULL); + + return shell_window->priv->focus_tracker; +} + +/** * e_shell_window_get_ui_manager: * @shell_window: an #EShellWindow * |