Commit graph

22,212 commits

Author SHA1 Message Date
cc81f6573c Add shared pixdata decoder for gtkgamma
Move GtkGammaCurve's embedded pixdata decoding to a small internal helper
instead of using the deprecated GdkPixdata deserialize and from-pixdata API.

Keep the existing inline image data and per-button pixbuf creation model, so
no runtime files, resources, global caches or ABI changes are introduced. The
helper validates the embedded stream before creating the pixbuf and can be
reused by later GdkPixdata cleanup work.
2026-04-28 16:48:13 +02:00
8b6c287f40 Replace deprecated g_module_build_path in gtkmodules
Build GTK module filenames locally from the configured module directory,
the platform module suffix and the existing GTK module naming convention
instead of using deprecated g_module_build_path().

Also allow explicit absolute module directories in GTK_PATH so uninstalled
libtool build trees can load modules directly from .libs directories for
all module types, including print backends, theme engines and input modules.

Keep the existing .la fallback lookup and do not restore the removed fallback
that tried loading modules without an absolute path, preserving the previous
hardening against loading modules from the current working directory.
2026-04-28 15:39:37 +02:00
0a6b8e421b Clear file chooser icon cache on theme changes
Clear the shared file chooser themed-icon pixbuf cache when GtkIconTheme
emits ::changed, so the file chooser does not keep using pixbufs rendered
from an older icon theme.

The cache is still populated lazily per icon theme, screen, GIcon and icon
size, and thumbnails remain outside this cache because they are file-specific.
2026-04-28 13:44:46 +02:00
84e7586e19 Add file chooser icon view zoom controls
Make the zoom-in and zoom-out icons in the file chooser icon view clickable
and support Ctrl+mouse wheel zooming over the icon view.

Route all zoom changes through the existing icon-view scale adjustment so
slider movement, button clicks and Ctrl+wheel use the same cache invalidation
and layout update path.

Clear stale icon-view renderer pointers when switching back to list view so
recreating the icon view cannot reuse renderers from the destroyed view.
2026-04-28 13:22:41 +02:00
7f7ee740da Cache shared file chooser theme icons
Cache rendered themed file icons per icon theme, screen, GIcon and requested
icon size so large folders with many files of the same type do not repeatedly
load and scale identical icons.

Keep thumbnails outside this cache because they are file-specific. Only cache
themed and emblemed icons, while loadable or otherwise source-specific icons
continue to use the existing direct load path.

Reduce the delayed icon-view zoom cache clear to 500 ms now that visible rows
are updated separately and repeated after-layout clears are coalesced.

This reduces repeated work during file chooser icon-view zooming and scrolling
without preparing pixbufs for unused icon sizes.
2026-04-28 13:06:55 +02:00
8f84c348ff Optimize file chooser icon view zoom invalidation
Only clear the visible icon-view pixbuf cache immediately while the user
changes the icon size, instead of walking the whole file model for every
slider step.

When shrinking icons, clear a small dynamic margin around the visible
range because additional rows can become visible after the layout changes.
Queue one follow-up clear after GtkIconView has recalculated its layout,
and coalesce repeated follow-up clears while the slider is moving.

Keep a delayed full cache clear so off-screen rows become consistent after
zooming settles, without repeatedly processing large folders during fast
slider movement.

This reduces unnecessary work in large folders without adding pixbuf
caches or allocating images for unused icon sizes.
2026-04-28 12:48:36 +02:00
1ce1fa358a Make file chooser icon view zoom smoother
Update icon view zoom through a short visible delay instead of reloading
and rescaling icons for every single slider step.

Apply the new icon size, cell layout and visible pixbuf cache update
together, so old cached pixbufs are not drawn inside newly-sized cells.
This avoids clipped or stale-looking icons while zooming.

Keep Browse/Search/Recent models that are not currently visible on a
longer delay, so their icon caches are not cleared repeatedly in the
background.

This keeps the zoom responsive while reducing unnecessary CPU work and
does not allocate pixbufs for icon sizes that are not actually used.
2026-04-28 11:54:39 +02:00
03ed0b9e5a Improve scaling of small upscaled icons
Use nearest-neighbour interpolation when strongly upscaling small bitmap
icons, while keeping bilinear interpolation for larger sources and
moderate scaling.

This avoids blurry small file chooser icons and reduces scaling work for
that case without adding caches, copying pixel data, changing ABI or
affecting thumbnail loading.
2026-04-28 10:59:39 +02:00
bcbc3926db Fix file chooser icon view layout after zoom
Keep the GtkIconView item width, pixbuf cell width and text cell width
in sync with the current icon-view zoom size.

Changing only the pixbuf renderer size left GtkIconView with stale or
too-small item geometry, causing enlarged icons to appear offset from
their labels after repeated zoom changes. This updates only layout
metadata and does not add new pixbuf caches or pixel copies.
2026-04-28 10:40:16 +02:00
a7e6c6e18b Replace deprecated pixdata deserialization in icon cache
Replace gdk_pixdata_deserialize() in the icon cache reader and
validator with a small parser for the RAW GdkPixdata stream produced by
gtk-update-icon-cache.

