summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2013-09-22 14:00:54 -0700
committerStefano Karapetsas <[email protected]>2013-09-22 14:00:54 -0700
commitbcf9affe7ba72c62a5e15ce4a6a7aee99d94c47a (patch)
tree7d07e6cfa651b0a6536f706c4bce1bea57d936ee /src
parent73cc7e98f61b2d5f327f26a2e6f4e5004347bf01 (diff)
parent749f7bf29e6c7b04d93eb54f2079455bf730a0c0 (diff)
downloadcaja-bcf9affe7ba72c62a5e15ce4a6a7aee99d94c47a.tar.bz2
caja-bcf9affe7ba72c62a5e15ce4a6a7aee99d94c47a.tar.xz
Merge pull request #168 from infirit/1.6
Fix ctrl+a behaviour in search field
Diffstat (limited to 'src')
-rw-r--r--src/caja-window.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/caja-window.c b/src/caja-window.c
index 782e2607..28e1ea35 100644
--- a/src/caja-window.c
+++ b/src/caja-window.c
@@ -1094,10 +1094,37 @@ caja_window_key_press_event (GtkWidget *widget,
GdkEventKey *event)
{
CajaWindow *window;
+ CajaWindowSlot *active_slot;
+ CajaView *view;
+ GtkWidget *focus_widget;
int i;
window = CAJA_WINDOW (widget);
+ active_slot = caja_window_get_active_slot (window);
+ view = active_slot->content_view;
+
+ if (view != NULL && focus_widget != NULL &&
+ GTK_IS_EDITABLE (focus_widget)) {
+ /* if we have input focus on a GtkEditable (e.g. a GtkEntry), forward
+ * the event to it before activating accelerator bindings too.
+ */
+ if (gtk_window_propagate_key_event (GTK_WINDOW (window), event)) {
+ return TRUE;
+ }
+ }
+
+ focus_widget = gtk_window_get_focus (GTK_WINDOW (window));
+ if (view != NULL && focus_widget != NULL &&
+ GTK_IS_EDITABLE (focus_widget)) {
+ /* if we have input focus on a GtkEditable (e.g. a GtkEntry), forward
+ * the event to it before activating accelerator bindings too.
+ */
+ if (gtk_window_propagate_key_event (GTK_WINDOW (window), event)) {
+ return TRUE;
+ }
+ }
+
for (i = 0; i < G_N_ELEMENTS (extra_window_keybindings); i++)
{
if (extra_window_keybindings[i].keyval == event->keyval)