Commit Graph

67194 Commits

Author SHA1 Message Date
Matthias Clasen
74a7f73239 Merge branch 'matthiasc/builder-requires' into 'master'
Matthiasc/builder requires

See merge request GNOME/gtk!2806
2020-11-11 03:53:52 +00:00
Matthias Clasen
a047b7d6d1 Merge branch 'fix-demos-wo-pangoft2' into 'master'
gtk-demo: Fix building scrolling demo without PangoFT2

See merge request GNOME/gtk!2807
2020-11-11 03:50:46 +00:00
Chun-wei Fan
a76f37a501 gtk-demo: Fix building scrolling demo without PangoFT2
For builds that do not have PangoFT2, the demo fails to link because we weren't
building listview_ucd.c.  Fix the build by building listview_ucd.c with
script-names.c and unicode-names.c for all builds, as we now require a Pango
version that already always depends on HarfBuzz and those sources do not use
anything from PangoFT2.
2020-11-11 11:15:05 +08:00
Matthias Clasen
d6a0948182 testsuite: Update buildertool tests
gtk-builder-tool simplify --3to4 now produces a
<requires lib="gtk" version="4.0"/>.
Adapt for that, and also add some tests that check that we
actually verify the requires, and accept 3.99 and 4.0, but
not 5.x.
2020-11-10 19:20:51 -05:00
Matthias Clasen
7215c74933 buildertool: Supplant a requires
When we convert a ui file to GTK 4 syntax, we *know*
that it requires GTK 4, so put that in the output.
2020-11-10 19:19:40 -05:00
Matthias Clasen
e4be785c6c builder: Be a bit more strict about requires
Check that the major version matches (without this, the
requires check is really toothless), but allow 3.99 to
match 4.0.
2020-11-10 19:18:26 -05:00
Matthias Clasen
18779b9d67 testsuite: Remove <requires> from ui files
We don't need these here, the testsuite is shipped
with GTK.
2020-11-10 19:17:45 -05:00
Matthias Clasen
9b056f57f7 examples: Remove requires from ui files
No need to check requires for things that are shipped
with GTK.
2020-11-10 18:38:54 -05:00
Matthias Clasen
d6c753bde7 gtk4-demo: Remove <requires> from ui files
No need to check requires for things that are shipped
with GTK.
2020-11-10 18:37:40 -05:00
Matthias Clasen
d69a943661 gtk: Remove <requires> from ui files
We don't need to check requirements for things
that are shipped *with* gtk.
2020-11-10 18:36:03 -05:00
Matthias Clasen
0ececc7109 Merge branch 'ebassi/for-master' into 'master'
Ebassi/for master

Closes #3343 and #3342

See merge request GNOME/gtk!2804
2020-11-10 18:33:36 +00:00
Matthias Clasen
3cc0870084 Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

See merge request GNOME/gtk!2805
2020-11-10 16:59:47 +00:00
Emmanuele Bassi
2229d7f66c docs: Add example of relations with lists of references 2020-11-10 14:38:09 +00:00
Emmanuele Bassi
ed7619ec16 a11y: Clone GtkATContext in GtkModelButton
The hypothetical widget that needs to clone ATContext instances
because it needs to control the accessible role post-construction is
really GtkModelButton.

Fixes: #3342
2020-11-10 14:31:57 +00:00
Emmanuele Bassi
7ed06480cf a11y: Add private API to clone a GtkATContext
Some widgets might want to override GtkAccessible and create their own
context in order to control the accessible role post-construction time.
To avoid explicitly copying the existing state over from the original
ATContext to the new one, we need a way to clone the context's state
from inside the ATContext itself.
2020-11-10 14:31:56 +00:00
Emmanuele Bassi
f9db651f32 a11y: Do not copy the list of references
The constructor for GtkReferenceListAccessibleValue is transfer full,
which means we should not be copying the GList around.

