mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 05:31:07 +00:00
Merge branch 'ebassi/issue-5650' into 'main'
Filter recently used files in the file chooser Closes #5650 See merge request GNOME/gtk!5618
This commit is contained in:
commit
f743b95161
@ -643,6 +643,9 @@ _gtk_file_chooser_extract_recent_folders (GList *infos)
|
||||
|
||||
uri = gtk_recent_info_get_uri (info);
|
||||
|
||||
if (!g_str_has_prefix (uri, "file://"))
|
||||
continue;
|
||||
|
||||
file = g_file_new_for_uri (uri);
|
||||
parent = g_file_get_parent (file);
|
||||
g_object_unref (file);
|
||||
@ -5993,6 +5996,10 @@ recent_start_loading (GtkFileChooserWidget *impl)
|
||||
GtkRecentInfo *info = l->data;
|
||||
GFile *file;
|
||||
|
||||
const char *uri = gtk_recent_info_get_uri (info);
|
||||
if (!g_str_has_prefix (uri, "file://"))
|
||||
continue;
|
||||
|
||||
if (gtk_recent_info_get_private_hint (info) &&
|
||||
!gtk_recent_info_has_application (info, app_name))
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user