From aa2b7e1af410a0e3dd4f0e0061cd09a2034835ca Mon Sep 17 00:00:00 2001 From: Monsta Date: Fri, 21 Aug 2015 21:52:19 +0300 Subject: dictionary: make Ctrl+A and Ctrl+C work in the search field from https://git.gnome.org/browse/gnome-dictionary/commit/?id=196f65131bff3e0d9b386cda5e071238ab388b9d --- mate-dictionary/src/gdict-window.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'mate-dictionary') 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 -- cgit v1.2.1