gtk4.git
2 years agoMerge branch 'wip/corey/listitemleak' into 'main'
Emmanuele Bassi [Thu, 6 Jul 2023 23:57:16 +0000 (23:57 +0000)]
Merge branch 'wip/corey/listitemleak' into 'main'

gtklistitemmanager: Stop leaking item

Closes #5940

See merge request GNOME/gtk!6171

2 years agogtklistitemmanager: Stop leaking item
Corey Berla [Thu, 6 Jul 2023 23:24:29 +0000 (16:24 -0700)]
gtklistitemmanager: Stop leaking item

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5940
2 years agoUpdate Hebrew translation
Yosef Or Boczko [Thu, 6 Jul 2023 09:38:02 +0000 (09:38 +0000)]
Update Hebrew translation

2 years agoMerge branch 'wip/carlosg/switch-stylus-buttons' into 'main'
Matthias Clasen [Wed, 5 Jul 2023 23:38:38 +0000 (23:38 +0000)]
Merge branch 'wip/carlosg/switch-stylus-buttons' into 'main'

gdk/wayland: Switch behavior of BTN_STYLUS/STYLUS2 as middle/right click

Closes #5935

See merge request GNOME/gtk!6168

2 years agogdk/wayland: Switch behavior of BTN_STYLUS/STYLUS2 as middle/right click
Carlos Garnacho [Wed, 5 Jul 2023 14:24:03 +0000 (16:24 +0200)]
gdk/wayland: Switch behavior of BTN_STYLUS/STYLUS2 as middle/right click

This mapping of stylus evdev input event codes into GDK button numbers
makes gdk/wayland inconsistent with gdk/x11, so depending on the backend
the same button middle-click pastes or right-click pops up menus.

Make the wayland backend consistent with X11, so that a GNOME wayland
session gets these buttons consistently mapped across all kinds of
clients.

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5935
2 years agoGdkTexture: Don't mention private new_from_surface
Daniel Boles [Wed, 5 Jul 2023 11:07:33 +0000 (12:07 +0100)]
GdkTexture: Don't mention private new_from_surface

The stuff about Cairo Surfaces is in gdktextureprivate.h, & so end users
will not be able to use them; we shouldn't confuse by implying they can.

2 years agodocs/list-widget: links, DirList, correct Sections
Daniel Boles [Wed, 5 Jul 2023 11:01:43 +0000 (12:01 +0100)]
docs/list-widget: links, DirList, correct Sections

* Add links to various symbols.
* Mention DirectoryList in the "ready-made choices available" section.
* Don't say that GridView can display headers: it makes no attempt to.

2 years agoMerge branch 'ebassi/issue-5934' into 'main'
Matthias Clasen [Wed, 5 Jul 2023 10:57:45 +0000 (10:57 +0000)]
Merge branch 'ebassi/issue-5934' into 'main'

Lower the Python requirement

Closes #5934

See merge request GNOME/gtk!6167

2 years agoDo not use bleeding edge Python
Emmanuele Bassi [Wed, 5 Jul 2023 09:13:47 +0000 (10:13 +0100)]
Do not use bleeding edge Python

The match operator was added in Python 3.10, which is a bit too new for
some downstreams.

While at it, let's fix the flake8 errors and warnings.

Fixes: #5934
2 years agoAdd flake8 configuration file
Emmanuele Bassi [Wed, 5 Jul 2023 09:12:20 +0000 (10:12 +0100)]
Add flake8 configuration file

Ignore long lines; most of our Python scripts generate code or other
types of files, which makes long lines a necessity.

We should validate all our Python script in our CI as well.

2 years agoAlertDialog: Remove spurious/unmatched backtick
Daniel Boles [Tue, 4 Jul 2023 21:42:50 +0000 (22:42 +0100)]
AlertDialog: Remove spurious/unmatched backtick

2 years agoListBase: Fix a typo
Daniel Boles [Tue, 4 Jul 2023 18:44:56 +0000 (19:44 +0100)]
ListBase: Fix a typo

