Simon McVittie [Tue, 22 Aug 2023 09:49:36 +0000 (10:49 +0100)]
tests: Accept slightly different numeric results
FLT_EPSILON is the distance between 1.0 and the next distinct floating
point number, and doesn't necessarily have anything to do with the
precision we can expect from a series of floating-point calculations.
Experimentally, 1e-6 is achievable, even on platforms with unusual
floating point implementations like i387.
Resolves: https://gitlab.gnome.org/GNOME/gtk/-/issues/6051
Bug-Debian: https://bugs.debian.org/
1050076
Signed-off-by: Simon McVittie <smcv@debian.org>
Matthias Clasen [Tue, 22 Aug 2023 12:26:22 +0000 (08:26 -0400)]
wayland: Don't assume the shell protocol
The gtk_shell proxy will be NULL if the compositor
is not gnome-shell. Handle that without crashing.
Fixes: #6048
Bilal Elmoussaoui [Mon, 21 Aug 2023 21:11:12 +0000 (21:11 +0000)]
gi: Fix missing namespace
Georges Basile Stavracas Neto [Mon, 21 Aug 2023 18:23:22 +0000 (15:23 -0300)]
ci: Limit parallel linking on Windows CI
Linking on Windows can easily run out of memory, and limiting it
to a single link operation (i.e. disabling parallelization) should
be enough to avoid this problem.
Khalid Abu Shawarib [Mon, 21 Aug 2023 17:14:59 +0000 (20:14 +0300)]
gdk/x11/clipboard: Fix Slist leak
Benjamin Otte [Fri, 18 Aug 2023 19:06:59 +0000 (21:06 +0200)]
build: Add -Woverride-init
That's a gcc warning (clang has the equivalent -Winitializer-overrides,
but that one is included in -Wall) that complains about things like:
VkOffset3D offset = { .x = pt.x, .x = pt.y, .y = 0 };
So you don't have to spend a few hours trying to understand what's going
on before realizing your copy/paste skills are substandard.
Benjamin Otte [Mon, 14 Aug 2023 03:21:06 +0000 (05:21 +0200)]
build: GSK doesn't depend on gdk-pixbuf
Benjamin Otte [Mon, 21 Aug 2023 03:14:33 +0000 (05:14 +0200)]
build: Don't use configure_file() when custom_target() works
These two files don't need to be built when configuring, they are only
needed during build.
Benjamin Otte [Mon, 21 Aug 2023 00:20:17 +0000 (02:20 +0200)]
widget: Remove unused headers from gtkwidget.h
... and put them back in places where they are needed.
Sergey Bugaev [Fri, 18 Aug 2023 08:07:35 +0000 (11:07 +0300)]
paintable: Implement gdk_paintable_default_get_current_image ()
Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
G.Willems [Thu, 17 Aug 2023 20:26:00 +0000 (22:26 +0200)]
gtktexthistory: restore 'modified' flag on redo
When redoing a history entry, its `is_modified` flag is not
reflected to the history state tracker. So GtkTextBuffers may
expose a modified=FALSE status, despite a change was actually
applied to the buffer.
For the undo case, an `is_modified_set` flag was set on the last
entry of the undo queue when a change of the modified state of
the history is requested. This commit does the same on the first
entry of the redo queue.
Closes #5777
Daniel Boles [Thu, 17 Aug 2023 09:52:21 +0000 (10:52 +0100)]
PopoverMenu: Make :flags a property for use in UI…
…files, or other cases other than calling new_from_model_full(), which
generally makes it far easier to experiment with the effect of flags,
including by changing the value of the property in the Inspector.
fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/6030#note_1818229
Daniel Boles [Wed, 16 Aug 2023 16:11:45 +0000 (17:11 +0100)]
Popover: Fix & add to CSS nodes documentation
* The `.background` class gets put on `popover`, not `content`
* Use backticks to style node and class names with monospace
* Link to GtkPopoverMenu
* Add to PopoverMenu a bit outlining how items and sections look in CSS.
Matthias Clasen [Wed, 16 Aug 2023 13:43:34 +0000 (09:43 -0400)]
build: Drop some unused variables
We are not using gtk_private_packages at all,
so drop it.
Alexandros Theodotou [Wed, 16 Aug 2023 11:09:15 +0000 (20:09 +0900)]
gsk: Update docs for gtk_snapshot_append_layout
Mention how to get the current theme's foreground color.
Sergey Bugaev [Tue, 15 Aug 2023 08:28:43 +0000 (11:28 +0300)]
rendernode, snapshot: Slightly expand color matrix docs
Based on reverse engineering the color node and contrary to my
expectations, the matrix/offset is expressed in, and applied to,
unpremultiplied colors. The colors are being explicitly
unpremultiplied, transformed according to the matrix/offset, and
premultiplied back (see color_matrix.glsl). The matrix is getting
transposed.
Also, copy the same blurb to the corresponding GtkSnapshot function.
Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
Sergey Bugaev [Tue, 15 Aug 2023 08:03:25 +0000 (11:03 +0300)]
snapshot: Fix merging color matrix nodes
The code was appliying the matrices in the wrong order: we have to apply
the inner node's matrix first, and the outer one second. Due to the
matrices being implicitly transposed, the matrix multiplication was done
in the right order, yet the wrong matrix was being mutliplied by the
wrong offset vector.
To make the code a little easier to follow, create explicit variables
for the resulting matrix and offset (instead of reusing matrix2 and
offset2), and fix & expand the comment to document how matrix
transposition factors into this.
Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
Philip Chimento [Wed, 16 Aug 2023 05:30:27 +0000 (22:30 -0700)]
introspection: Remove 'caller-allocates' from POD types
The (out caller-allocates) and (out callee-allocates) annotations are
meant for structured or pointer types. Plain old data types are just
regular out parameters and don't need the annotation about who allocates
them.
See glib!2005, gjs#570
Xavier Claessens [Wed, 16 Aug 2023 01:17:23 +0000 (21:17 -0400)]
meson: Add x11_dep to gtk4-x11 requires
Xavier Claessens [Tue, 15 Aug 2023 17:35:46 +0000 (13:35 -0400)]
meson: Add wayland-client to gtk4-wayland requires
Daniel Boles [Tue, 15 Aug 2023 09:47:30 +0000 (10:47 +0100)]
SignalListItemFactory: small doc grammar+sense fix
* "to to" => "to"
* "a object" => "an object"
* "its new prop is about to be unset" => "its prop is about to be unset"
Alice Mikhaylenko [Mon, 14 Aug 2023 10:24:06 +0000 (14:24 +0400)]
menubutton: Fix focus on the internal gizmo
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/6025
Daniel Boles [Mon, 14 Aug 2023 09:48:26 +0000 (10:48 +0100)]
Inspector: Fix ! flash on select widget @ obj tree
Widgets are flashed by the window when it receives Tree::object-selected
- but we were emitting said signal from select_object(), i.e. if we were
made to select by an external caller. We should also emit it if the user
interactively selects an item, so the window receives+flashes the widget
fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/6022
Joshua Lee [Sun, 13 Aug 2023 13:55:22 +0000 (14:55 +0100)]
fontdialogbutton: Make activatable
Joshua Lee [Tue, 8 Aug 2023 13:50:28 +0000 (14:50 +0100)]
colordialogbutton: Make activatable
Matthias Clasen [Sun, 13 Aug 2023 13:31:42 +0000 (09:31 -0400)]
text: Track user changes better
Make all the action signal handlers call
begin/end_change(), so we can rely on
change_count being >0 to check later if
an action is user-initiated or programmatic.
Fixes: #6018
Benjamin Otte [Sat, 12 Aug 2023 20:17:29 +0000 (22:17 +0200)]
gl: Pass swizzle array directly
There's no need to pass pointers to arrays, as arrays are already
pointers.
Benjamin Otte [Sat, 12 Aug 2023 20:14:11 +0000 (22:14 +0200)]
columnview: Fix refcounting woes
The new code did not deal with the GtkScrollInfo properly.
Related: #6002
Benjamin Otte [Sat, 12 Aug 2023 20:13:07 +0000 (22:13 +0200)]
gdkcontext: Make has_unpack_subimage() do the version check
Makes the code look simpler when we actually use that function.
Benjamin Otte [Mon, 7 Aug 2023 23:37:18 +0000 (01:37 +0200)]
treeviewcolumn: Set ascending class for ascending order
The alternative button order confused the code and so the "ascending"
class was set for descending order by default, not when alternate order
is set.
Qiu Wenbo [Fri, 11 Aug 2023 07:58:06 +0000 (15:58 +0800)]
macos: use NSPopUpButton for filter selection in native filechooser
On macOS 14, NSComboBox can't popup the dropdown list of filters. That
makes native filechooser on macOS completed broken. And NSComboBox is
more complex since it is a widget focused on edit capability.
NSPopUpButton is more suitable for plain selectable dropdown list.
Fixes: 4986
Signed-off-by: Qiu Wenbo <qiuwenbo@kylinos.com.cn>
Qiu Wenbo [Fri, 11 Aug 2023 07:55:08 +0000 (15:55 +0800)]
filefilter: fix UTI type conversion on macOS
GContentType on macOS switched to UTI since glib 2.51. We should not assume it as MIME type anymore.
Fixes: #4986
Signed-off-by: Qiu Wenbo <qiuwenbo@kylinos.com.cn>
Daniel Boles [Wed, 9 Aug 2023 14:34:50 +0000 (15:34 +0100)]
docs: Add/fix some links; avoid pluralisation
Appending `s` breaks the [type@NS.Object] notation, so fix that in
ListHeader. Add links to ListItem and Overlay, and avoid appending `s`
after `backtick`s just for consistency with the [type@NS.Object] issue.
Jeremy Bícha [Tue, 8 Aug 2023 21:48:35 +0000 (17:48 -0400)]
print: Update printerprivate header location for cpdb backend
This fixes the print-cpdb build option
Jeremy Bícha [Tue, 8 Aug 2023 13:47:14 +0000 (09:47 -0400)]
test-calendar: Update timezone name
Debian no longer provides the MET timezone
but instead provides geographical region and city name
Xi Ruoyao [Mon, 7 Aug 2023 10:00:34 +0000 (18:00 +0800)]
print: Revert "Start sorting apart includes" change for gtkprinteroptionprivate.h
The print backends needs the functions in gtkprinteroptionprivate.h to
be exported.
Fixes #6003.
tszymanski [Sun, 6 Aug 2023 17:26:32 +0000 (10:26 -0700)]
gtkgridview: return empty area for empty tiles during scroll
Hari Rana [Sat, 5 Aug 2023 16:25:23 +0000 (12:25 -0400)]
section-accessibility: Close tag
Matthias Clasen [Thu, 24 Aug 2023 14:14:29 +0000 (10:14 -0400)]
Post-release version bump
Matthias Clasen [Fri, 28 Jul 2023 08:25:41 +0000 (11:25 +0300)]
4.12.0
Matthias Clasen [Sat, 5 Aug 2023 03:37:05 +0000 (03:37 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
build: Rename docs build options
See merge request GNOME/gtk!6239
Matthias Clasen [Sat, 5 Aug 2023 00:47:18 +0000 (20:47 -0400)]
README: Some updates
Matthias Clasen [Sat, 5 Aug 2023 00:05:07 +0000 (20:05 -0400)]
build: Rename docs build options
Rename gtk_doc to documentation and update_screenshots
to screenshots. The old names are still accepted.
Matthias Clasen [Sat, 5 Aug 2023 02:20:38 +0000 (02:20 +0000)]
Merge branch 'wip/otte/scroll-to' into 'main'
a scroll_to() for list widgets
See merge request GNOME/gtk!6227
Benjamin Otte [Tue, 7 Mar 2023 23:53:51 +0000 (00:53 +0100)]
inspector: Use scroll_to() in the object tree search
Benjamin Otte [Tue, 7 Mar 2023 23:53:14 +0000 (00:53 +0100)]
columnview: Implement gtk_column_view_scroll_to()
It's basically the listview version, but with an (optional) column to do
cell-based scrolling/focusing.
Matthias Clasen [Thu, 25 May 2023 02:38:36 +0000 (22:38 -0400)]
Add gtk_grid_view_scroll_to
This does the same as gtk_list_view_scroll_to, just
for a grid view.
Benjamin Otte [Sat, 25 Mar 2023 23:58:20 +0000 (00:58 +0100)]
gtk-demo: Make arrowing in suggestionentry scroll the dropdown
Benjamin Otte [Tue, 7 Mar 2023 23:31:33 +0000 (00:31 +0100)]
listview: Implement gtk_list_view_scroll_to()
This adds a flags enum so we can also do select/focus at the same time.
It's implemented in GtkListBase, so adding support forgridview should be
easy.
Benjamin Otte [Wed, 8 Mar 2023 00:19:39 +0000 (01:19 +0100)]
viewport: Use gtk_viewport_scroll_to() for focus scrolling
Benjamin Otte [Tue, 7 Mar 2023 04:33:47 +0000 (05:33 +0100)]
viewport: Add gtk_viewport_scroll_to()
First implementation of GtkScrollInfo
Benjamin Otte [Tue, 7 Mar 2023 04:29:31 +0000 (05:29 +0100)]
gtk: Add GtkScrollInfo
This struct carries information about scrolling a scrollable, so that
individual scrollables can share this struct for their scrolling APIs.
For now, there's not much information here, we're still trying to cook
up an API that works well.
Matthias Clasen [Sat, 5 Aug 2023 00:20:21 +0000 (00:20 +0000)]
Merge branch 'format' into 'main'
adjustment: Properly use <code> tag
See merge request GNOME/gtk!6238
Hari Rana [Fri, 4 Aug 2023 23:50:08 +0000 (19:50 -0400)]
adjustment: Properly use <code> tag
Yuri Chornoivan [Fri, 4 Aug 2023 19:43:39 +0000 (19:43 +0000)]
Update Ukrainian translation
Matthias Clasen [Fri, 4 Aug 2023 14:57:30 +0000 (14:57 +0000)]
Merge branch 'more-deprecation-cleanup' into 'main'
Drop old style deprecation handling
See merge request GNOME/gtk!6237
Matthias Clasen [Fri, 4 Aug 2023 13:46:54 +0000 (09:46 -0400)]
examples: More deprecation cleanup
Remove GtkDialog use from bloatpad.
Matthias Clasen [Fri, 4 Aug 2023 12:38:55 +0000 (08:38 -0400)]
Drop old style deprecation handling
We don't use this anymore.
Matthias Clasen [Fri, 4 Aug 2023 12:36:38 +0000 (08:36 -0400)]
examples: Deprecation cleanup
Matthias Clasen [Fri, 4 Aug 2023 12:34:30 +0000 (12:34 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
wayland: Fix gtk-shell protocol handling
See merge request GNOME/gtk!6236
Matthias Clasen [Fri, 4 Aug 2023 11:45:59 +0000 (07:45 -0400)]
wayland: Fix gtk-shell protocol handling
The protocol spec isn't clear about the relationship
between the capability enum and the uint in the capability
event.
Fix things to use the same relationship as mutter.
Matthias Clasen [Fri, 4 Aug 2023 11:48:10 +0000 (11:48 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
build: Set the default visibility
See merge request GNOME/gtk!6235
Matthias Clasen [Fri, 4 Aug 2023 02:49:08 +0000 (22:49 -0400)]
build: Set the default visibility
While working on deprecation cleanups, I noticed
that removing GDK_DEPRECATED_IN... from headers
does not have the effect of making the symbols
disappear, since we were forgetting to set the
default visibility to hidden.
Matthias Clasen [Fri, 4 Aug 2023 09:55:51 +0000 (05:55 -0400)]
testsuite: Don't rely on default visibility
The builder test was relying on default visiblity
for non-static functions. Make it explicit that we
want to export these functions, so the test keeps
working when we change the default visibility.
Matthias Clasen [Fri, 4 Aug 2023 02:34:10 +0000 (02:34 +0000)]
Merge branch 'deprecation-cleanups' into 'main'
gtk-demo: Deprecation cleanup
See merge request GNOME/gtk!6233
Matthias Clasen [Thu, 3 Aug 2023 22:16:16 +0000 (18:16 -0400)]
constraint-editor: Deprecation cleanup
Drop all uses of deprecated API.
Matthias Clasen [Thu, 3 Aug 2023 21:27:32 +0000 (17:27 -0400)]
print-editor: Deprecation cleanup
Drop all uses of deprecated API.
Matthias Clasen [Thu, 3 Aug 2023 19:24:04 +0000 (15:24 -0400)]
gtk-demo: Deprecation cleanup
Remove many uses of deprecated api in gtk4-demo.
Remaining uses are demos of wholly deprecated objects
that will just be dropped in GTK5.
Matthias Clasen [Fri, 4 Aug 2023 01:10:09 +0000 (01:10 +0000)]
Merge branch 'wip/alice/center-layout' into 'main'
centerlayout: Fix child sizing
See merge request GNOME/gtk!6234
Alice Mikhaylenko [Fri, 4 Aug 2023 00:30:55 +0000 (04:30 +0400)]
centerlayout: Invert :shrink-center-last
Make what it does match its name.
Alice Mikhaylenko [Thu, 3 Aug 2023 21:57:57 +0000 (01:57 +0400)]
centerlayout: Fix child sizing
For some reason the start/end child size is restricted to
(width - title width) / 2. This is generally unexpected, so stop doing
that.
Artur So [Thu, 3 Aug 2023 16:06:21 +0000 (16:06 +0000)]
Update Russian translation
Matthias Clasen [Thu, 3 Aug 2023 14:39:56 +0000 (14:39 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
gtk-demo: Use GtkBuilderScope more
See merge request GNOME/gtk!6232
Matthias Clasen [Thu, 3 Aug 2023 13:43:27 +0000 (13:43 +0000)]
Merge branch 'bilelmoussaoui/gi' into 'main'
gtk: Add missing since annotations
See merge request GNOME/gtk!6231
Matthias Clasen [Wed, 2 Aug 2023 20:12:22 +0000 (20:12 +0000)]
AUTHORS: Some updates
Matthias Clasen [Wed, 2 Aug 2023 20:06:22 +0000 (20:06 +0000)]
RELEASE-HOWTO: Some updates
Matthias Clasen [Wed, 2 Aug 2023 19:32:45 +0000 (19:32 +0000)]
gtk-demo: Use GtkBuilderScope more
Under circumstances I haven't fully tracked down,
these demos refuse to run, failing to locate their
callbacks. So use the machinery we have, and set up
a GtkBuilderCScope for each of the problematic cases.
Bilal Elmoussaoui [Wed, 2 Aug 2023 18:19:23 +0000 (18:19 +0000)]
gtk: Add missing since annotations
Follow up of https://gitlab.gnome.org/GNOME/gtk/-/commit/
7f946eff0163e84e34a1880f068f7f5efb354add
Matthias Clasen [Wed, 2 Aug 2023 17:09:41 +0000 (17:09 +0000)]
Merge branch 'gdk-win32-cleanup' into 'main'
GdkWin32 cleanup
See merge request GNOME/gtk!6230
Matthias Clasen [Wed, 2 Aug 2023 16:24:46 +0000 (16:24 +0000)]
Merge branch 'cetner-layout-compute-expand' into 'main'
Fix computing expand in GtkCenterLayout
See merge request GNOME/gtk!6229
Luca Bacci [Wed, 2 Aug 2023 16:06:23 +0000 (18:06 +0200)]
GdkWin32: Remove unused members from GdkWin32Surface
Luca Bacci [Wed, 2 Aug 2023 15:23:19 +0000 (17:23 +0200)]
GdkWin32: No need to set the active keyboard layout
It's already done as part of GdkWin32Keymap initialization
(in update_keymap ())
Luca Bacci [Wed, 2 Aug 2023 15:20:12 +0000 (17:20 +0200)]
GdkWin32: Remove gdk_synchronize
Matthias Clasen [Wed, 2 Aug 2023 15:56:08 +0000 (15:56 +0000)]
Merge branch 'ebassi/hint-font-lodpi' into 'main'
Enable subpixel positioning for text only on high scaling factors
See merge request GNOME/gtk!6190
Sergey Bugaev [Wed, 2 Aug 2023 15:43:45 +0000 (18:43 +0300)]
centerlayout: Fix computing expand
It was calling get_hexpand () / get_vexpand (), which only get whether
the expand properties are set on the widget itself. Use
compute_expand (), which properly walks the widget tree and finds
whether exapnd is set on the widget or any of its descendants.
Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
Matthias Clasen [Wed, 2 Aug 2023 14:50:48 +0000 (14:50 +0000)]
reftests: Fix one reftest
The xalign property of GtkLabel defaults to 0.5,
meaning that the contents will be centered, which
is not what GtkInscription does.
Matthias Clasen [Wed, 2 Aug 2023 14:50:03 +0000 (14:50 +0000)]
label: Another tweak to wrapping handling
This fixes a few reftests that were failing after
the previous change because they ended up with x == -1.
Matthias Clasen [Wed, 2 Aug 2023 03:25:19 +0000 (03:25 +0000)]
Merge branch 'radioactiveman-main-patch-77429' into 'main'
docs: Fix typo
See merge request GNOME/gtk!6226
Thomas Lange [Tue, 1 Aug 2023 23:51:34 +0000 (23:51 +0000)]
docs: Fix typo
Matthias Clasen [Tue, 1 Aug 2023 19:52:51 +0000 (19:52 +0000)]
Merge branch 'wip/sophie-h/ask' into 'main'
filelauncher: Add 'ask' property
Closes #5942
See merge request GNOME/gtk!6225
Sophie Herold [Tue, 1 Aug 2023 12:04:31 +0000 (14:04 +0200)]
filelauncher: Add 'always-ask' property
The 'ask' property is part of the portal. It forces always asking
the user with which app to open a file.
Closes #5942
Danial Behzadi [Tue, 1 Aug 2023 05:53:37 +0000 (05:53 +0000)]
Update Persian translation
Ekaterine Papava [Tue, 1 Aug 2023 04:05:01 +0000 (04:05 +0000)]
Update Georgian translation
Benjamin Otte [Mon, 31 Jul 2023 22:52:46 +0000 (22:52 +0000)]
Merge branch 'wip/otte/vulkan-for-main' into 'main'
inspector: Make the measure map buttons work again
Closes #5992
See merge request GNOME/gtk!6223
Benjamin Otte [Mon, 31 Jul 2023 22:09:07 +0000 (00:09 +0200)]
inspector: Make the measure map buttons work again
The show/hide => set_visible() cleanups had broken things.
Fixes #5992
Benjamin Otte [Mon, 31 Jul 2023 15:14:37 +0000 (15:14 +0000)]
Merge branch 'wip/otte/vulkan-for-main' into 'main'
vulkan: Remove unused variable
See merge request GNOME/gtk!6222
Benjamin Otte [Sun, 23 Jul 2023 16:26:52 +0000 (18:26 +0200)]
vulkan: Clear Cairo surfaces on upload
The memory isn't guaranteed to be all zeroes and we don't want glitches.
Benjamin Otte [Sat, 22 Jul 2023 23:57:06 +0000 (01:57 +0200)]
vulkan: Fix a memleak
Benjamin Otte [Mon, 24 Jul 2023 03:56:47 +0000 (05:56 +0200)]
vulkan: Plug a memleak
Yay, we no longer leak swapchain images
Benjamin Otte [Sun, 30 Jul 2023 18:00:34 +0000 (20:00 +0200)]
rendernode-tool: Add another magic format
Make .svg use the Cairo renderer to save to an SVG file.
It's useful when comparing rendering behavior and times with
web browsers (as long as one is aware that browsers build a full
DOM tree out of those SVGs).