Commit graph gtk2-ng/modules
Author SHA1 Message Date
8d260c9f50
pixbuf engine: keep the stretched pieces of theme images that were drawn last, ready for cairo, instead of scaling and converting them for every widget 2026-10-19 11:30:22 +02:00
e6fcd0eea9
gail: build ferret, the accessibility explorer, on demand only, and do not install it 2026-10-19 11:30:20 +02:00
06b08cf7cb
headers: the _get_type and _quark functions are no longer marked const, as they register types and newer compilers drop calls made only for that 2026-10-19 11:30:20 +02:00
0e4684bec1
printbackends: a failed write to the output ends the job with an error instead of looping forever 2026-10-19 11:30:19 +02:00
7da50ae143
build: drop fallbacks for versions older than the required ones, and say which those are 2026-10-19 11:30:17 +02:00
bf77fb897d
cups: remember job passwords in the keyring, as GTK+ 3 does 2026-10-19 11:30:17 +02:00
a0716f2213
cups: do not leak the password the user typed 2026-10-19 11:30:16 +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
Brady Minardi
8f8336cd94 modules/other/gail/gailtreeview.c: Incorporate review suggestions
Incorporate review suggestions by Emmanuele Bassi.
2018-07-14 14:45:28 +00:00
Brady Minardi
4d37ee2e79 modules/other/gail/gailtreeview.c: Fix -Wunused-but-set-variable warning 2018-07-14 08:00:56 +00:00
Brady Minardi
8715570f45 modules/other/gail/gailtreeview.c: Fix -Waddress warning 2018-07-14 07:56:39 +00:00
Ivan Zakharyaschev
7461ceebe3 gtkprintbackendcups.c: fix \n at end of a debugging note 2018-02-17 20:19:33 +03:00
Colomban Wendling
61d5c82f5c Fix updating the widget accessible description when using its tooltip
We need to notify ATK the description changed when the tooltip text
associated with the widget changes and gail_widget_get_description()
would use it as the description.

https://bugzilla.gnome.org/show_bug.cgi?id=779009
2017-12-09 21:42:36 -05:00
Daniel Boles
bc555cd64f imcontextxim: Fix showing glyph in status window
This custom drawing code was broken, which meant the current mode
indicator/character did not show, severely hindering XIM users.

Fix by simply removing the custom drawing and just being a GtkWindow, by
cherry-picking these two from GTK+ 3:
  commit 211ccb5c73a444683d493588c3eb29b457a5586b
  commit c750cea4e57ed3bcb5ba7eada95d0be380aa2fe5t

https://bugzilla.gnome.org/show_bug.cgi?id=696624
2017-10-21 19:08:03 +01:00
Kristian Rietveld
899147d6d0 imquartz: fix regression introduced by commit 4ba1fb
In the preceding fix, the checks involving GDK_IS_QUARTZ_WINDOW macros
were left out. These checks are in fact crucial, because these functions
are sometimes called with non-quartz functions as the original comments
in the code do indicate. Therefore, reintroduce these checks. This
fixes a crash in GIMP.
2016-08-07 16:53:57 +02:00
Chun-wei Fan
339fd3d3f6 Clean Up MSVC Project Generation
Use the common autotools module that was added in the last commit so that
we can clean up the various Makefile.am's in gdk/ and gtk/, and also
make more Visual Studio projects completed during 'make dist', by adding
minimal items to those other Makefile.am's.  This also allows us to make
the property sheets that does the copying of headers and built items
completed at 'make dist', so that we won't have to worry too much about
headers being added (although it would be unlikely for GTK+-2.x).
2015-12-15 16:44:47 +08:00
David Lechner
4ba1fbfdb1 Bug 753992 - im-quartz discard_preedit segmentation fault
Replace checking if the NSView is really a GdkWindow, which will crash
in the likely event it's not a GObject, with ensuring that the parent
GdkWindow is really a GdkWindowQuartz.
2015-10-08 21:36:11 -04:00
Ting-Wei Lan
46c28bd54d Makefiles: Fix parallel installation for MinGW
Make sure that the destination exists before installing files.

https://bugzilla.gnome.org/show_bug.cgi?id=753691
2015-08-19 10:38:39 +08:00
Matthias Clasen
f3a34856c5 multipress: Only emit preedit signals if needed
When clearing the compose buffer, don't emit preedit-changed
unconditionally. This triggers a recursion which leads to
a crash.

