mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 05:50:10 +00:00
Store GtkIconData structs in the per-directory hash, even if they come
2005-08-19 Matthias Clasen <mclasen@redhat.com> * gtk/gtkicontheme.c (theme_lookup_icon): Store GtkIconData structs in the per-directory hash, even if they come from the icon cache. We tried to avoid that before, but as a result leaked icon data structs. (#313852, Kjartan Maraas)
This commit is contained in:
parent
af7a0fa154
commit
d1ab2bf3d5
@ -1,3 +1,10 @@
|
||||
2005-08-19 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkicontheme.c (theme_lookup_icon): Store GtkIconData structs
|
||||
in the per-directory hash, even if they come from the icon cache.
|
||||
We tried to avoid that before, but as a result leaked icon data
|
||||
structs. (#313852, Kjartan Maraas)
|
||||
|
||||
2005-08-18 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkmenutoolbutton.c (gtk_menu_tool_button_destroy): Disconnect
|
||||
|
@ -1,3 +1,10 @@
|
||||
2005-08-19 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkicontheme.c (theme_lookup_icon): Store GtkIconData structs
|
||||
in the per-directory hash, even if they come from the icon cache.
|
||||
We tried to avoid that before, but as a result leaked icon data
|
||||
structs. (#313852, Kjartan Maraas)
|
||||
|
||||
2005-08-18 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkmenutoolbutton.c (gtk_menu_tool_button_destroy): Disconnect
|
||||
|
@ -1,3 +1,10 @@
|
||||
2005-08-19 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkicontheme.c (theme_lookup_icon): Store GtkIconData structs
|
||||
in the per-directory hash, even if they come from the icon cache.
|
||||
We tried to avoid that before, but as a result leaked icon data
|
||||
structs. (#313852, Kjartan Maraas)
|
||||
|
||||
2005-08-18 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkmenutoolbutton.c (gtk_menu_tool_button_destroy): Disconnect
|
||||
|
@ -1880,11 +1880,21 @@ theme_lookup_icon (IconTheme *theme,
|
||||
|
||||
if (min_dir->icon_data != NULL)
|
||||
icon_info->data = g_hash_table_lookup (min_dir->icon_data, icon_name);
|
||||
else if (min_dir->cache != NULL)
|
||||
icon_info->data = _gtk_icon_cache_get_icon_data (min_dir->cache, icon_name, min_dir->subdir);
|
||||
|
||||
if (icon_info->data == NULL &&
|
||||
min_dir->cache && has_icon_file)
|
||||
if (icon_info->data == NULL && min_dir->cache != NULL)
|
||||
{
|
||||
icon_info->data = _gtk_icon_cache_get_icon_data (min_dir->cache, icon_name, min_dir->subdir);
|
||||
if (icon_info->data)
|
||||
{
|
||||
if (min_dir->icon_data == NULL)
|
||||
min_dir->icon_data = g_hash_table_new_full (g_str_hash, g_str_equal,
|
||||
g_free, (GDestroyNotify)icon_data_free);
|
||||
|
||||
g_hash_table_replace (min_dir->icon_data, g_strdup (icon_name), icon_info->data);
|
||||
}
|
||||
}
|
||||
|
||||
if (icon_info->data == NULL && has_icon_file)
|
||||
{
|
||||
gchar *icon_file_name, *icon_file_path;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user