2009-01-22 Michael Natterer <mitch@imendio.com>
* gtk/gtkicontheme.c (gtk_icon_theme_has_icon): g_return_if_fail()
on icon_name != NULL so we get a warning instead of a crash here.
svn path=/trunk/; revision=22174
2008-10-20 Christian Persch <chpe@gnome.org>
Bug 557059 – crash when compositing emblems with icon
* gtk/gtkicontheme.c: (apply_emblems): Copy the pixbuf before using it
with gtk_pixbuf_composite, in case its pixdata is read-only (mmaped
from icon cache or builtins).
svn path=/trunk/; revision=21690
2008-08-07 Michael Natterer <mitch@imendio.com>
* gtk/gtkicontheme.c (apply_emblems): move variables to local
scopes, fix indentation and silence bogus warning about using
uninitialized variables.
svn path=/trunk/; revision=21031
2008-06-16 Tor Lillqvist <tml@novell.com>
Bug 538362 - Get Win32 icons back in the file chooser
* gtk/gtkicontheme.c (choose_icon): Check if the icon name is a
reference to an icon resource in a DLL or .EXE as in the
Registry. In that case, extract the icon and convert to a
GdkPixbuf. Patch by Hans Breuer.
svn path=/trunk/; revision=20398
2008-05-27 Matthias Clasen <mclasen@redhat.com>
Bug 522084 – GIcon support for GtkIconTheme & GtkImage
* gtk/gtkicontheme.[hc]: Add support for GIcon based lookups.
* gtk/gtkimage.[hc]: Allow setting an image from a GIcon.
* gtk/gtk.symbols: Additions
* tests/testimage.c: Add a GIcon test
svn path=/trunk/; revision=20236
2007-12-03 Matthias Clasen <mclasen@redhat.com>
Two optimizations for icon cache lookups.
* gtk/gtkiconcache.[hc]:
* gtk/gtkicontheme.c: Remember the directory index for
subdirectories, instead of running over the directory list
again and again.
* gtk/gtkiconcache.c (find_image_offset): Remember the last
chain and try it first; this helps with the the usage patterns
in gtkicontheme.c, where the same icon is queried for a lot
of subdirectories.
svn path=/trunk/; revision=19099
* gtk/gtkicontheme.c (choose_icon): Initialize unthemed_icon to NULL
to avoid accessing uninitialized memory when
gtk_icon_theme_choose_icon() is called with an empty names list.
svn path=/trunk/; revision=18018
2007-05-18 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk.symbols:
* gtk/gtkicontheme.h:
* gtk/gtkicontheme.c: Add a function to look up an icon from
a list of icon names. (#396901, Luca Ferretti)
svn path=/trunk/; revision=17868
2007-04-25 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkicontheme.c (theme_lookup_icon): Set the filename to
NULL for builtin icons, sinc gtk_icon_info_get_builtin_pixbuf()
depends on it.
* tests/testicontheme.c: Report builtin icons.
svn path=/trunk/; revision=17638
2007-04-24 Chris Wilson <chris@chris-wilson.co.uk>
* gtk/gtkicontheme.c (scan_directory): Ensure the
icon_theme->all_icons and dir->icons hash tables use the same string
as their keys. (#418531)
svn path=/trunk/; revision=17626
2007-03-21 Rodney Dawes <dobey@novell.com>
* gtk/gtk.symbols:
* gtk/gtkicontheme.[ch]:
* docs/reference/gtk/gtk-sections.txt:
* tests/testicontheme.c:
Add a new API call gtk_icon_theme_list_contexts so that one can
choose icons from a theme by context (#420719)
svn path=/trunk/; revision=17550
2007-03-15 Chris Wilson <chris@chris-wilson.co.uk>
* gtk/gtkicontheme.c (ensure_valid_themes), (rescan_themes),
(gtk_icon_theme_rescan_if_needed): Protect ensure_valid_themes()
from recursion, which can happen for example if the app tries to
reload an icon from within a theme-changed handler. (#418531)
svn path=/trunk/; revision=17523
2007-03-06 Chris Wilson <chris@chris-wilson.co.uk>
* gtk/gtkicontheme.c (update_current_theme), (gtk_icon_theme_init),
(do_theme_change), (gtk_icon_theme_set_custom_theme),
(load_themes):
Be careful not to trigger a style reset before we have loaded
the icon theme. (#414875).
svn path=/trunk/; revision=17404
2007-02-26 Chris Wilson <chris@chris-wilson.co.uk>
Bug 409101 – invalid read to gtkicontheme.c insert_theme(), might cause gnome-panel crash
* gtk/gtkicontheme.c: (scan_directory):
Reorder the replacement of the shared base_name key, so that we
avoid dereferencing the string in the icon_theme->all_icon
hash table after freeing it from the dir->icons hash table.
svn path=/trunk/; revision=17353
2007-01-01 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkicontheme.c (load_themes): Waste less time
with non-directories. (#391725, Chris Wilson)
svn path=/trunk/; revision=17005
2006-08-15 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkicontheme.c (do_theme_change): Run the reset_styles
idle at a priority higher than size negotiation. (#350517,
Søren Sandmann)
2006-07-20 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkicontheme.h:
* gtk/gtkicontheme.c (_gtk_icon_theme_ensure_builtin_cache):
Export this privately.
* gtk/gtkiconfactory.c (render_fallback_image): And call it
here to initialize the builtin cache before using it. (#348063,
Diego Pettenò)
2006-04-18 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkiconcache.c: Apply a patch by Paolo Borelli to factor
out a strip_suffix() function and save some memory. (#338307)
2006-04-03 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkrecentchooser.c (gtk_recent_chooser_error_quark):
* gtk/gtkrecentmanager.c (gtk_recent_manager_error_quark):
* gtk/gtkfilechooser.c (gtk_file_chooser_error_quark):
* gtk/gtkfilesystem.c (gtk_file_system_error_quark):
* gtk/gtkicontheme.c (gtk_icon_theme_error_quark): No point
in making the error path fast by caching quarks.
2006-03-31 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkicontheme.c (load_icon_data): Don't leak the keyfile
parser in the error case.
* gtk/gtkicontheme.c (load_icon_data, free_unthemed_icon)
(icon_data_free, load_themes):
* gtk/gtkiconcache.c (_gtk_icon_cache_get_icon_data): Use the slice
allocator for GtkIconData and UnthemedIcon structs.
2006-02-12 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkicontheme.c (gtk_icon_theme_list_icons): Give working
examples in the docs. (#330944, John Spray)
2006-01-11 Matthias Clasen <mclasen@redhat.com>
Allow falling back to another icon theme before
hicolor. (#325546, Rodney Dawes)
* gtk/gtksettings.c: Add a gtk-fallback-icon-theme setting.
* gdk/x11/gdkevents-x11.c: Map it to the XSetting Net/FallbackIconTheme.
* gtk/gtkicontheme.c: Consult the fallback icon theme before
looking in hicolor.