summaryrefslogtreecommitdiff
path: root/gtk/gtkiconcache.h
Commit message (Collapse)AuthorAgeFilesLines
* iconcache: Remove unused functionBenjamin Otte2015-10-221-16/+0
|
* GtkIconCache: Add api to find if directories are emptyMatthias Clasen2014-06-201-0/+2
| | | | | This will help in not creating structs for tons of empty directories.
* IconCache: Keep a ref on the GtkIconDataAlexander Larsson2013-06-191-0/+1
| | | | | | | | | | | | The icon data in GttkIconInfo->data is currently owned by the IconThemeDir->icon_data hashtable. However, on e.g. a theme change blow_themes() destroys the dirs and thus the data, meaning any outstanding GtkIconInfo points to stale data. We solve this by adding a refcount to GtkIconData and reffing it from GtkIconInfo. https://bugzilla.gnome.org/show_bug.cgi?id=702598
* Change FSF AddressJavier Jardón2012-02-271-3/+1
|
* Two optimizations for icon cache lookups.Matthias Clasen2007-12-031-5/+5
| | | | | | | | | | | | | | | | | | | 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
* Store builtin stock icons in an icon cache, instead of populating a hashMatthias Clasen2005-11-041-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Update spec.Anders Carlsson2005-03-151-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | 2005-03-15 Anders Carlsson <andersca@imendio.com> * docs/iconcache.txt: Update spec. * gtk/gtkiconcache.c: (find_image_offset), (_gtk_icon_cache_get_icon_flags), (_gtk_icon_cache_add_icons), (_gtk_icon_cache_get_icon), (_gtk_icon_cache_get_icon_data): * gtk/gtkiconcache.h: Update to be able to fetch pixbuf data and icon metadata. * gtk/gtkicontheme.c: (theme_lookup_icon), (gtk_icon_info_free), (icon_info_ensure_scale_and_pixbuf): Use new cache functions. * gtk/updateiconcache.c: (foreach_remove_func), (load_icon_data), (maybe_cache_image_data), (scan_directory), (write_pixdata), (get_image_meta_data_size), (get_image_pixel_data_size), (get_image_data_size), (get_single_node_size), (get_bucket_size), (write_bucket), (main): Update to write pixbuf data as well as information from .icon files.
* Implement for cached themes.Matthias Clasen2004-10-211-0/+2
| | | | | | | | | | | | | | | | | | 2004-10-21 Matthias Clasen <mclasen@redhat.com> * gtk/gtkicontheme.c (gtk_icon_theme_has_icon): Implement for cached themes. * gtk/gtkiconcache.h: * gtk/gtkiconcache.c (_gtk_icon_cache_has_icon): New function. * gtk/updateiconcache.c (scan_directory): Don't skip .icon files which are listed before their images. (foreach_remove_func): Instead filter lonely .icon files out here. * gtk/gtkicontheme.c (theme_dir_get_icon_suffix): Filter out the HAS_ICON_FILE flag.
* Implement icon theme caching. (#154034, Martijn Vernooij, caching schemaMatthias Clasen2004-10-191-0/+41
2004-10-19 Matthias Clasen <mclasen@redhat.com> Implement icon theme caching. (#154034, Martijn Vernooij, caching schema proposed by Owen Taylor, initial implementation by Anders Carlsson) * gtk/gtkdebug.h: * gtk/gtkmain.c: Add a "icontheme" debug flag. * gtk/Makefile.am (gtk_c_sources): Add gtkiconcache.c (gtk_private_h_sources): Add gtkiconcache.h (bin_PROGRAMS): Add gtk-update-icon-cache * gtk/gtkicontheme.c: Use icon caches if they are available. Currently, GTK+ uses the cache to get information about the available sizes, image file formats and .icon files. The actual image data, and the .icon file contents are not cached yet. * gtk/updateiconcache.c: A cmdline utility for generating icon cache files. * gtk/gtkiconcache.h: * gtk/gtkiconcache.c: The glue code to mmap an icon cache file and manage the information it contains.