[gtk] filechoosernative: forward current_filter to delegate dialog



commit a0f750f7c938198a883e6ec0ee09a5fa81636f7a
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Thu Nov 29 15:34:17 2018 -0600

    filechoosernative: forward current_filter to delegate dialog
    
    gtk_file_chooser_set_filter() doesn't work for GtkFileChooserNative. The
    code forwards added and removed filters to the delegate dialog, but
    doesn't do anything to set the selected one, so the wrong one gets
    chosen. So fix that.
    
    This only fixes the fallback dialog. The portal will be fixed in a
    subsequent commit.
    
    Partial fix for #1492

 gtk/gtkfilechoosernative.c | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/gtk/gtkfilechoosernative.c b/gtk/gtkfilechoosernative.c
index 0d4d6a2911..b6c65b449b 100644
--- a/gtk/gtkfilechoosernative.c
+++ b/gtk/gtkfilechoosernative.c
@@ -458,6 +458,7 @@ gtk_file_chooser_native_set_property (GObject      *object,
 
     case GTK_FILE_CHOOSER_PROP_FILTER:
       self->current_filter = g_value_get_object (value);
+      gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (self->dialog), self->current_filter);
       g_object_notify (G_OBJECT (self), "filter");
       break;
 


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