[gnome-control-center/gnome-42] background: Allow all images
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gnome-42] background: Allow all images
- Date: Fri, 16 Sep 2022 09:49:44 +0000 (UTC)
commit ae9f9df1027823c4890a74192b22b25ef20fed7a
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Aug 25 09:23:42 2022 -0400
background: Allow all images
The code was filtering with a small list of known
image mimetypes, needlessly. Just allow any
image/* mimetypes.
Fixes: #2036
panels/background/bg-recent-source.c | 13 +------------
1 file changed, 1 insertion(+), 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]