Commit graph gtk2-ng/modules
Author SHA1 Message Date
d9437da8dd cups: the request flags as unsigned bit-fields
A gint of one bit holds 0 and -1, so TRUE did not fit.
2026-10-19 14:48:45 +02:00
d143858abc gdkwindow-x11, imcontextxim: drop a dead mask and a self-assignment 2026-10-19 14:48:24 +02:00
0224e940a0 gail tests: table cells and text boundaries without deprecated calls
ATK 2.12 deprecated the index, row and column calls of AtkTable for
AtkTableCell, and ATK 2.10 the text calls by boundary; gail has neither
replacement, and these tests check its implementations of the old ones.
With such ATK they now ask those implementations directly.
2026-10-19 14:14:52 +02:00
4503f3e916 gail tests: hear the focus through the focused state
ATK 2.9.4 deprecated the focus trackers and the focus handlers of
AtkComponent for the state-change signal.  testfocus.h gives the test
modules and ferret the object whose "focused" state is set (by a global
event listener, which gail has), testobject listens to state-change on
the objects; with older ATK both keep the old calls.
2026-10-19 14:14:10 +02:00
9edcc1e497 testcomponent: compare position and size without hiding warnings
The deprecated ATK calls were wrapped in G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
with ATK 2.12 and later the test now asks the implementations they lead
to, before that the calls themselves.
2026-10-19 14:12:26 +02:00
fd6f1f3cf1 gail: drop two clist helpers nothing calls 2026-10-19 14:10:32 +02:00
6e6bfd0a5e tests: no variables without a use, none read unset 2026-10-19 14:10:32 +02:00
77c70dc65a ms-windows engine, ime: drop what is computed and never used
The separator states in xp_theme.c stood before the first case of their
switch and never ran; the code that was really used stays as it was.
2026-10-19 14:10:05 +02:00
bce01889c6 ferret: read text with atk_text_get_string_at_offset()
With ATK before 2.10, which does not have it, the boundary calls
stay.
2026-10-19 13:49:29 +02:00
2d9df97e69 gail tests: connect to property-change directly 2026-10-19 13:49:05 +02:00
46475cf89b gail: call its own table and focus handler code directly
The ATK wrappers it went through are deprecated; for these objects
they only lead back to the same functions.
2026-10-19 13:48:09 +02:00
03a627d8e1 ferret: check what write() returns, close the socket 2026-10-19 13:46:58 +02:00
341a3d0029 quartz: bring back the accent popup when holding a key
10.7 and later, like GTK 3.24. The chosen character replaces the typed
one, and commands from Cocoa leave the key to GTK.

Backported from GTK 3:

- cfad43b80d (Suyuan Chang)
- d0b09a8823 (John Ralls)
2026-10-18 12:22:36 +02:00
36f6cabbf7 quartz: input, clipboard and drag fixes from GTK 3
Backported from GTK 3:

- consumed modifiers of key presses
- clicks on the title bar
- page up and down
- Escape in input methods
- the clipboard owner
- clearing the drag pasteboard

Upstream commits:

- af6487d70c (Thomas Holder)
- f91b429839 (Jeremy Tan)
- 817e99640d (Jiří Techet)
- 3236c09d7d (Matt Rose)
- d0b09a8823 (John Ralls)
- 91f2ad4a2f (Kristian Rietveld)
- 0e4bac872c (Philip Chimento)
2026-10-18 11:48:40 +02:00
bd3df5bec1 win32: window, IME and monitor fixes from GTK 3
Backported from GTK 3:

- frameless windows maximize without covering the taskbar
- IME windows follow the scale
- monitor info and selection names without overflow or leak
- opacity on child windows is ignored quietly

Upstream commits:

- c61764b0f9 (Руслан Ижбулатов)
- c073a062b6 (Chun-wei Fan)
- ba6522d3f2 (Vasiliy Nuzha)
- 41026987be (Руслан Ижбулатов)
- 6dede1a0b7 (Руслан Ижбулатов)
2026-10-18 10:41:33 +02:00
b413703921 ms-windows: draw theme parts at the native resolution 2026-10-18 10:41:33 +02:00
de123d8ed5 print: PPD translations and print-to-file fixes from GTK 3
Backported from GTK 3:

- PPD options in the language of the user
- Print to File writes to Documents and adds to recent files
- the scale is applied after rotation and margins
- cancel stops a preview
- conflicts are checked for a new printer
- option widgets let go of their option
- radio options take their mnemonic

Upstream commits:

