Commit graph

22,574 commits

Author SHA1 Message Date
a72f1efc63 Bump version to 2.24.34 2026-10-19 18:10:00 +02:00
c1872f2e96 gdkrgb: no vector code for CPUs it is not for
Every set of vector instructions was compiled on every system, as an
empty function where it could not be built: MMX on PowerPC, AltiVec on
x86.  And a build for a CPU that has SSE2 anyway (x86-64, or -msse2 and
later in CFLAGS) carried the MMX code, which SSE2 replaces wherever it
runs; one for ARM with NEON carried ARMv6 code the same way.

configure now builds only the sets of the CPU family built for, and
none that a set the build can take for granted does entirely: no MMX
where SSE2 is there anyway, no ARMv6 where NEON is.  AArch64, where the
NEON file was simply compiled without flags, is looked at like the
others.  The empty stand-ins are gone, and so are the files from the
MSVC makefile, where none of them could be built.
2026-10-19 18:01:54 +02:00
fb2da8786c filechooser: MCI video in a window of ours, and by extension
Tried under Wine: "put window at" left the video window of MCI where
it was, at the top left of the dialog and at the size of the video.  MCI
now draws into a child window we make and move over the preview, with
"window handle" and "put destination", which every version knows.

Where DirectShow (the mpegvideo device) cannot open a file, the device
MCI has for its extension takes it: waveaudio for WAV, the sequencer for
MIDI.  And as the type of a file on Windows is its extension, and not
every system has a MIME type in the registry for .avi or .mp3, sound and
video are also told by a short list of extensions.
2026-10-19 17:26:08 +02:00
8bf037a864 po: the new strings from GTK 3, Caja and Nautilus
Strings of the fork that GTK 3, Caja or Nautilus have too, as the labels
of the file information ("Type:", "Location:", "Dimensions:"...),
"Audio/Video", "Open With %s", the emoji and file names messages, now
come with their translations from there, in this order, where those are
complete and not fuzzy: 6054 strings in 104 languages.  Obsolete entries
of the same strings make room for them.

German gets the strings no one else has yet.
2026-10-19 16:36:26 +02:00
82361cfd6f filechooser: the preview panel as Caja's information pane
The name stands under the picture in bold and centred, and below the
details a button opens the file with the program the system has for its
type, "Open With ...", both as in the information pane of Caja.  The
string comes translated from there.

gtkmain.h is included for gtk_get_current_event_time(); on Windows no
other header brought it in.
2026-10-19 16:34:00 +02:00
3f065539f5 filechooser: a bar to seek in sound and video
Under the picture of what plays, a bar shows where it is and moves it
there when dragged, with the time beside the buttons ("0:12 / 1:30").
GStreamer and the Media Control Interface seek themselves, xine starts
playing at the time; FFmpeg starts its two programs again from there,
which is why a seek waits until the bar rests for a moment.  The length
comes from ffprobe where it is installed; without it, the bar stays
off.

GStreamer seeks to the nearest key frame, which is what weak machines
manage quickly.
2026-10-19 16:19:32 +02:00
1dd0ceb854 filechooser: the preview panel takes the width it is given
As in Caja and Nautilus, a handle between the files and the panel beside
them makes the panel wider or narrower, from 160 pixels to half of the
space; the width is kept with the other settings.  The picture grows
with it, up to the 256 pixels of a large thumbnail, and the lines of
information wrap to it.
2026-10-19 16:19:25 +02:00
cf9fab57cc filechooser: play sound and video in the preview
Sound and video files get a play/pause and a stop button under their
picture in the panel beside the files.  Nothing plays before they are
pressed, and nothing is loaded before: GTK+ needs none of this to build
or to run, it uses what it finds installed.

 - GStreamer 1.x, opened as a library where it uses the same GLib as
   the program (on Linux and the BSDs, and from Homebrew or MacPorts).
   It scales the pictures to the size of the preview itself.
 - xine-lib 1.2, opened as a library, with its raw video output.
 - FFmpeg, as the programs: ffmpeg decodes the pictures into a pipe at
   25 a second and the size of the preview, ffplay plays the sound;
   pausing stops both.
 - On Windows the Media Control Interface every version has, from 3.1
   on, with its video window put over the preview.

The preferences have a switch for all of it and, as the panel, a choice
of what plays.  Where nothing is installed, the panel says what to
install.  The buttons take their icons and tooltips from the stock items
Play, Pause and Stop, so they are translated already.
2026-10-19 16:11:36 +02:00
07d7ebbf84 filechooser: more about the file beside the preview
The panel beside the files lists, as the file managers do: the type, the
size, where the file is, the size of a picture (from its thumbnail),
when it was changed, read and made, its owner and group, and where a
link points.  What the list does not know yet is asked of GIO in the
background, so a slow disk or network share holds nothing up.