2 years agoMerge branch 'update-uac-script-format' into 'main'
Matthias Clasen [Mon, 3 Jul 2023 23:37:36 +0000 (23:37 +0000)]
Merge branch 'update-uac-script-format' into 'main'

tools/generate-uac-manifest.py: Fix formatting (unify with copy in GLib)

See merge request GNOME/gtk!6164

2 years agoMerge branch 'wip/otte/for-main' into 'main'
Benjamin Otte [Mon, 3 Jul 2023 20:40:30 +0000 (20:40 +0000)]
Merge branch 'wip/otte/for-main' into 'main'

gsk: Catch values < 0 before bad things happen

See merge request GNOME/gtk!6165

2 years agotestsuite: Add a test for mask out of bounds effects
Benjamin Otte [Mon, 3 Jul 2023 18:51:51 +0000 (20:51 +0200)]
testsuite: Add a test for mask out of bounds effects

Inverted alpha masks have an effect on the source, even if the mask
doesn't cover the source at all - or worse, is completely clipped out.

The GL renderer handles this fine, but Cairo and Vulkan had
optimizations that got this wrong.

2 years agogsk: Fix luminance in Cairo and GL renderer
Benjamin Otte [Mon, 3 Jul 2023 18:45:53 +0000 (20:45 +0200)]
gsk: Fix luminance in Cairo and GL renderer

In particular, fix the combination of luminance and alpha. We want to do
  mask = luminance * alpha
and for inverted
  mask = (1.0 - luminance) * alpha
so add a test that makes sure we do that and then fix the code and
existing tests to conform to it.

2 years agorendernode: Work around a Cairo bug
Benjamin Otte [Mon, 3 Jul 2023 05:14:53 +0000 (07:14 +0200)]
rendernode: Work around a Cairo bug

When color-matrix modifying a clear surface, the surface would remain
clear according to Cairo.

That's very unfortunate when we prepare a mask for inverted-alpha
masking.

2 years agobuild: Include the right things
Benjamin Otte [Mon, 3 Jul 2023 02:45:20 +0000 (04:45 +0200)]
build: Include the right things

If we build our own targets, we need to include those.

This is only relevant when adding new shaders because meson will
complain that the (unused) sources don't exist as it tries to include
those.
And that will make the build.ninja file not be generated which would
have build those shaders and would have allowed to copy them into the
sources.

Note that this makes builds with glslc not care about all the shader
files being included with the sources, but we have CI to check that.

2 years agorendernode: Mask nodes with different modes are different
Benjamin Otte [Mon, 3 Jul 2023 02:44:25 +0000 (04:44 +0200)]
rendernode: Mask nodes with different modes are different

So treat them as such.

Fixes the node editor not updating when I edit the mask mode.

2 years agogsk: Catch values < 0 before bad things happen
Benjamin Otte [Sun, 2 Jul 2023 04:28:29 +0000 (06:28 +0200)]
gsk: Catch values < 0 before bad things happen

In particular, catch radius values being < 0 by return_if_fail()ing in
the rendernode creation code, and by erroring out in the rendernode
parser.

I try too much dumb stuff in the node editor.

2 years agoglcontext: Fix typo in Apple extension name
Benjamin Otte [Sat, 1 Jul 2023 20:37:05 +0000 (22:37 +0200)]
glcontext: Fix typo in Apple extension name

2 years agoPost-release version bump
Matthias Clasen [Mon, 3 Jul 2023 18:56:49 +0000 (14:56 -0400)]
Post-release version bump

2 years ago4.11.4
Matthias Clasen [Mon, 3 Jul 2023 18:12:31 +0000 (14:12 -0400)]
4.11.4

2 years agotools/generate-uac-manifest.py: Fix formatting
Chun-wei Fan [Mon, 3 Jul 2023 04:42:42 +0000 (12:42 +0800)]
tools/generate-uac-manifest.py: Fix formatting

