Commit Graph

66947 Commits

Author SHA1 Message Date
Timm Bäder
b1664534af gdksurface: Ensure some assumptions
Just to please scan-build
2020-10-22 17:46:34 +02:00
Timm Bäder
56e89e8d26 demos: Remove a dead assignment 2020-10-22 17:46:34 +02:00
Timm Bäder
f6ebc06767 filechooserwidget: Avoid an uninitialized value
If the operation mode is OPERATION_MODE_RECENT and we end up in the
'goto file_entry' case, we don't set info.result. Then later after
calling check_save_entry, is_empty is TRUE which causes a goto out and
here we then try to use info.result, which is uninitialized.

Initialize info.result before doing all this.

Found by scan-build
2020-10-22 17:46:33 +02:00
Timm Bäder
3db5e15bde filechooserwidget: gtk_widget_get_root() can return NULL 2020-10-22 17:46:33 +02:00
Timm Bäder
a2291fb989 showrendernode: Pass error to deserialize() 2020-10-22 17:46:33 +02:00
Timm Bäder
af97f19926 textview: Respect return value of get_text_surface_coords() 2020-10-22 17:46:33 +02:00
Timm Bäder
0dae1f48fd listbox test: Only compare values for rows we have
This shouldn't happen, but don't compare 100 values if we didnt' get 100
values from the listbox.
2020-10-22 17:46:33 +02:00
Timm Bäder
c7dbb8ef91 label: Plug a potential memory leak
This only happens in error cases so pretty insignificant.

Found by scan-build
2020-10-22 17:46:33 +02:00
Timm Bäder
3a1e019e83 print-editor: Fix a wrong comparison
If error is NULL, replacing the file contents worked and we don't
show the error dialog. The previous version pretty explicitly
dereferenced a NULL pointer by first ensuring that error is NULL and
then accessing error->message.

Found by scan-build
2020-10-22 17:46:33 +02:00
Matthias Clasen
a923be95b3 Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

See merge request GNOME/gtk!2736
2020-10-22 14:52:57 +00:00
Matthias Clasen
a11ab6c995 a11y: Handle stack case for addition/removal
Since we interpose stack pages as non-widget accessibles,
we need to tweak the signals we emit when their corresponding
widgets get added or removed.
2020-10-22 10:06:06 -04:00
Matthias Clasen
1d802881eb stack: Change ordering for removal
Unparent the child widget before tearing down its
stack page. This is necessary so a11y can still access
the stack page accessible to emit change notification
when it learns that the child is removed.
2020-10-22 10:05:17 -04:00
Emmanuele Bassi
6c796cf201 docs: Fix cross-linking for GIO types 2020-10-22 13:33:49 +01:00
Matthias Clasen
44c6619660 gtk-demo: Speed up image demo
The progressive loading demo here was so slow as to appear
broken. Make it faster, and ensure that it updates regularly.
2020-10-22 07:51:44 -04:00
Matthias Clasen
ef7499a31b gtk-demo: Add alternative text to a GtkPicture
This lets us text GtkPicture a11y support.
2020-10-22 07:51:44 -04:00
Matthias Clasen
ed571ae68a picture: Set alternative text as description
Use the alternative text as accessible description
for GtkPicture.
2020-10-22 07:51:44 -04:00
Matthias Clasen
e2b3cbac23 colorbutton: Improve accessibility
Make the swatch not appear selectable, and
set an accessible label on it.
2020-10-22 07:51:44 -04:00
Matthias Clasen
ba290eb9b0 a11y: Add actions for color swatches
Add the same actions that we exported in GTK 3.
2020-10-21 23:36:22 -04:00
Matthias Clasen
3805e1d507 colorswatch: Export some functions for a11y
Make simple functions to activate, select or customize
a GtkColorSwatch. These will be exported by a11y as
actions.
2020-10-21 23:36:22 -04:00
Matthias Clasen
daf3b3a3b4 Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

See merge request GNOME/gtk!2734
2020-10-22 02:52:46 +00:00
Matthias Clasen
800eb76a2d linkbutton: Use the LINK role
It is a bit ambiguous, but I think link buttons are
more links than buttons. See WAI-ARIA for a discussion
of the differences.

Update tests to match.
2020-10-21 22:19:54 -04:00
Matthias Clasen
bcbc6159f4 a11y: Document abstract roles
Since we mention abstract roles in the documentation
for GtkAccessibleRole, we should say what roles are
abstract. Doing this shows that we actually use two
abstract roles heavily, ourselves: WIDGET and WINDOW.
2020-10-21 21:47:14 -04:00
Matthias Clasen
5f8c6d2287 a11y: Document roles used in menu 2020-10-21 21:40:19 -04:00
Matthias Clasen
88eb3a9c34 atspi: Give model buttons a click action too
GtkModelButton is no longer derived from GtkButton,
but can still treat it like a button for the purposes
of having a click action. This lets ATs activate
menu items again.
2020-10-21 21:27:38 -04:00
Matthias Clasen
3e43dda9d4 modelbutton: Recreate our AT context
When the button role changes, we want to update the
accessible role to match. Since accessible roles are
unchangeable post-creation of the AT context, we have
to cheat a bit and recreate the whole context.
2020-10-21 21:27:38 -04:00
Matthias Clasen
f96a1cfadd modelbutton: Initial accessibility setup
Set the accessible role to GTK_ACCESSIBLE_ROLE_MENU_ITEM.
This is incomplete, we need to recreate the context when
the buttons role changes, and there are other things that
need to be set.
2020-10-21 21:27:38 -04:00
Matthias Clasen
758bcd5343 popovermenubar: Initial accessibility setup
Set roles, properties and relations according to the
ARIA authoring practices document. This is not quite
complete.
2020-10-21 21:27:38 -04:00
Matthias Clasen
2bfd4196fb popovermenu: Initial accessibility setup
Set roles, properties and relations according to the
ARIA authoring practices document.
2020-10-21 21:27:38 -04:00
Xavier Claessens
1b7a99cb24 Apply 1 suggestion(s) to 1 file(s) 2020-10-22 00:36:23 +00:00
Matthias Clasen
087c0078ca menubutton: initial accessibility setup
Set roles, properties and relations according to the
ARIA authoring practices document.
2020-10-21 19:47:48 -04:00
Matthias Clasen
b9ae54c951 separator: Remove unnecessary code
gtk_widget_update_orientation already sets the
accessible property, no need to do it again.
2020-10-21 19:47:48 -04:00
Emmanuele Bassi
7ac6e25ffc Use GtkApplication in the examples
Some people read the "Getting Started" section as a series of
incremental lessons, and having the examples go from GtkApplication to
the old style "init / spin the main loop" confuses them.