The name of a picture format the system has no name for is now found
from its MIME type; before, the file itself was read for it, on the
main thread.
2026-10-19 16:09:26 +02:00
fd5c1f403f introspection: the old API in Gtk-2.0.gir again
Since f0d1c05ea the scanner got -DGTK_DISABLE_DEPRECATED, and
gtktextlayout.h, gtkprivate.h and gtkmarshal.h were left out, so
Gtk-2.0.gir lost everything deprecated that 2.24.33 had in it: GtkCList,
GtkCTree, GtkOptionMenu, GtkComboBoxEntry, the rulers, GtkItemFactory,
gtk_signal_*, GtkTextLayout... 592 functions and types.  Programs in
Python or JavaScript that still use them broke.

The scanner gets -UGDK_DISABLE_DEPRECATED -UGTK_DISABLE_DEPRECATED again
as before, and the headers come back; the warnings that came with them
are fixed by the annotations of the commit before.
2026-10-19 15:59:37 +02:00
c9aafbc940 introspection: annotate the old API
The deprecated API of GTK+ 2 (GtkCList, GtkCTree, GtkItemFactory, the
gtk_signal_ and gtk_type_ functions, the old toolbar calls...) lacked
annotations g-ir-scanner asks for: transfer of returned objects, the
scope of callbacks, the types in lists, the hooks that return the old
hook.  92 warnings with --warn-all, and 74 functions bindings could not
call.  Only comments change.

