diff options
author | Matthias Clasen <mclasen@redhat.com> | 2023-03-08 18:45:10 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2023-03-08 18:45:10 +0000 |
commit | f743b9516127970367700112ca7f6cd3857dcf87 (patch) | |
tree | 2fc36b11585b414485a4ed453edfe3b4bf006536 | |
parent | bdd35c16952fcb57bcfc53d62f266ecc3899db72 (diff) | |
parent | 8b2202cd5610359f6333b4393b2b4f529edad922 (diff) | |
download | gtk+-f743b9516127970367700112ca7f6cd3857dcf87.tar.gz |
Merge branch 'ebassi/issue-5650' into 'main'
Filter recently used files in the file chooser
Closes #5650
See merge request GNOME/gtk!5618
-rw-r--r-- | gtk/gtkfilechooserwidget.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c index f915587849..baecc10aaa 100644 --- a/gtk/gtkfilechooserwidget.c +++ b/gtk/gtkfilechooserwidget.c @@ -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; |