Commit 547b85d8 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Actually commit the "stat less" patch which appeared in the ChangeLog a

2004-11-01  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkicontheme.c: Actually commit the "stat less" patch
	which appeared in the ChangeLog a few days ago.
parent 1665ba69
2004-11-01 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkicontheme.c: Actually commit the "stat less" patch
which appeared in the ChangeLog a few days ago.
* gtk/gtkfilechooserbutton.c: Move some docs inline.
* gtk/gtkaboutdialog.c (gtk_show_about_dialog): Doc update.
......@@ -17,7 +20,8 @@
* gtk/gtkcombobox.c (gtk_combo_box_button_state_changed): Update the
state of the cell view when the state of the button changes (to
get prelighted drawing right). (#138650, Frances Keenan, Christian Persch)
get prelighted drawing right). (#138650, Frances Keenan,
Christian Persch)
* gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup):
Don't force the height of the action area, we don't scroll
......
2004-11-01 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkicontheme.c: Actually commit the "stat less" patch
which appeared in the ChangeLog a few days ago.
* gtk/gtkfilechooserbutton.c: Move some docs inline.
* gtk/gtkaboutdialog.c (gtk_show_about_dialog): Doc update.
......@@ -17,7 +20,8 @@
* gtk/gtkcombobox.c (gtk_combo_box_button_state_changed): Update the
state of the cell view when the state of the button changes (to
get prelighted drawing right). (#138650, Frances Keenan, Christian Persch)
get prelighted drawing right). (#138650, Frances Keenan,
Christian Persch)
* gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup):
Don't force the height of the action area, we don't scroll
......
2004-11-01 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkicontheme.c: Actually commit the "stat less" patch
which appeared in the ChangeLog a few days ago.
* gtk/gtkfilechooserbutton.c: Move some docs inline.
* gtk/gtkaboutdialog.c (gtk_show_about_dialog): Doc update.
......@@ -17,7 +20,8 @@
* gtk/gtkcombobox.c (gtk_combo_box_button_state_changed): Update the
state of the cell view when the state of the button changes (to
get prelighted drawing right). (#138650, Frances Keenan, Christian Persch)
get prelighted drawing right). (#138650, Frances Keenan,
Christian Persch)
* gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup):
Don't force the height of the action area, we don't scroll
......
2004-11-01 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkicontheme.c: Actually commit the "stat less" patch
which appeared in the ChangeLog a few days ago.
* gtk/gtkfilechooserbutton.c: Move some docs inline.
* gtk/gtkaboutdialog.c (gtk_show_about_dialog): Doc update.
......@@ -17,7 +20,8 @@
* gtk/gtkcombobox.c (gtk_combo_box_button_state_changed): Update the
state of the cell view when the state of the button changes (to
get prelighted drawing right). (#138650, Frances Keenan, Christian Persch)
get prelighted drawing right). (#138650, Frances Keenan,
Christian Persch)
* gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup):
Don't force the height of the action area, we don't scroll
......
......@@ -890,6 +890,7 @@ insert_theme (GtkIconTheme *icon_theme, const char *theme_name)
priv->dir_mtimes = g_list_prepend (priv->dir_mtimes, dir_mtime);
}
priv->dir_mtimes = g_list_reverse (priv->dir_mtimes);
theme_file = NULL;
for (i = 0; i < priv->search_path_len && !theme_file; i++)
......@@ -2082,7 +2083,7 @@ theme_subdir_load (GtkIconTheme *icon_theme,
GKeyFile *theme_file,
char *subdir)
{
int base;
GList *d;
char *type_string;
IconThemeDir *dir;
IconThemeDirType type;
......@@ -2094,6 +2095,8 @@ theme_subdir_load (GtkIconTheme *icon_theme,
int threshold;
char *full_dir;
GError *error = NULL;
GtkIconCache *cache;
IconThemeDirMtime *dir_mtime;
size = g_key_file_get_integer (theme_file, subdir, "Size", &error);
if (error)
......@@ -2152,37 +2155,30 @@ theme_subdir_load (GtkIconTheme *icon_theme,
g_error_free (error);
error = NULL;
}
for (base = 0; base < icon_theme->priv->search_path_len; base++)
for (d = icon_theme->priv->dir_mtimes; d; d = d->next)
{
GtkIconCache *cache;
gchar *theme_path;
dir_mtime = (IconThemeDirMtime *)d->data;
if (dir_mtime->mtime == 0)
continue; /* directory doesn't exist */
full_dir = g_build_filename (icon_theme->priv->search_path[base],
theme->name,
subdir,
NULL);
full_dir = g_build_filename (dir_mtime->dir, subdir, NULL);
/* First, see if we have a cache for the directory */
if (!theme->icon_caches)
theme->icon_caches = g_hash_table_new_full (g_str_hash, g_str_equal,
g_free, (GDestroyNotify)free_cache);
theme_path = g_build_filename (icon_theme->priv->search_path[base],
theme->name,
NULL);
if (!g_hash_table_lookup_extended (theme->icon_caches, theme_path,
if (!g_hash_table_lookup_extended (theme->icon_caches, dir_mtime->dir,
NULL, (gpointer)&cache))
{
/* This will return NULL if the cache doesn't exist or is outdated */
cache = _gtk_icon_cache_new_for_path (theme_path);
cache = _gtk_icon_cache_new_for_path (dir_mtime->dir);
g_hash_table_insert (theme->icon_caches, g_strdup (theme_path), cache);
g_hash_table_insert (theme->icon_caches, g_strdup (dir_mtime->dir), cache);
}
g_free (theme_path);
if (cache != NULL || g_file_test (full_dir, G_FILE_TEST_IS_DIR))
{
dir = g_new (IconThemeDir, 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment