diff options
author | Monsta <[email protected]> | 2015-08-21 21:52:19 +0300 |
---|---|---|
committer | monsta <[email protected]> | 2015-09-01 13:10:22 +0300 |
commit | 1f5048617ccc097a54327fc5b1f5d59f09737722 (patch) | |
tree | 3ada642863c3c2c9861b70ac3625c2f324b6cb99 /mate-dictionary | |
parent | 7698492c68b9803372f781c052004953cc8d59cb (diff) | |
download | mate-utils-1f5048617ccc097a54327fc5b1f5d59f09737722.tar.bz2 mate-utils-1f5048617ccc097a54327fc5b1f5d59f09737722.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')
-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 |