blob: 4ad417edd6c2f1c6c2841b61f485ca30e97d9fb7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
From d4e2a297589e35a9545d996a4f0a61d22152e4c7 Mon Sep 17 00:00:00 2001
From: Alexandre Rostovtsev <tetromino@gentoo.org>
Date: Wed, 14 Dec 2011 20:43:08 -0500
Subject: [PATCH] Do not handle keyboard shortcuts in NautilusWindow if an
editable widget is focused
If an editable widget (e.g. GtkEntry in the location bar or search bar) is
focused, NautilusWindow should forward all key press events to it since the
window's accelerator bindings may conflict with the widget's.
https://bugzilla.gnome.org/show_bug.cgi?id=664573
---
src/nautilus-window.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index c3a3c2c..e8646d8 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -1117,11 +1117,12 @@ nautilus_window_key_press_event (GtkWidget *widget,
active_slot = nautilus_window_get_active_slot (window);
view = active_slot->content_view;
- if (view != NULL && nautilus_view_get_is_renaming (view)) {
- /* if we're renaming, just forward the event to the
- * focused widget and return. We don't want to process the window
- * accelerator bindings, as they might conflict with the
- * editable widget bindings.
+ if ((view != NULL && (nautilus_view_get_is_renaming (view))) || GTK_IS_EDITABLE (gtk_window_get_focus (window))) {
+ /* If we're renaming, or editing a GtkEntry (e.g. location or
+ * search bar), just forward the event to the focused widget
+ * and return.
+ * We don't want to process the window accelerator bindings,
+ * as they might conflict with the editable widget bindings.
*/
if (gtk_window_propagate_key_event (GTK_WINDOW (window), event)) {
return TRUE;
--
1.7.8
|