Fixes: #3343
2020-11-10 14:31:56 +00:00
Emmanuele Bassi
c264254d4b a11y: Parse reference lists using varargs
Using GList is a bit lame, and makes the API more complicated to use
than necessary in the common case.

The only real use case for a GList is gtk_widget_add_mnemonic_label(),
and for that we can use the GValue-based API instead.

Fixes: #3343
2020-11-10 14:31:56 +00:00
Emmanuele Bassi
6af89e9034 a11y: Add GValue initializers for accessible attributes
Consumers of the GValue-based API for GtkAccessible need to have a way
to initialize the GValue with the correct type for the given attribute.
2020-11-10 14:31:56 +00:00
Emmanuele Bassi
1bdc8b9061 a11y: Proxy GtkWidget:accessible-role
The accessible-role property in GtkWidget has three possible targets:

 - the :accessible-role of a GtkATContext, if realized
 - the accessible_role field of GtkWidgetPrivate
 - the accessible_role field of GtkWidgetClassPrivate

When we set the accessible role of a widget using the GObject property
mechanism, we want to either set the GtkWidgetPrivate.accessible_role
field, if there's no ATContext *or* if the ATContext is not realized.
Conversely, when we get the accessible-role property we want to have a
series of fallbacks in place:

 - if GtkAccessible.get_at_context() returns an ATContext, and that
   ATContext is realized, return the :accessible-role of the context
 - if GtkWidgetPrivate.accessible_role is not WIDGET, return the
   stored accessible role
 - return GtkWidgetClassPrivate.accessible_role

This should help catch the case of getting the accessible role of
widgets that override GtkAccessible.get_at_context(), like
GtkModelButton.

See: #3342
2020-11-10 14:31:56 +00:00
Matthias Clasen
c442f9f05a printdialog: Plug listmodel memory leaks
We were leaking references returned from g_list_model_get_item
in some places.
2020-11-10 09:07:54 -05:00
Matthias Clasen
6cbd7e29dd fontchooser: Plug listmodel memory leaks
We were leaking references returned from g_list_model_get_item
in some places.
2020-11-10 09:07:40 -05:00
Matthias Clasen
6079033cde columnview: Plug listmodel memory leaks
We were leaking references returned from g_list_model_get_item
in some places.
2020-11-10 09:07:22 -05:00
Matthias Clasen
d63afaf5ad x11: Plug listmodel memory leaks
We were leaking references returned from g_list_model_get_item
in some places.
2020-11-10 09:07:01 -05:00
Matthias Clasen
7e089664fc win32: Plug listmodel memory leaks
We were leaking references returned from g_list_model_get_item
in some places.
2020-11-10 09:06:37 -05:00
Matthias Clasen
06fbad0b26 wayland: Plug listmodel memory leaks
We were leaking references returned from g_list_model_get_item
in some places.
2020-11-10 09:05:55 -05:00
Yuri Chornoivan
2a3c3b4c6a Update Ukrainian translation 2020-11-10 08:15:59 +00:00
Yuri Chornoivan
eb3933cffd Update Ukrainian translation 2020-11-10 07:58:38 +00:00
Matthias Clasen
d1de9234c5 Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

See merge request GNOME/gtk!2803
2020-11-10 04:47:28 +00:00
Matthias Clasen
3e8260d528 gtk-demo: Plug a memory leak 2020-11-09 23:29:03 -05:00
Matthias Clasen
192f515682 gtk-demo: Tweak a demo title 2020-11-09 23:28:45 -05:00
Matthias Clasen
2543c9f5a3 Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