- 97ee5efb4b (Matthias Clasen)
- c85c3510e7 (Leo Wolf)
- 2c1839ae5f (Marek Kasik)
- d80953666e (Morten Welinder)
- ad764c8a58 (Alban Browaeys)
- f682aabf74 (Siegfried Gevatter (RainCT))
- 0fe9e481dd (Marek Kasik)
- da85312097 (Marek Kasik)
2026-10-18 10:18:40 +02:00
6eedf81e1e print: callback, title and driver fixes from GTK 3
Backported from GTK 3:

- a printer list callback stops when a handler destroys the backend
- CUPS job titles are cut to 255 bytes at a character boundary
- a second source file no longer leaks the first
- Windows driver settings stay with their printer

Upstream commits:

- 255225584e (Carlos Garcia Campos)
- 446659e80f (Rick Yorgason)
- 0387486407 (Marek Kasik)
- 90950b2d3d (Marek Kasik)
2026-10-18 10:18:40 +02:00
a1dec5205d cups: fix connection and request leaks
A connection and a request leaked with every job, a borrowed connection
was closed twice, and the TXT records of network printers weren't
freed. Avahi requests close their own connections now.

Upstream commits:

- 118b09c68c (Marek Kasik)
- 083f834dd7 (Marek Kasik)
- 9513d3b2a4 (Marek Kasik)
2026-10-18 10:18:40 +02:00
9caeed54ad cups: option, Kerberos and leak fixes from GTK 3
Backported from GTK 3:

- custom option values are checked before use
- Kerberos printers no longer ask for a password
- options of printer instances stay with the instance
- a resolution from the settings wins
- printer references no longer leak

Upstream commits:

- b9e91b9419 (Till Kamppeter)
- 9a0700e20c (Marek Kasik)
- e99e282b5a (Andre Heinecke)
- 315bb30220 (Matthias Clasen)
- 36effbb307 (Timothy Arceri)
2026-10-18 10:18:40 +02:00
11b04da889 cups: store job passwords in the keyring like GTK 3
Based on GTK 3 commit 382d68ff8e by Andre Heinecke.
2026-10-18 10:18:40 +02:00
cd6e01acde cups: don't leak the entered password 2026-10-17 23:59:00 +02:00
ff6019ff8d entry, textview: fixes from GTK 3
Backported from GTK 3:

- activatable defaults of entry icons
- display text ranges
- primary selection ownership
- empty inserts
- tag toggles at the end
- line width of justified text
- control characters in input methods

Upstream commits:

- 67efefde49 (Carlos Garnacho)
- 5fe9ebfe11 (Carlos Garnacho)
- 056acf92ec (Matthias Clasen)
- 73c8f30928 (Sebastien Lafargue)
- ff9eb56c6e (Jasper St. Pierre)
- 3511215730 (Paolo Borelli)
2026-10-17 18:13:35 +02:00
b31c0210e0 cups: get the document size without fstat() 2026-10-17 13:51:50 +02:00
d86aabf1f6 gtk: correct current time after 2038 with 32-bit time_t
Recent item ages, Today/Yesterday in the file chooser, the calendar
and the CUPS print time. Uses clock_gettime64 on Linux.
2026-10-17 13:51:50 +02:00
22e603ee99 cups: compute the UTC print time without time()
This also fixes zones with quarter hours like Nepal, which came out an
hour wrong.
2026-10-17 12:17:32 +02:00
a47206e0a6 pixbuf engine: keep theme image pieces in the X server 2026-10-17 11:12:39 +02:00
92c6e6abf8 pixbuf engine: clip image parts only around themselves 2026-10-16 22:58:51 +02:00
86aee38b99 pixbuf engine: cache stretched theme image pieces 2026-10-16 19:35:36 +02:00
8deebb25ac print: end the job with an error when writing fails
All backends used to loop forever on a failed write.

Backported from GTK 3 commit 2adacca119 by Carlos Garcia Campos.
2026-10-15 17:06:32 +02:00
c5f7672ee1 gail, iconview: use atk_component_get_extents()
From the warning-cleanups branch.
2026-10-15 11:30:51 +02:00
d1ad63a098 headers: don't mark _get_type and _quark functions const
They register types as a side effect, and newer compilers drop calls
whose result isn't used.

The same change as GTK 3 commit f30efa7759 by Matthias Clasen.
2026-10-15 09:53:23 +02:00
8c1c905be0 build: drop fallbacks for unsupported dependency versions
The minimum versions are listed in INSTALL now.
2026-10-15 09:07:46 +02:00
4851a82452 ms-windows: don't use a deprecated size call 2026-10-15 09:07:31 +02:00
782a2948b8 gail: update AtkValue test modules
Use a shared private compatibility helper in the GAIL test modules.

Exercise the modern AtkValue API when ATK 2.12 or newer is available while retaining the legacy test path for older ATK versions.

Initialize temporary GValues explicitly and keep the helper symbols private to the test modules.
2026-08-07 08:53:00 +02:00
a116a5d13b gail: implement modern AtkValue interface
Add compile-time support for the modern AtkValue API available since ATK 2.12 while retaining compatibility with older ATK versions.

Implement direct modern value, range, increment and setter methods for adjustments, paned widgets, progress bars, ranges, scale buttons and spin buttons.

Keep the implementation private, avoid per-instance memory overhead and preserve the existing exported ABI.
2026-08-07 08:53:00 +02:00
d0c4346396 cups: use modern HTTP connection helpers when available
Detect httpConnect2 and httpReconnect2 at configure time.

Preserve blocking, encryption, timeout and reconnect semantics while retaining the legacy CUPS APIs as compile-time fallbacks.
2026-08-07 08:53:00 +02:00
7e9fb7ce53 gail: drop volatile from once-init type IDs 2026-05-07 18:12:16 +02:00
42a31c8576 Clean up trailing whitespace 2026-05-03 15:16:52 +02:00
a1ab76063d lpr: mark backend printer as accepting PDF and PostScript
Construct the LPR printer with explicit is-virtual, accepts-pdf and
accepts-ps properties so the backend advertises the formats it can
handle.

This follows the GTK2 LPR backend fix referenced by OpenBSD ports and
GNOME, using GTK2's GtkPrinter:is-virtual property name and keeping the
printer non-virtual as in the referenced patch.

Make sure to enable the LPR print backend when using this feature, for
example by setting gtk-print-backends in the user's GTK2 rc file:

    gtk-print-backends = "file,cups,lpr"

For normal application startup, put this setting in ~/.gtkrc-2.0 so GTK2
applications pick it up automatically.

Ported-from: OpenBSD ports x11/gtk+2 patch-modules_printbackends_lpr_gtkprintbackendlpr_c
2026-04-30 11:28:48 +02:00
81b9e0200f build: replace deprecated INCLUDES with AM_CPPFLAGS 2026-04-28 21:14:00 +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
744ce7c22f Fix assorted non-deprecation compiler warnings 2026-04-24 20:58:49 +02:00
ef8c6add6a Fix compiler warnings across tests and modules 2026-04-24 19:10:41 +02:00
932bc82675 Fix compiler warnings and deprecated API usage 2026-04-24 15:29:59 +02:00
d77875c0af Y2038 safety: internal timestamp modernization 2026-04-23 10:18:55 +02:00
71b1ab5e77 Fix build issues on modern compilers
Resolve multiple compiler errors and warnings found on current toolchains.

Changes include:
- explicit type casts for subtype/base assignments
- legacy prototype cleanup
- test source fixes
- gail and CUPS backend build fixes

Restores successful compilation on current Linux systems.
2026-04-20 18:08:34 +02:00
Nam Nguyen
d1b21ff159 Resolve GIMP segfault from accessing memory past end of pixbuf
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2684

GIMP segfaults while switching themes between dark and gray and inputting Ctrl-O
to open a file. This is because p advances past end of pixbuf in pixbuf-render.c
compute_hint() with num_channels = 3 (no alpha). This is resolved by fixing the
if statement to only check for alpha, thereby advancing p, if there is an alpha
channel.
2020-05-01 21:55:49 +00:00
Ming Hua
88ac9188a3 Do not use VIQR input method for vi locale by default
In the Vietnamese Quoted-Readable input method, punctuation following a
base letter is converted into diacritical marks, for example a( → ă.
(See <https://en.wikipedia.org/wiki/Vietnamese_Quoted-Readable>.)
A 2008 bug report in Ubuntu argued that this is a problematic default,
particularly when typing passwords, where the effect of the punctuation
is non-obvious.

According to the bug reporter, VIQR is popular with Vietnamese users
living elsewhere in the world, where Vietnamese keyboards are unlikely
to be readily available, but is not a popular choice within Vietnam,
where the Telex or VNI input modes are preferred.

Closes: #183

Bug-Debian: https://bugs.debian.org/895043
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/gtk+2.0/+bug/191451

Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
2019-11-16 20:19:23 +00:00
Samuel Thibault
cf15c11429 atk key: Always convert control character events into key names
including when the control modifier is present, i.e. when one is typing
control-I for instance.

Orca would convert them back to the corresponding ASCII letter anyway, and
when pressing control-tab, we do want to pass "tab", not pass "\t" that Orca
would erroneously convert to "control-I".

Fixes #1743

(cherry picked from commit 728f6869cba6360b843a83fe5b525404accb1433)
2019-03-12 18:27:46 +01:00