As this script is now also used in GLib, unify the formatting between
GLib and GTK. Make the formatting of the script conformant to the
Black[1] tool, as GLib requires, and add a copyright header to this
script.

[1]: https://black.readthedocs.io/en/stable/, see also
$(glibsrcroot)/.gitlab-ci/run-bash.sh

2 years agoMerge branch 'fix_atcontext_refleaks' into 'main'
Matthias Clasen [Sat, 1 Jul 2023 18:06:19 +0000 (18:06 +0000)]
Merge branch 'fix_atcontext_refleaks' into 'main'

a11y: Fix some GtkATContext reference leaks

See merge request GNOME/gtk!6160

2 years agoa11y: Fix some GtkATContext reference leaks
Barnabás Pőcze [Fri, 30 Jun 2023 04:27:35 +0000 (06:27 +0200)]
a11y: Fix some GtkATContext reference leaks

`gtk_accessible_get_at_context()` is transfer-full, so the returned
reference needs to be dropped. This was missing in a couple places.

2 years agoMerge branch 'gdk-win32-input-fixes' into 'main'
Chun-wei Fan [Fri, 30 Jun 2023 04:33:08 +0000 (04:33 +0000)]
Merge branch 'gdk-win32-input-fixes' into 'main'

GdkWin32 input fixes

Closes #5877

See merge request GNOME/gtk!6131

2 years agoMerge branch 'wip/chergert/map-as-sectionmodel' into 'main'
Matthias Clasen [Fri, 30 Jun 2023 01:50:07 +0000 (01:50 +0000)]
Merge branch 'wip/chergert/map-as-sectionmodel' into 'main'

maplistmodel: implement GtkSectionModel

See merge request GNOME/gtk!6154

2 years agoAdd section model tests for GtkMapListModel
Matthias Clasen [Fri, 30 Jun 2023 01:30:11 +0000 (21:30 -0400)]
Add section model tests for GtkMapListModel

2 years agomaplistmodel: Handle the ::sections-changed signal
Matthias Clasen [Fri, 30 Jun 2023 00:51:26 +0000 (20:51 -0400)]
maplistmodel: Handle the ::sections-changed signal

Wrapper section models need to listen to and pass
on the ::sections-changed signal from the underlying
model.

2 years agoImage: Fix missing closing backtick
Daniel Boles [Thu, 29 Jun 2023 13:33:29 +0000 (14:33 +0100)]
Image: Fix missing closing backtick

2 years agoMerge branch 'dboles/gtk-demo_dnd_dark' into 'main'
Matthias Clasen [Thu, 29 Jun 2023 10:26:41 +0000 (10:26 +0000)]
Merge branch 'dboles/gtk-demo_dnd_dark' into 'main'

gtk-demo/dnd: Fix, generalise detecting dark theme

