Properly check all stored themes if necessary. This fixes cases where e.g.

2007-08-21  Jens Granseuer  <jensgr@gmx.net>

	* gnome-theme-info.c: (gnome_theme_info_find_by_type_helper):
	Properly check all stored themes if necessary. This fixes cases where
	e.g. a metacity theme in ~/.themes would hide a GTK theme with the
	same name in the system theme dir

svn path=/trunk/; revision=8032
This commit is contained in:
Jens Granseuer 2007-08-21 21:22:50 +00:00 committed by Jens Granseuer
parent 47d57ac310
commit 777a257df8
2 changed files with 19 additions and 5 deletions

View file

@ -1,3 +1,10 @@
2007-08-21 Jens Granseuer <jensgr@gmx.net>
* gnome-theme-info.c: (gnome_theme_info_find_by_type_helper):
Properly check all stored themes if necessary. This fixes cases where
e.g. a metacity theme in ~/.themes would hide a GTK theme with the
same name in the system theme dir
2007-08-21 Luca Cavalli <loopback@slackit.org> 2007-08-21 Luca Cavalli <loopback@slackit.org>
* file-transfer-dialog.c: (format_uri_for_display), * file-transfer-dialog.c: (format_uri_for_display),

View file

@ -1404,12 +1404,19 @@ gnome_theme_info_find_by_type_helper (gpointer key,
struct GnomeThemeInfoHashData *hash_data) struct GnomeThemeInfoHashData *hash_data)
{ {
guint elements = GPOINTER_TO_INT (hash_data->user_data); guint elements = GPOINTER_TO_INT (hash_data->user_data);
do {
GnomeThemeInfo *theme_info = list->data; GnomeThemeInfo *theme_info = list->data;
if ((elements & GNOME_THEME_METACITY && theme_info->has_metacity) || if ((elements & GNOME_THEME_METACITY && theme_info->has_metacity) ||
(elements & GNOME_THEME_GTK_2 && theme_info->has_gtk) || (elements & GNOME_THEME_GTK_2 && theme_info->has_gtk) ||
(elements & GNOME_THEME_GTK_2_KEYBINDING && theme_info->has_keybinding)) (elements & GNOME_THEME_GTK_2_KEYBINDING && theme_info->has_keybinding)) {
hash_data->list = g_list_prepend (hash_data->list, theme_info); hash_data->list = g_list_prepend (hash_data->list, theme_info);
return;
}
list = list->next;
} while (list);
} }
GList * GList *