https://bugzilla.gnome.org/show_bug.cgi?id=753644
2015-08-18 15:46:21 -04:00
Marek Kasik
d63bee09e0 printing: Check connection to remote CUPS server on correct port
Add parameter for specification of port to gtk_cups_connection_cups_new().
Use default port returned by ippPort() if the given port is lower than 0.

https://bugzilla.gnome.org/show_bug.cgi?id=693738
2015-05-13 12:27:44 +02:00
Matthias Clasen
5364ede826 gailbutton: Avoid a possible NULL dereference
We were using widget->window before checking widget for being NULL.

Pointed out by Sami Farin,
https://bugzilla.redhat.com/show_bug.cgi?id=1140414
2015-02-13 13:40:46 -05:00
Matthias Clasen
1d0e2d5838 pixbuf engine: Avoid a crash if widget is NULL
Commit 85f2a721cf introduced an unconditional call to
gtk_widget_get_direction(). This does not work for 'foreign'
uses of the theme engine, e.g. in Qt, where widget is NULL.

This was reported as a crash in Fedora here:
https://bugzilla.redhat.com/show_bug.cgi?id=924683
2014-09-29 16:05:57 -04:00
Jehan
ab3e3b1834 Makefiles: cross-compilation on Linux for Windows failing.
Missing linking information for some modules.
2014-08-13 20:59:30 +00:00
Matthias Clasen
267d004fd9 Fix a typo
$(bindir) starts with a slash, so no need to add an extra one in
$(DESTDIR)$(bindir)...

https://bugzilla.gnome.org/show_bug.cgi?id=734563
2014-08-10 07:58:05 -04:00
John Ralls
825e035833 Bug 729924 - Crash trying to print in OSX 2014-08-03 11:53:43 +02:00
Matthias Clasen
f652982062 Fix a pixmap leak in the ms-windows engine
This was pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=731967.
2014-06-22 13:11:50 -04:00
Kalev Lember
46b0c29382 pixbuf-engine: Fix the build with -Werror=format-security 2014-05-23 11:19:53 +02:00
Marek Kasik
378ea9029f printing: Fail nicely when /tmp is not writable
Don't crash when /tmp is not writable when printing to file.
Show that getting of printer details failed for CUPS printers.

https://bugzilla.gnome.org/show_bug.cgi?id=693200
2014-03-18 16:02:04 +01:00
Marek Kasik
e84bb08ded printing: Don't crash because of missing g_clear_pointer()
g_clear_pointer() is not available in glib-2.28 which is minimal
required version for gtk+-2.24.

https://bugzilla.gnome.org/show_bug.cgi?id=708783
2014-03-12 23:47:28 -04:00
Carlos Garnacho
e048de9cab ime: Add builtin handling of dead keys
The IME input method has been both ignoring keypresses of
non-spacing characters (ditching these as non displayable),
and not letting IME do anything about those.

Even though, the sparse documentation on IMM/IME seems to
hint that applications can't pipe non-spacing characters to
the input method manager, and experimentation shown that
those characters are indeed handled differently than how
it'd be expected.

Then, add basic handling of dead keys on the IME input method
itself , as it's not mutually exclusive with regular keymaps
with dead keys.

https://bugzilla.gnome.org/show_bug.cgi?id=704937
2013-12-05 10:12:24 -06:00
Jehan
aa8704aa9f Bug 712536 - Themes with gap_(start|end)_file but no actual file crash
Code factorization in commit 34fd123 reintroduced bug fixed in 0d396ab
with non-equivalent factorized tests.
2013-12-05 01:08:18 +13:00
Matthias Clasen
9559c707d5 Avoid a crash in the pixbuf engine
This is fallout from e4c83bbfdb,
which removed a necessary check.
2013-12-01 17:12:08 -05:00
Emmanuele Bassi
e4c83bbfdb pixbuf-engine: Clean up error conditions and destructors
Simplify the error checks and move all common behaviour into a utility
function.

https://bugzilla.gnome.org/show_bug.cgi?id=712536
2013-11-22 22:19:58 -05:00
Emmanuele Bassi
e2aabc016a pixbuf-engine: Improve ThemePixbuf clean up functions
Make theme_pixbuf_destroy() NULL-safe like g_free(), and add a clear
function in the spirit of the g_clear_* family of functions.

https://bugzilla.gnome.org/show_bug.cgi?id=712536
2013-11-22 22:19:58 -05:00
Jehan
c988a258cc Themes with specified gap images but no actual file crash.
https://bugzilla.gnome.org/show_bug.cgi?id=712536
2013-11-22 22:19:58 -05:00