See merge request GNOME/gtk!6157

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Wed, 28 Jun 2023 23:31:41 +0000 (23:31 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

build: Try harder to work with nongnu ld

See merge request GNOME/gtk!6159

2 years agobuild: Try harder to work with nongnu ld
Matthias Clasen [Wed, 28 Jun 2023 20:54:34 +0000 (16:54 -0400)]
build: Try harder to work with nongnu ld

Only try to be fast with gnu ld.

2 years agogtk-demo/dnd: Fix, generalise detecting dark theme
Daniel Boles [Wed, 28 Jun 2023 13:40:06 +0000 (14:40 +0100)]
gtk-demo/dnd: Fix, generalise detecting dark theme

Our default theme is now Default, not Adwaita, & HighContrastInverse was
renamed to Default-hc. So these checks did not work anymore. Rather than
hard-coding the new names, & possibly running into the same issue again,
we can just look for the convention of appending -dark to the theme name
and/or the Settings:prefer-dark-theme prop. The latter, we can & likely
SHOULD also apply to all themes - not just ours as before. We also check
for the :dark suffix as that means the theme variant - & before checking
GtkSettings check the GTK_THEME env var, just as GtkSettings itself does

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Wed, 28 Jun 2023 12:06:49 +0000 (12:06 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

build: Move objcopy checks to one place

Closes #5672

See merge request GNOME/gtk!6156

2 years agobuild: Look for ld.bfd
Matthias Clasen [Wed, 28 Jun 2023 11:12:07 +0000 (07:12 -0400)]
build: Look for ld.bfd

The objcopy+ld approach to fast resource building
relies on behavior that is specific to the binutils
linker, and does not work with the llvm one.

Therefore, check for ld.bfd. We still fall back
to trying with just ld, since I'm not 100% sure
if binutils unconditionally installs ld.bfd.

Fixes: #5672
2 years agobuild: Move objcopy checks to one place
Matthias Clasen [Wed, 28 Jun 2023 11:11:01 +0000 (07:11 -0400)]
build: Move objcopy checks to one place

We were doing the same thing in three places.
Move it to the toplevel meson.build, so we
can change it in one place.

2 years agoUpdates
Matthias Clasen [Wed, 28 Jun 2023 10:47:32 +0000 (06:47 -0400)]
Updates

2 years agoMerge branch 'fix_dropdown_set_expression' into 'main'
Matthias Clasen [Wed, 28 Jun 2023 09:57:04 +0000 (09:57 +0000)]
Merge branch 'fix_dropdown_set_expression' into 'main'

GtkDropDown: Force redisplay of the drop-down items after expression change

See merge request GNOME/gtk!6145

2 years agodropdown: Handle expression changes
Lukáš Tyrychtr [Mon, 26 Jun 2023 13:45:48 +0000 (15:45 +0200)]
dropdown: Handle expression changes

The expression is used by the default factory, so we
need to track whether we are using the default factory
and recreate it if the expression changes.

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Wed, 28 Jun 2023 02:42:47 +0000 (02:42 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

Plug a memory leak in gsk_render_node_serialize

See merge request GNOME/gtk!6155

2 years agoci: Ignore more leaks in dependencies
Matthias Clasen [Wed, 28 Jun 2023 02:08:22 +0000 (22:08 -0400)]
ci: Ignore more leaks in dependencies

libxkbcommon shows up quite a bit in leak sanitizer
reports. Ignore it.

2 years agogsk: Plug a memory leak in mask node fallback
Matthias Clasen [Wed, 28 Jun 2023 01:54:15 +0000 (21:54 -0400)]
gsk: Plug a memory leak in mask node fallback

We were forgetting to free the mask pattern.
Found by asan.

2 years agogsk: Plug a memory leak in the gl renderer
Matthias Clasen [Wed, 28 Jun 2023 01:52:08 +0000 (21:52 -0400)]
gsk: Plug a memory leak in the gl renderer

Found by asan.

2 years agoPlug a memory leak in gsk tests
Matthias Clasen [Wed, 28 Jun 2023 01:45:24 +0000 (21:45 -0400)]
Plug a memory leak in gsk tests

Pointed out by asan.

2 years agoPlug a memory leak in gsk_render_node_serialize
Matthias Clasen [Wed, 28 Jun 2023 01:40:22 +0000 (21:40 -0400)]
Plug a memory leak in gsk_render_node_serialize

This was introduced in 0d6a6a5997d with named
textures.

2 years agomaplistmodel: implement GtkSectionModel
Christian Hergert [Wed, 28 Jun 2023 01:08:20 +0000 (18:08 -0700)]
maplistmodel: implement GtkSectionModel

This just wraps the underlying GListModel if it is a GtkSectionModel.

2 years agoMerge branch 'dboles/issue5922-DropTarget-reject-enter-critical' into 'main'
Benjamin Otte [Tue, 27 Jun 2023 21:30:03 +0000 (21:30 +0000)]
Merge branch 'dboles/issue5922-DropTarget-reject-enter-critical' into 'main'

DropTarget: Fix critical if `reject()` drop before `::enter`

Closes #5922

See merge request GNOME/gtk!6152

2 years agoDropTarget: Fix critical if reject drop pre-enter
Daniel Boles [Tue, 27 Jun 2023 20:03:10 +0000 (21:03 +0100)]
DropTarget: Fix critical if reject drop pre-enter

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5922

The docs of `Gtk.DropTarget::accept` say this:
> If the decision whether the drop will be accepted or rejected depends
> on the data, [`::accept`] should return `TRUE`, [`:preload`] should be
> set and the value should be inspected via the `::notify:value` signal,
> calling `gtk_drop_target_reject()` if required.

But this pattern causes a CRITICAL, given these steps:
* Create a `DragSource` and `DropTarget`
* Keep the default `::accept` handler and set `:preload` to `TRUE`
* Connect to `notify::value` and therein call `DropTarget.reject()`
* CRITICAL at `DropTarget.enter()`→`Drop.get_actions()` on NULL instance

We should let the documented case work without a CRITICAL or worse, null
deref. And per @otte on the bug, we should bail earlier before `::enter`
& setting `GTK_STATE_FLAG_DROP_ACTIVE`; neither should occur if rejected

This fixes that, by checking after `start_drop()` when notifications are
thawed, whether any handler has `reject()`ed & set our `drop` to `NULL`.

2 years agoDropTarget: Fix `if` block indented 1 step too far
Daniel Boles [Tue, 27 Jun 2023 08:54:52 +0000 (09:54 +0100)]
DropTarget: Fix `if` block indented 1 step too far

2 years agoMerge branch 'fix-asan-ifunc' into 'main'
Matthias Clasen [Tue, 27 Jun 2023 19:55:28 +0000 (19:55 +0000)]
Merge branch 'fix-asan-ifunc' into 'main'

Fix fp16 with asan

See merge request GNOME/gtk!6153

2 years agoFix fp16 with asan
Matthias Clasen [Tue, 27 Jun 2023 19:16:12 +0000 (15:16 -0400)]
Fix fp16 with asan

The IFUNC resolvers that we are using here get
run early, before asan had a chance to set up its
plumbing, and therefore things go badly if they
are compiled with asan. Turning it off makes things
work again.

The gcc bug tracking this problem:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110442

Thanks to Jakub Jelinek and Florian Weimer for
analyzing this and recommending the workaround.

2 years agoMerge branch 'wip/sadiq/fix-use-after-free' into 'main'
Matthias Clasen [Tue, 27 Jun 2023 18:46:28 +0000 (18:46 +0000)]
Merge branch 'wip/sadiq/fix-use-after-free' into 'main'

gldriver: Fix a possible use-after-free

See merge request GNOME/gtk!6151

2 years agogldriver: Fix a possible use-after-free
Mohammed Sadiq [Mon, 26 Jun 2023 02:35:52 +0000 (08:05 +0530)]
gldriver: Fix a possible use-after-free

g_hash_table_insert() frees the given key if it already exists
in the hashtable.  But since we use the same pointer in the
following line, it will result in use-after-free.

So instead, insert the key only if it doesn't exist.

2 years agoMerge branch 'wip/otte/for-vulkan' into 'main'
Benjamin Otte [Tue, 27 Jun 2023 16:20:29 +0000 (16:20 +0000)]
Merge branch 'wip/otte/for-vulkan' into 'main'

vulkan: Generate vertex array headers from shaders

See merge request GNOME/gtk!6149

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Tue, 27 Jun 2023 11:24:08 +0000 (11:24 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

gtk4-builder-tool: Fix naming

See merge request GNOME/gtk!6150

2 years agogtk4-builder-tool: Fix naming
Matthias Clasen [Tue, 27 Jun 2023 11:09:04 +0000 (07:09 -0400)]
gtk4-builder-tool: Fix naming

We install the tool as gtk4-builder-tool, so that
is what it should call itself.

String change.

2 years agovulkan: Generate vertex array headers from shaders
Benjamin Otte [Tue, 27 Jun 2023 04:45:31 +0000 (06:45 +0200)]
vulkan: Generate vertex array headers from shaders

The script is pretty dumb but it does its job.

2 years agovulkan: Rename crossfade => cross-fade
Benjamin Otte [Tue, 27 Jun 2023 04:28:52 +0000 (06:28 +0200)]
vulkan: Rename crossfade => cross-fade

Preparation for the future.

2 years agovulkan: Rename blendmode to blend-mode
Benjamin Otte [Tue, 27 Jun 2023 04:05:33 +0000 (06:05 +0200)]
vulkan: Rename blendmode to blend-mode

Preparation for future changes, nothing to see here.

2 years agoMerge branch 'wip/otte/vulkan-for-main' into 'main'
Benjamin Otte [Mon, 26 Jun 2023 18:52:48 +0000 (18:52 +0000)]
Merge branch 'wip/otte/vulkan-for-main' into 'main'

vulkan: Add a pipeline cache

See merge request GNOME/gtk!6148

2 years agovulkan: Add a pipeline cache
Benjamin Otte [Mon, 26 Jun 2023 03:10:16 +0000 (05:10 +0200)]
vulkan: Add a pipeline cache

Make the display handle the cache, because we only need one.

We store the cache in
  $CACHE_DIR/gtk-4.0/vulkan-pipeline-cache/$UUID.$VERSION
so we regenerate caches for each different device (different UUID) and
each different driver version.

We also keep track of the etag of the cache file, so if 2 different
applications update the cache, we can detect that.
Vulkan allows merging caches, so the 2nd app reloads the new cache file
and merges it into its cache before saving.

2 years agoMerge branch 'main' into 'main'
Matthias Clasen [Mon, 26 Jun 2023 18:18:14 +0000 (18:18 +0000)]
Merge branch 'main' into 'main'

Add settable search match mode in dropdown

See merge request GNOME/gtk!6146

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Mon, 26 Jun 2023 15:38:32 +0000 (15:38 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

buildertool: Make render an alias for screenshot

See merge request GNOME/gtk!6147

2 years agobuildertool: Make render an alias for screenshot
Matthias Clasen [Mon, 26 Jun 2023 14:57:11 +0000 (10:57 -0400)]
buildertool: Make render an alias for screenshot

Its a more neutral name and will align better with
other tools.

2 years agoAdd settable search match mode in dropdown
al_SeveR [Mon, 26 Jun 2023 14:14:39 +0000 (14:14 +0000)]
Add settable search match mode in dropdown

2 years agoUpdate Brazilian Portuguese translation
Leônidas Araújo [Mon, 26 Jun 2023 13:08:44 +0000 (13:08 +0000)]
Update Brazilian Portuguese translation

(cherry picked from commit 98a2aae5ac273f5c37a3edbc2d7bbad62ecb62f7)

2 years agoGtkText: Link to descendents/`monospace` CSS nodes
Daniel Boles [Mon, 26 Jun 2023 12:04:43 +0000 (13:04 +0100)]
GtkText: Link to descendents/`monospace` CSS nodes

Change the descendent classes from `monospace`-without-links to links.
Add `monospace` around the names of CSS nodes and classes for clarity.

2 years agowidget-factory: Set a11y labels on scale buttons
Matthias Clasen [Mon, 26 Jun 2023 02:28:23 +0000 (22:28 -0400)]
widget-factory: Set a11y labels on scale buttons

Just to check that this works now.

2 years agoUpdate Georgian translation
Ekaterine Papava [Sun, 25 Jun 2023 13:39:03 +0000 (13:39 +0000)]
Update Georgian translation

2 years agoMerge branch 'gtkstack_fix_pages_param_check' into 'main'
Matthias Clasen [Sat, 24 Jun 2023 12:08:18 +0000 (12:08 +0000)]
Merge branch 'gtkstack_fix_pages_param_check' into 'main'

stack: fix pages list bounds check

See merge request GNOME/gtk!6141

2 years agostack: fix pages list bounds check
G.Willems [Sat, 24 Jun 2023 01:05:37 +0000 (03:05 +0200)]
stack: fix pages list bounds check

Fix integer underflow when children->len is 0.
Add missing bounds check in select_item()

2 years agoMerge branch 'ebassi/builder-docs' into 'main'
Matthias Clasen [Fri, 23 Jun 2023 23:45:05 +0000 (23:45 +0000)]
Merge branch 'ebassi/builder-docs' into 'main'

docs: Clean up section on UI definitions

See merge request GNOME/gtk!6139

2 years agoMerge branch 'wip/chergert/gdatetime-from-gtkbuilder' into 'main'
Matthias Clasen [Fri, 23 Jun 2023 23:43:28 +0000 (23:43 +0000)]
Merge branch 'wip/chergert/gdatetime-from-gtkbuilder' into 'main'

builder: add support for parsing GDateTime

See merge request GNOME/gtk!6140

2 years agobuilder: add support for parsing GDateTime
Christian Hergert [Fri, 23 Jun 2023 21:11:37 +0000 (14:11 -0700)]
builder: add support for parsing GDateTime

This will parse a <property/> containing the ISO 8601 format for a date
for use in GDateTime properties. For example:

  <property name="sampled-at">2023-06-23T00:00:00.00</property>

2 years agodocs: Clean up section on UI definitions
Emmanuele Bassi [Fri, 23 Jun 2023 13:16:44 +0000 (14:16 +0100)]
docs: Clean up section on UI definitions

The current documentation is narrative, but it lacks examples and proper
formatting, which makes it harder to read and visually scan.

Let's split off paragraphs and sections, so they can be easily linkend,
and add a few examples for each description.

2 years agodocs/ref/gtk/running: Mention GDK_DEBUG=no-portals
Daniel Boles [Fri, 23 Jun 2023 13:24:47 +0000 (14:24 +0100)]
docs/ref/gtk/running: Mention GDK_DEBUG=no-portals

It was omitted from !5336

2 years agoFileDialog: Fix typos of "inital" to "initial"
Daniel Boles [Fri, 23 Jun 2023 12:50:53 +0000 (13:50 +0100)]
FileDialog: Fix typos of "inital" to "initial"

2 years agoMerge branch 'dboles/FileDialog_initial-folder_from_initial-file' into 'main'
Matthias Clasen [Fri, 23 Jun 2023 01:14:15 +0000 (01:14 +0000)]
Merge branch 'dboles/FileDialog_initial-folder_from_initial-file' into 'main'

Fix FileDialog: initial-file doesnʼt set initial-folder

See merge request GNOME/gtk!6137

2 years agoMerge branch 'always-more-a11y-fixes' into 'main'
Matthias Clasen [Fri, 23 Jun 2023 01:06:57 +0000 (01:06 +0000)]
Merge branch 'always-more-a11y-fixes' into 'main'

scalebutton: Use the group role

See merge request GNOME/gtk!6138

2 years agoa11y: Extend the nested button hack to volume buttons
Matthias Clasen [Thu, 22 Jun 2023 22:37:10 +0000 (18:37 -0400)]
a11y: Extend the nested button hack to volume buttons

2 years agoscalebutton: Use the group role
Matthias Clasen [Thu, 22 Jun 2023 22:36:39 +0000 (18:36 -0400)]
scalebutton: Use the group role

This is needed for accessible labels to work.

2 years agoFileDialog: initial-file didnʼt set initial-folder
Daniel Boles [Thu, 22 Jun 2023 21:33:14 +0000 (22:33 +0100)]
FileDialog: initial-file didnʼt set initial-folder

We always set :initial-folder to NULL and then notified about that,
instead of setting it to the folder of the :initial-file as we say.

2 years agoUpdate Catalan translation
Jordi Mas [Thu, 22 Jun 2023 19:00:28 +0000 (21:00 +0200)]
Update Catalan translation

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Thu, 22 Jun 2023 02:40:08 +0000 (02:40 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

docs: Mention GtkAccessibleRange

See merge request GNOME/gtk!6136

2 years agodocs: Mention GtkAccessibleRange
Matthias Clasen [Thu, 22 Jun 2023 01:35:27 +0000 (21:35 -0400)]
docs: Mention GtkAccessibleRange

In the accessibility docs about custom widgets,
mention GtkAccessibleRange as the best way to
implement custom range widgets.

2 years agoMerge branch 'more-a11y-fixes' into 'main'
Matthias Clasen [Thu, 22 Jun 2023 00:47:03 +0000 (00:47 +0000)]
Merge branch 'more-a11y-fixes' into 'main'

widget: Don't let abstract role slip through

See merge request GNOME/gtk!6135

2 years agoAdd another a11y test
Matthias Clasen [Wed, 21 Jun 2023 20:06:39 +0000 (16:06 -0400)]
Add another a11y test

This one catches the lingering 'widget' role
that only happens when widgets are realized
and rooted.

2 years agoa11y: Use group role for color and font buttons
Matthias Clasen [Wed, 21 Jun 2023 20:16:11 +0000 (16:16 -0400)]
a11y: Use group role for color and font buttons

This is needed since generic does not allow naming.

2 years agowidget: Don't let abstract role slip through
Matthias Clasen [Wed, 21 Jun 2023 20:05:29 +0000 (16:05 -0400)]
widget: Don't let abstract role slip through

When there isn't an accessible role set on the
instance or in class_init, we want to default
to 'generic'. There was one place where we
failed to do so.

2 years agoCosmetics: typo fix
Matthias Clasen [Wed, 21 Jun 2023 19:39:28 +0000 (15:39 -0400)]
Cosmetics: typo fix

2 years agoSettings: prop typo => "No description available."
Daniel Boles [Wed, 21 Jun 2023 19:48:17 +0000 (20:48 +0100)]
Settings: prop typo => "No description available."

Fix the typo so that we'll actually get documentation for
gtk-entry-select-on-focus.

2 years agoMerge branch 'more-a11y-fixes' into 'main'
Matthias Clasen [Wed, 21 Jun 2023 18:52:35 +0000 (18:52 +0000)]
Merge branch 'more-a11y-fixes' into 'main'

a11y: Don't forget to space-separate computed names

See merge request GNOME/gtk!6134

2 years agoAdd another a11y test
Matthias Clasen [Wed, 21 Jun 2023 18:21:37 +0000 (14:21 -0400)]
Add another a11y test

Test that roles come out right for custom widgets.

2 years agoDropdown: Explicitly set a role
Matthias Clasen [Wed, 21 Jun 2023 18:17:52 +0000 (14:17 -0400)]
Dropdown: Explicitly set a role

For some reason I haven't been able to track down,
the listitemwidget comes up wit the abstract widget
role otherwise.

2 years agoaboutdialog: Fix roles one more time
Matthias Clasen [Wed, 21 Jun 2023 17:47:59 +0000 (13:47 -0400)]
aboutdialog: Fix roles one more time

We are more picky about generic, so use group.

2 years agoshortcutswindow: Fix up roles and labels again
Matthias Clasen [Wed, 21 Jun 2023 17:18:58 +0000 (13:18 -0400)]
shortcutswindow: Fix up roles and labels again

2 years agoa11y: Don't forget to space-separate computed names
Matthias Clasen [Wed, 21 Jun 2023 17:18:07 +0000 (13:18 -0400)]
a11y: Don't forget to space-separate computed names

This was overlooked in one place.

2 years agoDefine this_module with (void) argument
Luca Bacci [Wed, 21 Jun 2023 14:18:40 +0000 (16:18 +0200)]
Define this_module with (void) argument

Fixes a compiler warning about K&R (old-style) function definition