[gnome-builder] libide-io: Make sure we never use our overridden icons for folders
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] libide-io: Make sure we never use our overridden icons for folders
- Date: Mon, 2 Aug 2021 20:48:20 +0000 (UTC)
commit 84f8c00fa17a959a1cb3f76f7431c5d937468b6b
Author: vanadiae <vanadiae35 gmail com>
Date: Sun Aug 1 19:46:26 2021 +0200
libide-io: Make sure we never use our overridden icons for folders
src/libide/io/ide-content-type.c | 10 ++++++++++
1 file changed, 10 insertions(+)
---
diff --git a/src/libide/io/ide-content-type.c b/src/libide/io/ide-content-type.c
index a3ed67220..0c024c7f0 100644
--- a/src/libide/io/ide-content-type.c
+++ b/src/libide/io/ide-content-type.c
@@ -134,6 +134,16 @@ ide_g_content_type_get_symbolic_icon (const gchar *content_type,
icon = g_content_type_get_symbolic_icon (content_type);
+ /* Special case folders to never even try to use an overridden icon. For
+ * example in the case of the LICENSES folder required by the REUSE licensing
+ * helpers, the icon would be the copyright icon. Even if in this particular
+ * case it might make sense to keep the copyright icon, it's just really
+ * confusing to have a folder without a folder icon, especially since it becomes
+ * an expanded folder icon when opening it in the project tree.
+ */
+ if (g_strcmp0 (content_type, "inode/directory") == 0)
+ return g_steal_pointer (&icon);
+
if (G_IS_THEMED_ICON (icon))
{
const gchar * const *names;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]