[gtk/4854-copy-to-with-manual-location-entry-using-ctrl-l-impossible-on-nightly] filechooserwidget: Accept entered path in SELECT_FOLDER mode
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/4854-copy-to-with-manual-location-entry-using-ctrl-l-impossible-on-nightly] filechooserwidget: Accept entered path in SELECT_FOLDER mode
- Date: Mon, 18 Apr 2022 14:46:55 +0000 (UTC)
commit a5a00eb63d01a8d1d6325ee31250ccbc7fb666b9
Author: António Fernandes <antoniojpfernandes gmail com>
Date: Mon Apr 18 14:46:54 2022 +0000
filechooserwidget: Accept entered path in SELECT_FOLDER mode
In GTK 3 there was a bug causing the location entry to be cleared when changed, as
explained in the commit message of c99935a54076ab4fcc2349530f21b6315db9f87e
But not reacting at all to changes in the entry, means that the default action button
in GtkFileChooserDialog doesn't become sensitive when a valid folder path is entered.
This can be resolved by removing the condition introduced by the commit mentioned
earlier, and doing so doesn't reintroduce the bug that the condition used to avoid.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4854
gtk/gtkfilechooserwidget.c | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)
---
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index b365204d88..517f34441e 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -2225,17 +2225,14 @@ location_entry_changed_cb (GtkEditable *editable,
switch_to_home_dir (impl);
}
- if (impl->action != GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
- {
- /* Reset location timeout */
- if (impl->location_changed_id > 0)
- g_source_remove (impl->location_changed_id);
-
- impl->location_changed_id = g_timeout_add (LOCATION_CHANGED_TIMEOUT,
- location_changed_timeout_cb,
- impl);
- gdk_source_set_static_name_by_id (impl->location_changed_id, "[gtk] location_changed_timeout_cb");
- }
+ /* Reset location timeout */
+ if (impl->location_changed_id > 0)
+ g_source_remove (impl->location_changed_id);
+
+ impl->location_changed_id = g_timeout_add (LOCATION_CHANGED_TIMEOUT,
+ location_changed_timeout_cb,
+ impl);
+ gdk_source_set_static_name_by_id (impl->location_changed_id, "[gtk] location_changed_timeout_cb");
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]