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.
2005-12-12 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkicontheme.c (ensure_valid_themes): Only broadcast
_GTK_LOAD_ICONTHEMES if we detect a real theme change, not
upon initial theme load. (#323876, Peter Lund)
2005-11-12 Matthias Clasen <mclasen@redhat.com>
Make builtin icons work in gtk_window_set_icon_name()
(#321046, Maxim Udushlivy)
* gtk/gtkicontheme.c (insert_theme): Always insert the default
theme.
(ensure_valid_themes): Call _gtk_icon_theme_ensure_builtin_cache()
from here.
(theme_lookup_icon, find_builtin_icon): ...and not from here.
(gtk_icon_theme_lookup_icon): Remove an unncessary assert.
(gtk_icon_theme_get_icon_sizes): Also check builtin icons.
2005-11-04 Matthias Clasen <mclasen@redhat.com>
Store builtin stock icons in an icon cache, instead of
populating a hash table with pixbufs at startup, to save both
memory and startup time.
* gtk/stock-icons/*: Reorganize the icons in a directory structure
suitable for gtk-update-icon-cache, and rename them to match the
stock ids.
* gtk/gtkiconcache.[hc]: Support non-mmapped icon caches, and
add _gtk_icon_cache_has_icon_in_directory().
* gtk/updateiconcache.c: Support a --source <VARIABLE> argument
to store the contents of the icon cache in a C header.
* gtk/gtkbuiltincache.h: Generated private header which contains
the icon cache for the builtin icons.
* gtk/gtkicontheme.c: Create a GtkIconCache for the builtin
icons, and use that in addition to the hash table whenever
builtin icons are searched.
* gtk/gtkiconfactory.c: Add GTK_ICON_SOURCE_STATIC_ICON_NAME and
use it for static stock ids.
(get_default_icons): Don't add the builtin
icons to the icon theme, just register the stock ids.
(render_fallback_image): Take the fallback image out of the
builtin icon cache.
* gtk/Makefile.am: Remove stock-icons from SUBDIRS and add
the necessary machinery to rebuild gtkbuiltincache.h.
2005-09-01 Matthias Clasen <mclasen@redhat.com>
* gdk/*.c: Intern some more strings.
* gtk/gtkintl.h:
* gtk/*.c: Define an I_() macro and use it instead of the
bulky g_intern_static_string().