[gtk/wip/ebassi/shortcut: 84/85] filechooser: Remove outdated hack
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/ebassi/shortcut: 84/85] filechooser: Remove outdated hack
- Date: Fri, 31 Jan 2020 16:06:55 +0000 (UTC)
commit 36c09f390114a1584a0052a4e79e1317d9f63c45
Author: Benjamin Otte <otte redhat com>
Date: Sun Aug 26 18:00:52 2018 +0200
filechooser: Remove outdated hack
In GTK2, the filechooser was using a Paned, so switching between sidebar
and files list with the arrow keys didn't work (the slider would be
selected instead). So in
https://bugzilla.gnome.org/show_bug.cgi?id=161489 a crude hack was added
to make this possible.
Over the years the filechooser code has changed so that it now would do
this by default, yet the hack had been retained.
gtk/gtkfilechooserwidget.c | 21 ---------------------
1 file changed, 21 deletions(-)
---
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index a93640e18c..73c363da93 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -1285,21 +1285,6 @@ places_sidebar_show_error_message_cb (GtkPlacesSidebar *sidebar,
error_message (impl, primary, secondary);
}
-static gboolean
-key_is_left_or_right (guint keyval,
- guint state)
-{
- guint modifiers;
-
- modifiers = gtk_accelerator_get_default_mod_mask ();
-
- return ((keyval == GDK_KEY_Right
- || keyval == GDK_KEY_KP_Right
- || keyval == GDK_KEY_Left
- || keyval == GDK_KEY_KP_Left)
- && (state & modifiers) == 0);
-}
-
static gboolean
should_trigger_location_entry (GtkFileChooserWidget *impl,
guint keyval,
@@ -1361,12 +1346,6 @@ treeview_key_press_cb (GtkEventControllerKey *controller,
return GDK_EVENT_STOP;
}
- if (key_is_left_or_right (keyval, state))
- {
- if (gtk_widget_child_focus (priv->places_sidebar, GTK_DIR_LEFT))
- return GDK_EVENT_STOP;
- }
-
if ((keyval == GDK_KEY_Return
|| keyval == GDK_KEY_ISO_Enter
|| keyval == GDK_KEY_KP_Enter
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]