diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2008-05-05 13:20:23 +0000 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@src.gnome.org> | 2008-05-05 13:20:23 +0000 |
commit | 5f1b106468d9ae2101feb026e30e2d0f709706a6 (patch) | |
tree | 4fc00b49c592cde157b2798406df8d46f4078455 | |
parent | eb10746896c4b035d23d3991d7c9f4b220c042c4 (diff) | |
download | nautilus-5f1b106468d9ae2101feb026e30e2d0f709706a6.tar.gz |
Revert the patch for bug #314431 as it seems to break cut and paste.
2008-05-05 Cosimo Cecchi <cosimoc@gnome.org>
* src/nautilus-window.c: (nautilus_window_key_press_event):
Revert the patch for bug #314431 as it seems to break cut and paste.
svn path=/branches/gnome-2-22/; revision=14135
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/nautilus-window.c | 71 |
2 files changed, 26 insertions, 50 deletions
@@ -1,3 +1,8 @@ +2008-05-05 Cosimo Cecchi <cosimoc@gnome.org> + + * src/nautilus-window.c: (nautilus_window_key_press_event): + Revert the patch for bug #314431 as it seems to break cut and paste. + 2008-05-05 Paolo Borelli <pborelli@katamail.com> * src/nautilus-connect-server-dialog-main.c: diff --git a/src/nautilus-window.c b/src/nautilus-window.c index 82473b92b..aef006f91 100644 --- a/src/nautilus-window.c +++ b/src/nautilus-window.c @@ -744,68 +744,39 @@ nautilus_window_realize (GtkWidget *widget) update_cursor (NAUTILUS_WINDOW (widget)); } -/* Here we use an approach similar to the GEdit one. We override - * GtkWindow's handler to reverse the order in which keybindings are - * processed, and then we chain up to the grand parent handler. - */ static gboolean nautilus_window_key_press_event (GtkWidget *widget, GdkEventKey *event) { - static gpointer grand_parent_class = NULL; NautilusWindow *window; - gboolean handled; int i; window = NAUTILUS_WINDOW (widget); - handled = FALSE; - if (!grand_parent_class) { - grand_parent_class = g_type_class_peek_parent (nautilus_window_parent_class); - } - /* handle currently focused widget */ - if (!handled) { - handled = gtk_window_propagate_key_event (GTK_WINDOW (window), event); - } - - /* handle extra window keybindings */ - if (!handled) { - for (i = 0; i < G_N_ELEMENTS (extra_window_keybindings); i++) { - if (extra_window_keybindings[i].keyval == event->keyval) { - const GList *action_groups; - GtkAction *action; - - action = NULL; - - action_groups = gtk_ui_manager_get_action_groups (window->details->ui_manager); - while (action_groups != NULL && action == NULL) { - action = gtk_action_group_get_action (action_groups->data, - extra_window_keybindings[i].action); - action_groups = action_groups->next; - } - - g_assert (action != NULL); - if (gtk_action_is_sensitive (action)) { - gtk_action_activate (action); - handled = TRUE; - } - - break; + for (i = 0; i < G_N_ELEMENTS (extra_window_keybindings); i++) { + if (extra_window_keybindings[i].keyval == event->keyval) { + const GList *action_groups; + GtkAction *action; + + action = NULL; + + action_groups = gtk_ui_manager_get_action_groups (window->details->ui_manager); + while (action_groups != NULL && action == NULL) { + action = gtk_action_group_get_action (action_groups->data, extra_window_keybindings[i].action); + action_groups = action_groups->next; + } + + g_assert (action != NULL); + if (gtk_action_is_sensitive (action)) { + gtk_action_activate (action); + return TRUE; } + + break; } } - - /* handle mnemonics and accelerators */ - if (!handled) { - handled = gtk_window_activate_key (GTK_WINDOW (window), event); - } - - /* chain up to the grand parent */ - if (!handled) { - handled = GTK_WIDGET_CLASS (grand_parent_class)->key_press_event (widget, event); - } - - return handled; + + return GTK_WIDGET_CLASS (nautilus_window_parent_class)->key_press_event (widget, event); } /* |