Keep the existing icon-theme.cache format and continue creating pixbufs
directly from the mapped cache data, avoiding extra pixel copies or new
runtime dependencies. Intentionally accept only raw 8-bit RGB/RGBA
pixdata, matching the cache format produced by gtk-update-icon-cache.
2026-04-28 09:49:03 +02:00
e9a6be6956 Replace deprecated GCache in pixbuf theme engine
Replace the deprecated GCache-based pixbuf cache with two GHashTables
and explicit reference counting.

Keep filename-based pixbuf sharing while preserving release semantics
through a reverse pixbuf-to-entry lookup. This avoids deprecated GCache
without removing the GTK2 pixbuf theme engine.
2026-04-28 09:03:33 +02:00
205ee49d92 Replace deprecated GCache in GtkGC cache
Replace the deprecated GCache-based GtkGC cache with two GHashTables
and an explicit cache entry refcount.

Keep the old key-based sharing behavior for gtk_gc_get(), while
preserving gtk_gc_release() semantics by looking up entries from the
GdkGC pointer. This avoids the deprecated GCache API without changing
the public gtk_gc_get()/gtk_gc_release() ABI.
2026-04-28 09:03:26 +02:00
6fa9c4cc15 Fix file chooser icon view icon sizing 2026-04-28 08:34:19 +02:00
4db364c55f Replace deprecated GtkCombo completion helper 2026-04-27 21:26:14 +02:00
69f52de16f Replace deprecated icon size parser helpers 2026-04-27 20:41:15 +02:00
26353701bd Replace deprecated GtkBuilder parameter construction 2026-04-27 20:19:22 +02:00
81cee595ec Prefer mallinfo2 in testtreemodel 2026-04-27 19:36:35 +02:00
38f08b2cf4 Replace deprecated recent manager trap fork tests 2026-04-27 18:55:16 +02:00
1f42373cb4 Fix bookmark timestamp ownership handling 2026-04-27 18:55:10 +02:00
230a203dff Replace deprecated Pango base direction lookup 2026-04-27 18:04:58 +02:00
7db50fd467 Replace deprecated Pango base direction lookup 2026-04-27 17:00:03 +02:00
a576cad7ce Use modern bookmark timestamp APIs 2026-04-27 16:15:06 +02:00
083c8af809 Use modern bookmark application info APIs 2026-04-27 16:06:39 +02:00
a4928bb5e4 Update gtk-doc varargs annotations 2026-04-27 14:09:36 +02:00
e170c8fb90 Remove unused local variables 2026-04-27 13:50:25 +02:00
6adbcf7e9d Replace deprecated testgtk time handling 2026-04-27 13:29:07 +02:00
8cf0bd8538 Replace deprecated menu popup time handling 2026-04-27 13:23:48 +02:00
6f00af9c64 Replace deprecated GValue char accessors 2026-04-27 13:14:10 +02:00
85b875b448 Replace deprecated GValue char accessors 2026-04-27 13:12:35 +02:00
425b4e3d61 Replace deprecated g_memdup with g_memdup2 2026-04-27 13:09:24 +02:00
3977ecd6bb Modernize remaining GTK private data access 2026-04-27 13:09:13 +02:00
32241d4576 Modernize GtkToolPalette private data access 2026-04-27 12:16:02 +02:00
ca14898eeb Modernize GtkTextLayout private data access 2026-04-27 08:59:37 +02:00
eb83c27307 Modernize GtkTrayIcon private data access 2026-04-27 08:53:48 +02:00
aea967907a Modernize GtkStyle private data access 2026-04-27 08:50:55 +02:00
8b222e4a30 Modernize GtkSearchEngineQuartz private data access 2026-04-27 08:46:10 +02:00
b616aee23a Modernize GtkCustomPaperUnixDialog private data access 2026-04-27 08:40:06 +02:00
2a13a10a45 Modernize GtkTooltips private data access 2026-04-27 08:26:28 +02:00
b8d10c5a0a Modernize GtkPrinterOptionWidget private data access 2026-04-27 08:16:12 +02:00
fc562b9eab Modernize GtkUIManager private data access 2026-04-27 07:51:26 +02:00
dc2b1db637 Modernize GtkIconTheme private data access 2026-04-27 07:46:51 +02:00
4d68307794 Modernize GtkTreeModelFilter private data access 2026-04-26 20:11:42 +02:00
ef6761c128 Modernize GtkInfoBar private data access 2026-04-26 20:08:08 +02:00
6d7caf07b4 Modernize GtkSocket private data access 2026-04-26 20:04:47 +02:00
a074fd5967 Modernize GtkMenu private data access 2026-04-26 20:04:46 +02:00
729646125d Modernize GtkRange private data access 2026-04-26 20:04:46 +02:00
df5b00c409 Modernize GtkRange private data access 2026-04-26 19:47:37 +02:00
b89e25028a Modernize GtkSocket private data access 2026-04-26 19:44:49 +02:00
341c9c8162 Modernize GtkStatusIcon private data access 2026-04-26 19:43:06 +02:00
d283ceb7f5 Modernize GtkRecentAction private data access 2026-04-26 19:37:43 +02:00