Two functions stay out of reach, as before: gtk_ctree_export_to_gnode()
and gtk_text_layout_get_line_display() return structures that are freed
in ways that need a boxed type.
2026-10-19 15:59:30 +02:00
cc08634511 x11: pass drags on to the windows plugins make in ours
Plugin UIs (LV2 through suil, VST, JUCE, LSP) draw in X windows of their
own, made inside a window of the host.  A drag source only ever talks to
the toplevel, so the plugin never heard of a drag over it, and dropping
a file on it did nothing (GNOME/gtk#2329).

The XEmbed specification asks the embedder to act as the drag-and-drop
proxy of its client.  Now, while a drag is over a window that GDK does
not know and that is XdndAware, its XdndEnter, XdndPosition, XdndLeave
and XdndDrop go on to it.  They name our toplevel as the source, so its
answers come back here even from plugins that put their own window in
them, and they go on to the real source with ours.  GTK meanwhile sees
the drag leave its widgets, and its own answers are held back.

Clients of a GtkSocket that GDK knows as foreign windows are still left
to the proxy GTK has for them.  A toplevel without X windows inside,
which most are, is asked that once per drag and then costs nothing.

A GtkSocket now makes its toplevel take drags once something is
embedded, as the plugin may make its window later.
2026-10-19 15:49:32 +02:00
e2e6e8df6e thumbnails: give up between the slow steps too
Reading the size of a picture and scanning a JPEG each wait for the disk,
which on a slow USB stick or a busy NFS server takes a while.  A request
that is no longer wanted now ends after the step it is in, not only
between the chunks of decoding.
2026-10-19 15:37:56 +02:00
4bbb723012 thumbnails: ask the installed thumbnailers for other files
What gdk-pixbuf cannot read, a PDF, a video, a WebP without its loader,
now gets its thumbnail from the thumbnailers of the freedesktop.org
thumbnailer specification, if one is installed for its type.  They run
as programs of their own, one at a time like everything here, and are
killed when the file scrolls out of sight or after 20 seconds.

Their pictures are made no bigger than asked, as some of them ignore
the size.  A failure is only remembered when the thumbnailer ran and
gave nothing, not when it was stopped or could not be started.

On Windows and macOS, documents and videos are asked of the shell's
cache and of Quick Look; a miss there is not remembered, as the shell
may have it later.
2026-10-19 15:37:56 +02:00
0c2f6c9ac8 gdkrgb: section headings as plain comments
They began with /**, which g-ir-scanner takes for documentation and
reports as errors.
2026-10-19 15:12:40 +02:00
233f6fec3a introspection: give the scanner the flags from AM_CPPFLAGS
Since INCLUDES became AM_CPPFLAGS, the GIR CFLAGS still named the empty
INCLUDES, so g-ir-scanner found neither GLib nor the other headers and
no .gir was made.
2026-10-19 15:08:00 +02:00
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
7922aeff74 tests, doc-shooter: ABS for a time_t, no unused colour sums 2026-10-19 14:48:24 +02:00
d143858abc gdkwindow-x11, imcontextxim: drop a dead mask and a self-assignment 2026-10-19 14:48:24 +02:00
08c987975b gdkgc-x11: the XCopyGC mask without shifting a negative value 2026-10-19 14:48:24 +02:00
bb7df35bfe x11: Motif DnD bytes and dash lengths as unsigned bytes
Values past 127 went into plain char, where they don't fit.
2026-10-19 14:48:24 +02:00
5b18315e87 alias scripts: plain tests instead of macros that expand to defined
IN_FILE and IN_HEADER were defined as "defined", which is undefined
behaviour; clang warned about it some thousand times per build.  The
generated files now test defined() directly, with the same result.
2026-10-19 14:43:29 +02:00
fc9f73926f scrolling: go smoothly past handlers that let the wheel through
A program's widget with its own scroll handler kept the smooth events of
a high-resolution wheel from the scrolled window around it, so a canvas
like GnomeCanvas in xournal scrolled in whole steps (issue #22).  Once
its handler lets a whole step through to the scrolled window, with the
same modifiers, the smooth events go past it from then on; it still gets
every step, and when it takes one, the smooth events stop going past it.
2026-10-19 14:30:17 +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
fe1839c6a0 build: gettext infrastructure from gettext 0.22.5
The m4 files and the po Makefiles were from gettext 0.18, whose macros
newer autoconf calls obsolete (AC_TRY_LINK, AC_TRY_RUN, AM_PROG_MKDIR_P).
These are from 0.22.5, with config.rpath and ABOUT-NLS; the others in m4/
are not used with AM_GNU_GETTEXT([external]) and stay.  autopoint 0.19.6
and later brings those of the installed gettext (0.20 at least).
2026-10-19 14:12:06 +02:00
6fb0bdd501 po-properties: af: drop four stray \v from the translations
msgfmt warned about them; they were typos at the start of a word.
2026-10-19 14:12:05 +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
149c5b7f0f toolitem, text: the right enum and no doubled parentheses 2026-10-19 14:09:23 +02:00
a44a145186 textutil: drag icon text wraps as GTK_WRAP_WORD_CHAR
It took PANGO_WRAP_WORD_CHAR, which as a GtkWrapMode is GTK_WRAP_WORD.
Same change as GTK+ 3 commit d1e218f4ab by Yosef Or Boczko.
2026-10-19 14:09:22 +02:00
ffd1f32d7a textlayout, toolitemgroup, treeview: drop counts nothing reads
In totally_invisible_line() the count was the first branch of the
toggle tests; toggles have no bytes, so they are tested on their own.
2026-10-19 14:09:22 +02:00
becbc4b24e gtksignal: drop two unused GtkArg helpers
gtkobject.c has its own copies, the ones here were never called.
2026-10-19 14:05:19 +02:00
0d1743b105 printoperation-win32: hand the driver data to base64 as bytes 2026-10-19 14:05:19 +02:00
e27528f38b statusicon, selection: no X11-only variables elsewhere
And the icon update on Windows is indented as it runs.
2026-10-19 14:05:18 +02:00
9b568b689f mountoperation: print a GPid as a number on Windows too
There it is a handle, which %d does not take; GTK+ 3 does the same.
2026-10-19 14:04:29 +02:00
4e6e22b57c menubar, filesel: drop counts nothing reads
And look for the slash after ~ only where ~ is understood.
2026-10-19 14:04:29 +02:00
9efadc7e36 gtkmain: walk GTK_LOCALEDIR through a pointer, not the literal 2026-10-19 14:03:48 +02:00
92ae960572 fontsel: clamp the typed size as an integer
MAX (0.1, ...) went into a gint, so the 0.1 was 0 anyway.
2026-10-19 14:03:48 +02:00
12ed8713a6 clipboard: get the clipboard widget only where X11 needs it 2026-10-19 14:03:48 +02:00
003f2d55e6 builderparser: write the element name test plainly 2026-10-19 14:03:48 +02:00
3c7a39dbcf gdkrgb: drop a count nothing reads 2026-10-19 14:03:01 +02:00
f212ed3dbc gdk: GDK_DEBUG=gdkrgb only for gdkrgb
The test used && where & was meant, so any debug flag made GdkRGB
verbose.
2026-10-19 14:03:00 +02:00
af5fd539a8 win32: drop gdk_win32_window_shape_combine_mask()
Nothing calls it since the client-side windows; shapes come through
the region version.
2026-10-19 14:02:42 +02:00
f668d15ceb win32: drop variables that are only assigned 2026-10-19 14:02:39 +02:00
5b5d73d1b6 win32: g_win32_check_windows_version() where GLib has it
g_win32_get_windows_version() is deprecated since GLib 2.44; older
GLib keeps using it.
2026-10-19 14:02:19 +02:00
6f9bcbb93f win32: keep clipboard text as gchar 2026-10-19 14:02:18 +02:00
80f23332f9 win32: tablet coordinates from the axis minimum, as on X11
x_min and y_min were read but not used, so a tablet whose axes don't
start at 0 was off by that much.
2026-10-19 14:02:18 +02:00