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.
This commit is contained in:
Matthias Clasen 2004-11-02 02:07:30 +00:00 committed by Matthias Clasen
parent 1665ba69de
commit 547b85d8b8
5 changed files with 35 additions and 23 deletions

View File

@ -1,5 +1,8 @@
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

View File

@ -1,5 +1,8 @@
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

View File

@ -1,5 +1,8 @@
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

View File

@ -1,5 +1,8 @@
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

View File

@ -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++)
{
GtkIconCache *cache;
gchar *theme_path;
full_dir = g_build_filename (icon_theme->priv->search_path[base],
theme->name,
subdir,
NULL);
for (d = icon_theme->priv->dir_mtimes; d; d = d->next)
{
dir_mtime = (IconThemeDirMtime *)d->data;
if (dir_mtime->mtime == 0)
continue; /* directory doesn't exist */
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);