summaryrefslogtreecommitdiff
path: root/gtk/gtkfilechooserwidget.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-07-06 10:34:33 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-07-06 11:03:48 -0400
commitea07a9236633ef055e66c742b115b546bcf30d68 (patch)
tree4a0ae4d34529ba69767b67fb5728b1f3dbc24b65 /gtk/gtkfilechooserwidget.c
parent76290e8ddb7001165e9f245730346de84e773058 (diff)
downloadgtk+-ea07a9236633ef055e66c742b115b546bcf30d68.tar.gz
filechooser: Add a readonly :filters property
This makes the filters list accessible in the the inspector.
Diffstat (limited to 'gtk/gtkfilechooserwidget.c')
-rw-r--r--gtk/gtkfilechooserwidget.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index 1c2d2619ed..48991021a8 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -3072,6 +3072,10 @@ gtk_file_chooser_widget_get_property (GObject *object,
g_value_set_boolean (value, impl->create_folders);
break;
+ case GTK_FILE_CHOOSER_PROP_FILTERS:
+ g_value_set_object (value, impl->filters);
+ break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -5564,6 +5568,8 @@ gtk_file_chooser_widget_add_filter (GtkFileChooser *chooser,
set_current_filter (impl, filter);
show_filters (impl, TRUE);
+
+ g_object_notify (G_OBJECT (chooser), "filters");
}
static void
@@ -5597,6 +5603,8 @@ gtk_file_chooser_widget_remove_filter (GtkFileChooser *chooser,
if (!impl->filters)
show_filters (impl, FALSE);
+
+ g_object_notify (G_OBJECT (chooser), "filters");
}
static GListModel *