diff options
author | Monsta <[email protected]> | 2015-08-21 21:52:19 +0300 |
---|---|---|
committer | infirit <[email protected]> | 2015-08-31 21:57:23 +0200 |
commit | aa2b7e1af410a0e3dd4f0e0061cd09a2034835ca (patch) | |
tree | 5e545d5b71ed54cf3403302a7a94c35318bfe581 /mate-dictionary/src | |
parent | 695b53400eac1bbdf7fcc09d78463be297139683 (diff) | |
download | mate-utils-aa2b7e1af410a0e3dd4f0e0061cd09a2034835ca.tar.bz2 mate-utils-aa2b7e1af410a0e3dd4f0e0061cd09a2034835ca.tar.xz |
dictionary: make Ctrl+A and Ctrl+C work in the search field
from
https://git.gnome.org/browse/gnome-dictionary/commit/?id=196f65131bff3e0d9b386cda5e071238ab388b9d
Diffstat (limited to 'mate-dictionary/src')
-rw-r--r-- | mate-dictionary/src/gdict-window.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/mate-dictionary/src/gdict-window.c b/mate-dictionary/src/gdict-window.c index 462134d2..a935f895 100644 --- a/mate-dictionary/src/gdict-window.c +++ b/mate-dictionary/src/gdict-window.c @@ -1047,8 +1047,11 @@ gdict_window_cmd_edit_copy (GtkAction *action, { g_assert (GDICT_IS_WINDOW (window)); - gdict_defbox_copy_to_clipboard (GDICT_DEFBOX (window->defbox), - gtk_clipboard_get (GDK_SELECTION_CLIPBOARD)); + if (gtk_widget_has_focus (window->entry)) + gtk_editable_copy_clipboard (GTK_EDITABLE (window->entry)); + else + gdict_defbox_copy_to_clipboard (GDICT_DEFBOX (window->defbox), + gtk_clipboard_get (GDK_SELECTION_CLIPBOARD)); } static void @@ -1057,7 +1060,10 @@ gdict_window_cmd_edit_select_all (GtkAction *action, { g_assert (GDICT_IS_WINDOW (window)); - gdict_defbox_select_all (GDICT_DEFBOX (window->defbox)); + if (gtk_widget_has_focus (window->entry)) + gtk_editable_select_region (GTK_EDITABLE (window->entry), 0, -1); + else + gdict_defbox_select_all (GDICT_DEFBOX (window->defbox)); } static void |