Do not add the Icon Theme if the key 'Hidden' is 'true' in the index.theme

2005-03-02  Shakti Sen  <shprasad@novell.com>

        * gnome-theme-info.c (read_icon_theme): Do not add the Icon Theme if
        the key 'Hidden' is 'true' in the index.theme file.

        Fixes bug #168348
This commit is contained in:
Shakti Sen 2005-05-22 16:13:45 +00:00 committed by Sebastien Bacher
parent 874b8da91d
commit 45b672f60f
2 changed files with 21 additions and 3 deletions

View file

@ -1,3 +1,10 @@
2005-03-02 Shakti Sen <shprasad@novell.com>
* gnome-theme-info.c (read_icon_theme): Do not add the Icon Theme if
the key 'Hidden' is 'true' in the index.theme file.
Fixes bug #168348
2005-05-22 Sebastien Bacher <seb128@debian.org> 2005-05-22 Sebastien Bacher <seb128@debian.org>
* gconf-property-editor.c: (peditor_font_value_changed), * gconf-property-editor.c: (peditor_font_value_changed),

View file

@ -386,6 +386,7 @@ read_icon_theme (GnomeVFSURI *icon_theme_uri)
GnomeDesktopItem *icon_theme_ditem; GnomeDesktopItem *icon_theme_ditem;
char *icon_theme_file; char *icon_theme_file;
const gchar *name; const gchar *name;
const gchar *hidden_theme_icon;
icon_theme_file = gnome_vfs_uri_to_string (icon_theme_uri, GNOME_VFS_URI_HIDE_NONE); icon_theme_file = gnome_vfs_uri_to_string (icon_theme_uri, GNOME_VFS_URI_HIDE_NONE);
icon_theme_ditem = gnome_desktop_item_new_from_uri (icon_theme_file, 0, NULL); icon_theme_ditem = gnome_desktop_item_new_from_uri (icon_theme_file, 0, NULL);
@ -402,10 +403,20 @@ read_icon_theme (GnomeVFSURI *icon_theme_uri)
g_free (icon_theme_file); g_free (icon_theme_file);
return NULL; 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)
{
icon_theme_info = gnome_theme_icon_info_new (); icon_theme_info = gnome_theme_icon_info_new ();
icon_theme_info->name = g_strdup (name); icon_theme_info->name = g_strdup (name);
icon_theme_info->path = icon_theme_file; icon_theme_info->path = icon_theme_file;
}
else
{
gnome_desktop_item_unref (icon_theme_ditem);
return NULL;
}
gnome_desktop_item_unref (icon_theme_ditem); gnome_desktop_item_unref (icon_theme_ditem);