We should be using GtkApplication everywhere in our examples.
2020-10-21 22:44:53 +01:00
Matthias Clasen
d3089ebbc2 progressbar: Hide internal structure from a11y
According to section 7.1 of WAI-ARIA, the progressbar role
has the "Children presentational" characteristic, which
indicates that children should not be represented in
the a11y tree.
2020-10-21 15:09:55 -04:00
Matthias Clasen
14a64c7372 levelbar: Hide internal structure from a11y
According to section 7.1 of WAI-ARIA, the meter role
has the "Children presentational" characteristic, which
indicates that children should not be represented in
the a11y tree.
2020-10-21 15:04:34 -04:00
Matthias Clasen
ca9b06878d switch: Hide internal structure from a11y
According to section 7.1 of WAI-ARIA, the switch role
has the "Children presentational" characteristic, which
indicates that children should not be represented in
the a11y tree.
2020-10-21 14:55:13 -04:00
Matthias Clasen
8f100269ad scale: Hide internal structure from a11y
According to section 7.1 of WAI-ARIA, the slider role
has the "Children presentational" characteristic, which
indicates that children should not be represented in
the a11y tree, which makes sense, since these are all
just internal gizmos.
2020-10-21 14:53:17 -04:00
Matthias Clasen
48bb9200d9 a11y: Treat PRESENTATION like NONE
This is what ARIA tells us to do. NONE is just another
name for PRESENTATION.
2020-10-21 14:40:34 -04:00
Matthias Clasen
d7794bf608 docs: Add some more to the migration guide
Expand the section on life-cycle handling with some
more details.
2020-10-21 14:30:17 -04:00
Matthias Clasen
3151906157 docs: Small corrections to the a11y overview
The section titles were mixed up wrt to the content
of the sections.
2020-10-21 14:23:10 -04:00
Matthias Clasen
6153efd02a Document GTK_ACCESSIBLE_ROLE_NONE
We use it for a specific purpose now, so document it.
2020-10-21 14:21:12 -04:00
Matthias Clasen
b5b8f42a0c Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

Closes #3285

See merge request GNOME/gtk!2733
2020-10-21 18:09:42 +00:00
Matthias Clasen
043ffd38bc text: React to text attribute changes in css
Recompute the layout when the css style change
affects text attributes. This matches what we do
in GtkLabel, and without this, changing the
font-features-setting css property in the Inspector
does not have immediate effect.
2020-10-21 13:46:58 -04:00
Carlos Garnacho
32b826e312 Merge branch 'wip/exalm/swipe4' into 'master'
gestureswipe: Count last event when calculating velocity

See merge request GNOME/gtk!2715
2020-10-21 16:20:58 +00:00
Alexander Mikhaylenko
700ca3b946 gestureswipe: Count last event when calculating velocity
The last event, matching lifting the finger/releasing the mouse button,
is important when there's a large delay between it and the previous events,
as in when performing a movement, stopping, then releasing fingers as
opposed to doing a swipe.

If this event is skipped, doing this will result in kinetic deceleration
matching the previous finger movement, while the expected behavior would
be no deceleration.

See also 5dc6194b98 for a similar fix in
GtkEventControllerScroll.
2020-10-21 20:59:15 +05:00
Emmanuele Bassi
e45dd771db a11y: Emit ChildrenChanged for toplevel list changes
GtkAtSpiRoot is not a context, which means it needs to emit
ChildrenChanged events by itself whenever a toplevel is added to, or
removed from, the list of toplevels.
2020-10-21 15:37:57 +01:00
Emmanuele Bassi
698cbee1fb a11y: Move ChildrenChanged emitter to ATSPI utilities
We are going to use it from GtkAtSpiRoot, which is not a
GtkAtSpiContext.
2020-10-21 15:18:23 +01:00
Emmanuele Bassi
80756322cd a11y: Handle relations in UI files
A bit hacky: we skip parsing values that have a reference or
reference-list type, but we do not error out. Instead, we return a NULL
value, which we catch in the GtkBuildable interface implementation to
get the actual object, and construct a reference list value.

There's still some ickyness around the value type that can only be
solved by having an attribute and role taxonomy.
2020-10-21 14:48:49 +01:00
Emmanuele Bassi
f1e14c4858 a11y: Implement ChildrenChanged atspi.Event 2020-10-21 14:33:20 +01:00
Emmanuele Bassi
8d46bd1d7c a11y: Notify of changes in the children list 2020-10-21 14:04:49 +01:00
Emmanuele Bassi
fbb08a30e2 a11y: Add child state change to GtkATContext
And the required private API in GtkAccessible to notify AT contexts of
changes in the children list.
2020-10-21 14:04:49 +01:00