diff options
author | Eivind Naess <eivnaes@yahoo.com> | 2020-03-08 18:54:10 -0700 |
---|---|---|
committer | Eivind Naess <eivnaes@yahoo.com> | 2020-03-08 18:54:10 -0700 |
commit | 2c85be990dfde874ea16fd5a875e8ecfdfbc2400 (patch) | |
tree | 081f8ee91e470d68f6708e99fd92cbd1ddc264e1 | |
parent | d1c6766ae122acdfead57b61516e2406f8c67c03 (diff) | |
download | gtk+-2c85be990dfde874ea16fd5a875e8ecfdfbc2400.tar.gz |
Fix for issue #2497, see https://gitlab.gnome.org/GNOME/gtk/issues/2497
The 'selection-changed' signal is emitted unconditionally, even in the case
when there is no selection to be cleared. As a result, the subscriber receives
the initial signal and if he calls gtk_file_chooser_get_uri(), no value is
currently selected.
-rw-r--r-- | gtk/gtkfilechooserbutton.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gtk/gtkfilechooserbutton.c b/gtk/gtkfilechooserbutton.c index 6de8a4ee6d..fa9b945b7f 100644 --- a/gtk/gtkfilechooserbutton.c +++ b/gtk/gtkfilechooserbutton.c @@ -610,10 +610,9 @@ unselect_current_file (GtkFileChooserButton *button) { g_object_unref (priv->selection_while_inactive); priv->selection_while_inactive = NULL; + priv->is_changing_selection = TRUE; } - priv->is_changing_selection = TRUE; - update_label_and_image (button); update_combo_box (button); } |