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().
2005-08-31 Matthias Clasen <mclasen@redhat.com>
* gdk/Makefile.am:
* gtk/Makefile.am: Intern type names in code generated by
glib-mkenums, too.
* gtk/*.c:
* gdk/x11/*.c:
* gdk/*.c: Intern type names before registering the type to avoid
unnecessary copies.
2005-08-26 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkicontheme.c (theme_lookup_icon): Avoid an uninitialized
variable warning, pointed out by Colin Walters. (#314585)
2005-08-24 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkicontheme.c (ensure_valid_themes): Don't try to send a client
message if the screen is NULL. Noticed by Kjartan Maraas.
2005-08-22 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkwindow.c (gtk_window_client_event):
* gtk/gtkicontheme.c (ensure_valid_themes)
(_gtk_icon_theme_check_reload): Implement a clientmessage based
scheme for makeing sure that all GTK+ applications notice if an
icon theme has been updated. This should prevent multiple versions
of an icon theme cache to be mapped in memory at the same time,
which can cause excessive memory consumption. (#313156, Chris
Lahey)
2005-08-22 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkicontheme.c (gtk_icon_theme_load_icon): Add a note
regarding icon theme changes.
* gtk/gtkiconcache.c (_gtk_icon_cache_get_icon): When returning
pixbufs which are backed by the mmapped memory of an icon cache,
increase the refcount of the icon cache, so that the memory is not
munmapped away underneath the pixbuf upon icon theme changes.
(#314170, Kjartan Maraas)
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-12 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkicontheme.c: When changing the icon theme, defer
the resetting of rc styles to an idle, so that it does
not happen e.g during expose handling (which is problematic,
since some widgets, like the toolbar, are changing the
hierarchy in response to style changes). (#300539, reported
by many people, analyzed by Owen Taylor)
2005-07-20 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkicontheme.c (load_svg_at_size): Explicitly use the
svg loader, if available. This should help with the fact that
svg is not reliably sniffable with the current gdk-pixbuf sniffing
code.
2005-07-13 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkicontheme.c (load_themes): Don't keep the caches
for unthemed directories in a separate list, instead append
them at the end of the dir_mtimes list, so that we can check
them for staleness like the other caches. (#310221, Mark
McLoughlin)
* gtk/gtkicontheme.c: Store icon caches along with the
mtimes of the toplevel directories. The previous
mechanism of a hashtable-per-theme caused duplicate icon
caches for the same toplevel directory to be created.
(#170030)
2005-03-20 Matthias Clasen <mclasen@redhat.com>
Make PLT-reduction work with gcc4, and don't include
everything in gdkalias.h:
* gtk/grk.symbols: Group symbols by header and source file.
* gtk/makegtkalias.pl: Protect definitions by the same
preprocessor symbols used to guard the headers. Move
the alias declarations to a separate file which is
produced when calling makegtkalias.pl -def
* gdk/Makefile.am (gtkaliasdef.c): Add a rule to generate
this file.
* gtk/*.c: Include gtkalias.h after the other headers,
include gtkaliasdef.c at the bottom.
* gtk/*.h: Small cleanups.
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.
2005-03-01 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkicontheme.c (theme_lookup_icon): Make
icon data caching work again. (#168851, Alexander Larsson)
2005-02-01 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkicontheme.c (gtk_icon_theme_init): Look for icons
in XDG_DATA_DIRS/pixmaps. (#165950, Thomas Zajic)
2005-01-03 Matthias Clasen <mclasen@redhat.com>
Make gtk_icon_theme_load_icon() work independent of
icon factory initialization. (#162791, Tristan Van Berkom)
* gtk/gtkiconfactory.[hc]: Rename ensure_default_icons to
_gtk_icon_factory_ensure_default_icons, and make it non-static.
* gtk/gtkicontheme.c (find_builtin_icon): ..and call it here.
2004-12-12 Tor Lillqvist <tml@iki.fi>
* gtk/gtkaccelmap.[ch]
* gtk/gtkfilechooser.[ch]
* gtk/gtkfilesel.c
* gtk/gtkfilesystemwin32.c
* gtk/gtkiconfactory.[ch]
* gtk/gtkicontheme.[ch]
* gtk/gtkimage.[ch]
* gtk/gtkimmodule.c
* gtk/gtkmodules.c
* gtk/gtkrc.[ch]
* gtk/gtkuimanager.[ch]
* gtk/gtkwindow.[ch]
* gtk/updateiconcache.c
* gtk/gtk.symbols: Use gstdio wrappers. On Windows, convert
environment variables referring to pathnames from locale encoding
to UTF-8. As in GLib, in order to preserve Windows DLL ABI
stability, add binary compatibility versions of functions that
take file names as arguments, or return file names. Add a _utf8
suffix to the "real" such functions on Windows. The ABI
compatibility versions keep the old name.
* gtk/Makefile.am: Strip PRIVATE symbols from the GNU import
library.
* gtk/gtkiconcache.c (_gtk_icon_cache_new_for_path): Implement
file mapping on Win32.
* gtk/updateiconcache.c: Don't crash if invoked without
argument. Use binary mode when opening file.
* modules/engines/ms-windows/Theme/gtk-2.0/Makefile.am: Install
gtkrc in correct place, in <datadir>/themes/MS-Windows/gtk-2.0.
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.
2004-10-24 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkicontheme.c: Use the new g_key_file api in GLib.
* gtk/Makefile.am (gtk_c_sources): Remove gtkiconthemeparser.[hc]
* gtk/gtkiconthemeparser.[hc]: Removed.