[gtk/gtk-3-24: 1/2] Fix for issue #2497, see https://gitlab.gnome.org/GNOME/gtk/issues/2497



commit 2c85be990dfde874ea16fd5a875e8ecfdfbc2400
Author: Eivind Naess <eivnaes yahoo com>
Date:   Sun Mar 8 18:54:10 2020 -0700

    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.

 gtk/gtkfilechooserbutton.c | 3 +--
 1 file changed, 1 insertion(+), 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);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]