diff options
author | Georges Basile Stavracas Neto <georges.stavracas@gmail.com> | 2022-10-09 18:50:23 -0300 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2022-10-20 22:34:40 -0400 |
commit | 4e3fbd0b0fedc225c6b3e7dca56f0a336bbe84f7 (patch) | |
tree | 68b9e0acde15c021865be3674deff7e90c953584 /gtk/gtkfilechooserentry.c | |
parent | 8a24fdea3805b6e7203915fb32371bb74457898b (diff) | |
download | gtk+-4e3fbd0b0fedc225c6b3e7dca56f0a336bbe84f7.tar.gz |
filesystemmodel: Always set standard::file attribute
This will help us greatly when porting GtkFileSystemModel to
GtkDirectoryList.
Diffstat (limited to 'gtk/gtkfilechooserentry.c')
-rw-r--r-- | gtk/gtkfilechooserentry.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gtk/gtkfilechooserentry.c b/gtk/gtkfilechooserentry.c index 84916500be..5621e7b625 100644 --- a/gtk/gtkfilechooserentry.c +++ b/gtk/gtkfilechooserentry.c @@ -197,7 +197,6 @@ match_func (GtkEntryCompletion *compl, * current file filter (e.g. just jpg files) here. */ if (chooser_entry->current_filter != NULL) { - GFile *file; GFileInfo *info; file = _gtk_file_system_model_get_file (GTK_FILE_SYSTEM_MODEL (chooser_entry->completion_store), @@ -209,8 +208,7 @@ match_func (GtkEntryCompletion *compl, if (g_file_info_get_file_type (info) != G_FILE_TYPE_REGULAR) return TRUE; - if (!g_file_info_has_attribute (info, "standard::file")) - g_file_info_set_attribute_object (info, "standard::file", G_OBJECT (file)); + g_assert (g_file_info_has_attribute (info, "standard::file")); return gtk_filter_match (GTK_FILTER (chooser_entry->current_filter), info); } |