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 c99935a540
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
This commit is contained in:
@@ -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);
|
||||
/* 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");
|
||||
}
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user