diff options
author | Benjamin Otte <otte@redhat.com> | 2022-10-17 20:33:15 +0200 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2022-12-24 07:56:57 -0500 |
commit | 8a7f739f9fec4e82948ff405df70503f182cf5c0 (patch) | |
tree | 2117c4b3891f812d8fdd9d820049721ff4637f21 | |
parent | fce4810fb4a3a2628bfe610076f4eb7d2eac6c5d (diff) | |
download | gtk+-8a7f739f9fec4e82948ff405df70503f182cf5c0.tar.gz |
directorylist: Always add standard::name
glib can't figure out how to do that, so we need to do that ourselves.
-rw-r--r-- | gtk/gtkdirectorylist.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gtk/gtkdirectorylist.c b/gtk/gtkdirectorylist.c index 61d6876cf9..c0ef084a2b 100644 --- a/gtk/gtkdirectorylist.c +++ b/gtk/gtkdirectorylist.c @@ -544,6 +544,7 @@ static void gtk_directory_list_start_loading (GtkDirectoryList *self) { gboolean was_loading; + char *glib_apis_suck; was_loading = gtk_directory_list_stop_loading (self); gtk_directory_list_clear_items (self); @@ -555,14 +556,16 @@ gtk_directory_list_start_loading (GtkDirectoryList *self) return; } + glib_apis_suck = g_strconcat ("standard::name,", self->attributes, NULL); self->cancellable = g_cancellable_new (); g_file_enumerate_children_async (self->file, - self->attributes, + glib_apis_suck, G_FILE_QUERY_INFO_NONE, self->io_priority, self->cancellable, gtk_directory_list_got_enumerator_cb, self); + g_free (glib_apis_suck); if (!was_loading) g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_LOADING]); @@ -861,8 +864,8 @@ gtk_directory_list_get_file (GtkDirectoryList *self) * * Sets the @attributes to be enumerated and starts the enumeration. * - * If @attributes is %NULL, no attributes will be queried, but a list - * of `GFileInfo`s will still be created. + * If @attributes is %NULL, the list of file infos will still be created, it will just + * not contain any extra attributes. */ void gtk_directory_list_set_attributes (GtkDirectoryList *self, |