[gtk/gbsneto/filechooser-column-view: 133/161] filechooser: Prevent recursion when activating items
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gbsneto/filechooser-column-view: 133/161] filechooser: Prevent recursion when activating items
- Date: Thu, 20 Oct 2022 19:22:27 +0000 (UTC)
commit 280c8c56679dfed9a72a91695b733b49d7a4c364
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Oct 10 19:25:45 2022 -0400
filechooser: Prevent recursion when activating items
When a list item is activated, we activate the default widget.
Unfortunately, due to some other bug, sometimes the open button
is not made sensitive, and then default.activate falls back
to activating the focus widget (which is the item we are just
coming from). Boom
gtk/gtkfilechooserwidget.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index e3070b08b9..4f3c30d399 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -6298,7 +6298,10 @@ column_view_row_activated_cb (GtkColumnView *column_view,
else if (self->action == GTK_FILE_CHOOSER_ACTION_OPEN ||
self->action == GTK_FILE_CHOOSER_ACTION_SAVE)
{
+ /* prevent recursion */
+ g_signal_handlers_block_by_func (column_view, column_view_row_activated_cb, self);
gtk_widget_activate_default (GTK_WIDGET (self));
+ g_signal_handlers_unblock_by_func (column_view, column_view_row_activated_cb, self);
}
g_clear_object (&info);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]