diff options
author | Matthias Clasen <mclasen@redhat.com> | 2022-08-25 09:23:42 -0400 |
---|---|---|
committer | Felipe Borges <felipeborges@gnome.org> | 2022-09-16 11:49:31 +0200 |
commit | ae9f9df1027823c4890a74192b22b25ef20fed7a (patch) | |
tree | 7d5190d779e7e80a806bd79609aa974f3b5162cb | |
parent | 8052e1bc89927164a3f604e1f695b0750048462b (diff) | |
download | gnome-control-center-ae9f9df1027823c4890a74192b22b25ef20fed7a.tar.gz |
background: Allow all images
The code was filtering with a small list of known
image mimetypes, needlessly. Just allow any
image/* mimetypes.
Fixes: #2036
-rw-r--r-- | panels/background/bg-recent-source.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/panels/background/bg-recent-source.c b/panels/background/bg-recent-source.c index 11773279e..32d18547f 100644 --- a/panels/background/bg-recent-source.c +++ b/panels/background/bg-recent-source.c @@ -41,17 +41,6 @@ struct _BgRecentSource G_DEFINE_TYPE (BgRecentSource, bg_recent_source, BG_TYPE_SOURCE) - -static const gchar * const content_types[] = { - "image/png", - "image/jp2", - "image/jpeg", - "image/bmp", - "image/svg+xml", - "image/x-portable-anymap", - NULL -}; - static int sort_func (gconstpointer a, gconstpointer b, @@ -89,7 +78,7 @@ add_file_from_info (BgRecentSource *self, content_type = g_file_info_get_content_type (info); mtime = g_file_info_get_attribute_uint64 (info, G_FILE_ATTRIBUTE_TIME_MODIFIED); - if (!content_type || !g_strv_contains (content_types, content_type)) + if (!content_type || !g_content_type_is_a (content_type, "image/*")) return; uri = g_file_get_uri (file); |