From b608a53acb4664df88181a105af1b8ac01a65023 Mon Sep 17 00:00:00 2001 From: Denis Washington Date: Sat, 28 Jul 2007 13:05:59 +0000 Subject: [PATCH] Prevent cursor themes from being recognized as icon themes. 2007-07-28 Denis Washington * gnome-theme-info.c: (read_icon_theme): Prevent cursor themes from being recognized as icon themes. svn path=/trunk/; revision=7913 --- capplets/common/ChangeLog | 5 +++++ capplets/common/gnome-theme-info.c | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/capplets/common/ChangeLog b/capplets/common/ChangeLog index a44ac6d32..5a6e17eb5 100644 --- a/capplets/common/ChangeLog +++ b/capplets/common/ChangeLog @@ -1,3 +1,8 @@ +2007-07-28 Denis Washington + + * gnome-theme-info.c: (read_icon_theme): + Prevent cursor themes from being recognized as icon themes. + 2007-07-28 Thomas Wood * gnome-theme-info.h: Add missing include diff --git a/capplets/common/gnome-theme-info.c b/capplets/common/gnome-theme-info.c index 2c10d743f..d372f6126 100644 --- a/capplets/common/gnome-theme-info.c +++ b/capplets/common/gnome-theme-info.c @@ -343,6 +343,7 @@ read_icon_theme (GnomeVFSURI *icon_theme_uri) GnomeDesktopItem *icon_theme_ditem; gchar *icon_theme_file; const gchar *name; + const gchar *directories; const gchar *hidden_theme_icon; icon_theme_file = gnome_vfs_uri_to_string (icon_theme_uri, GNOME_VFS_URI_HIDE_NONE); @@ -361,6 +362,15 @@ read_icon_theme (GnomeVFSURI *icon_theme_uri) return NULL; } + /* If index.theme has no Directories entry, it is only a cursor theme */ + directories = gnome_desktop_item_get_string (icon_theme_ditem, "Icon Theme/Directories"); + if (directories == NULL) + { + gnome_desktop_item_unref (icon_theme_ditem); + g_free (icon_theme_file); + return NULL; + } + hidden_theme_icon = gnome_desktop_item_get_string (icon_theme_ditem, "Icon Theme/Hidden"); if (hidden_theme_icon == NULL || strcmp (hidden_theme_icon, "false") == 0)