See merge request GNOME/gtk!2802
2020-11-10 01:42:30 +00:00
Matthias Clasen
a745dbfc15 gkt-demo: Add a columview to the scroll demo
This is an interesting case, since it has many labels,
and we are struggling to provide good scrolling performance.
2020-11-09 20:07:09 -05:00
Matthias Clasen
14be50839e gtk-demo: Improve consistency
Make the shortcut triggers demo big enough
to not ellipsize the window title.
2020-11-09 19:54:17 -05:00
Matthias Clasen
a85d9cda07 gtk-demo: Improve consistency
Make the paintable svg demo follow the same
pattern we use for other demos.
2020-11-09 19:53:44 -05:00
Matthias Clasen
7d49f1e250 gtk-demo: Improve consistency
Make the paintable emblems demo follow the same
pattern we use for other demos.
2020-11-09 19:52:28 -05:00
Matthias Clasen
6fa2936956 gtk-demo: Set default size for drawingarea demo
Set a default size, so we don't ellipsize the window
title when the window is presented.
2020-11-09 18:50:43 -05:00
Matthias Clasen
b81463e7d3 gtk-demo: Plug a memory leak 2020-11-09 18:48:10 -05:00
Matthias Clasen
b622745501 gtk-demo: Plug a memory leak 2020-11-09 18:48:10 -05:00
Matthias Clasen
5379a4bf34 a11y: Clean up properly in unregister_object
Things that are set up in register_object should
be cleaned up in unregister_object.
2020-11-09 18:48:10 -05:00
Matthias Clasen
b966f593a5 Merge branch 'wip/jimmac/search-entry-icon' into 'master'
search entry: icon

Closes #3340

See merge request GNOME/gtk!2801
2020-11-09 22:41:41 +00:00
Jakub Steiner
706a8f9784 search entry: icon
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3340
2020-11-09 22:55:21 +01:00
Matthias Clasen
2dc7e327ad Merge branch 'ebassi/for-master' into 'master'
docs: Add missing a11y environment variables

See merge request GNOME/gtk!2788
2020-11-09 17:19:12 +00:00
Matthias Clasen
7b151c3ef0 Merge branch 'kinetic-scroll-velocity-accumulation' into 'master'
scrolledwindow: Accumulate velocity with kinetic scrolling

See merge request GNOME/gtk!2768
2020-11-09 17:14:03 +00:00
Emmanuele Bassi
0af6630521 a11y: Consolidate accessibility environment variables
Use a single environment variable for everything:

 - select the ATContext implementation
 - select the test ATContext
 - disable ATContext entirely

We use the same pattern as GSK_RENDERER, GTK_DEBUG, etc.

The documentation needs to be updated to include the environment
variable.
2020-11-09 16:21:49 +00:00
Chris Lord
4b459a99be scrolledwindow: Accumulate velocity with kinetic scrolling
Accumulate existing velocity when decelerating from a swipe if the swipe
velocity is above a certain fraction of that existing velocity.
2020-11-09 15:28:32 +00:00
Matthias Clasen
e093ed7d67 Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

Closes #3337

See merge request GNOME/gtk!2799
2020-11-09 14:21:26 +00:00
Matthias Clasen
ddbea8feda Remove GtkPlacesOpenFlags from public headers
The GtkPlacesOpenFlags enum is only used in private
API, so move it to private headers. Since we still need
a GType for it, add gtkplacessidebarprivate.h to the
headers we use for generating private enum types. In turn,
this registers the other private enums in that header, so
take the opportunity to fix their naming, and use the
generated types for the corresponding sidebarrow properties.

Fixes: #3337
2020-11-09 08:45:36 -05:00
Matthias Clasen
6b5dff5667 docs: Document GTK_MEDIA
Add a paragraph about the GTK_MEDIA environment variable.
2020-11-08 09:58:26 -05:00
Matthias Clasen
53cd499621 Revert "Update gtktreestore.c: gtk_tree_store_remove didn't have the proper comment annotation"
This reverts commit 32baa0a549.

See discussion in https://gitlab.gnome.org/GNOME/gtk/-/issues/78
for the background.
2020-11-07 21:36:34 -05:00
Matthias Clasen
30c5a6f79c Merge branch 'patch-3' into 'master'
gtk/gtktextbuffer: remove GtkTextBufferTargetInfo

See merge request GNOME/gtk!2797
2020-11-08 01:11:26 +00:00