Look up icon themes in the directories specified in the icon theme spec:

2004-08-17  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkicontheme.c (gtk_icon_theme_init): Look up icon themes in the
	directories specified in the icon theme spec: $HOME/.icons,
	$XDG_DATA_DIRS/icons, /usr/share/pixmaps. Note that GTK+ used to also look
	in $GTK_DATA_DIR/icons, $GTK_DATA_DIR/pixmaps and /usr/share/icons.  (#148694)
This commit is contained in:
Matthias Clasen 2004-08-17 19:51:11 +00:00 committed by Matthias Clasen
parent eacbe5e136
commit 11396cb71f
5 changed files with 42 additions and 11 deletions

View File

@ -1,5 +1,11 @@
2004-08-17 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkicontheme.c (gtk_icon_theme_init): Look up icon themes in the
directories specified in the icon theme spec: $HOME/.icons,
$XDG_DATA_DIRS/icons, /usr/share/pixmaps. Note that GTK+ used to also look
in $GTK_DATA_DIR/icons, $GTK_DATA_DIR/pixmaps and /usr/share/icons. (#148694)
* gtk/gtkframe.c (gtk_frame_paint): Take widget->state into account when
painting the shadows. (#150351, Tim Janik)

View File

@ -1,5 +1,11 @@
2004-08-17 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkicontheme.c (gtk_icon_theme_init): Look up icon themes in the
directories specified in the icon theme spec: $HOME/.icons,
$XDG_DATA_DIRS/icons, /usr/share/pixmaps. Note that GTK+ used to also look
in $GTK_DATA_DIR/icons, $GTK_DATA_DIR/pixmaps and /usr/share/icons. (#148694)
* gtk/gtkframe.c (gtk_frame_paint): Take widget->state into account when
painting the shadows. (#150351, Tim Janik)

View File

@ -1,5 +1,11 @@
2004-08-17 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkicontheme.c (gtk_icon_theme_init): Look up icon themes in the
directories specified in the icon theme spec: $HOME/.icons,
$XDG_DATA_DIRS/icons, /usr/share/pixmaps. Note that GTK+ used to also look
in $GTK_DATA_DIR/icons, $GTK_DATA_DIR/pixmaps and /usr/share/icons. (#148694)
* gtk/gtkframe.c (gtk_frame_paint): Take widget->state into account when
painting the shadows. (#150351, Tim Janik)

View File

@ -1,5 +1,11 @@
2004-08-17 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkicontheme.c (gtk_icon_theme_init): Look up icon themes in the
directories specified in the icon theme spec: $HOME/.icons,
$XDG_DATA_DIRS/icons, /usr/share/pixmaps. Note that GTK+ used to also look
in $GTK_DATA_DIR/icons, $GTK_DATA_DIR/pixmaps and /usr/share/icons. (#148694)
* gtk/gtkframe.c (gtk_frame_paint): Take widget->state into account when
painting the shadows. (#150351, Tim Janik)

View File

@ -524,24 +524,31 @@ static void
gtk_icon_theme_init (GtkIconTheme *icon_theme)
{
GtkIconThemePrivate *priv;
gchar **xdg_data_dirs;
int i, j;
priv = g_type_instance_get_private ((GTypeInstance *)icon_theme,
GTK_TYPE_ICON_THEME);
icon_theme->priv = priv;
priv->custom_theme = FALSE;
priv->current_theme = g_strdup (DEFAULT_THEME_NAME);
priv->search_path = g_new (char *, 5);
priv->search_path[0] = g_build_filename (g_get_home_dir (),
".icons",
NULL);
priv->search_path[1] = g_build_filename (GTK_DATADIR, "pixmaps", NULL);
priv->search_path[2] = g_build_filename (GTK_DATADIR, "icons", NULL);
priv->search_path[3] = g_strdup ("/usr/share/icons");
priv->search_path[4] = g_strdup ("/usr/share/pixmaps");
priv->search_path_len = 5;
xdg_data_dirs = g_get_system_data_dirs ();
for (i = 0; xdg_data_dirs[i]; i++) ;
priv->search_path_len = i + 3;
priv->search_path = g_new (char *, priv->search_path_len);
i = 0;
priv->search_path[i++] = g_build_filename (g_get_home_dir (), ".icons", NULL);
priv->search_path[i++] = g_build_filename (g_get_user_data_dir (), "icons", NULL);
for (j = 0; xdg_data_dirs[j]; j++)
priv->search_path[i++] = g_build_filename (xdg_data_dirs[j], "icons", NULL);
priv->search_path[i++] = g_strdup ("/usr/share/pixmaps");
priv->themes_valid = FALSE;
priv->themes = NULL;