Commit Graph

40495 Commits

Author SHA1 Message Date
Lukáš Tyrychtr
6100258ba2 a11y: Rename GtkAccessible.get_parent
Avoid a collision when the type implementing the GtkAccessible interface
already has a `get_parent()` method—like GtkWidget.
2023-02-03 11:49:17 +01:00
Emmanuele Bassi
e083bd7920 Apply trivial review suggestions 2023-02-03 11:49:17 +01:00
Emmanuele Bassi
e915546b44 Add versioned symbol annotations 2023-02-03 11:49:17 +01:00
Lukáš Tyrychtr
b6cfe35940 Style fixes
Documentation and coding style updates.
2023-02-03 11:49:17 +01:00
Lukáš Tyrychtr
4cd9fd9b15 stack: Use a pointer array for children
Reduce our dependency on linked lists; pointer arrays are better at
cache locality.

Additionally, we can avoid quadratic behaviors when finding a child at a
given index.
2023-02-03 11:49:17 +01:00
Lukáš Tyrychtr
6f8cab0e9d Style fix 2023-02-03 11:49:17 +01:00
Lukáš Tyrychtr
6eb9161906 Improve documentation 2023-02-03 11:49:17 +01:00
Lukáš Tyrychtr
d13695f586 a11y: Implement new GtkAccessible vfuncs in GtkStack
Implement the virtual a11y children for GtkStack.
2023-02-03 11:49:17 +01:00
Lukáš Tyrychtr
749919c551 Update API docs 2023-02-03 11:49:17 +01:00
Lukáš Tyrychtr
58980e0b4a Make GtkAccessible public
Out of tree classes need to be able to implement the GtkAccessible
interface, in order to implement custom accessible objects.

Fixes: #4240
2023-02-03 11:49:17 +01:00
Lukáš Tyrychtr
5813a5cace a11y: Add bounds rectangle to GtkAccessible
Make the bounds calculation part of the accessible interface.

Bounds are used by ATs like Orca to implement features like Flat Review:

https://help.gnome.org/users/orca/stable/howto_flat_review.html.en

Or to determine the area of a non-presentational widget.
2023-02-03 11:49:17 +01:00
Lukáš Tyrychtr
f88b777fe5 widget: Implement new GtkAccessible vfuncs 2023-02-03 11:49:17 +01:00
Lukáš Tyrychtr
a80af681b8 a11y: Skip non-presentable objects
Don't get confused with non-presentable objects when iterating the list
of children.
2023-02-03 11:49:17 +01:00
Lukáš Tyrychtr
94695bb276 a11y: Use GtkAccessible for tree traversal
Remove the widget tree dependence from GtkAtSpiContext.
2023-02-03 11:49:17 +01:00
Lukáš Tyrychtr
be36113826 a11y: Implement the new GtkAccessible vfuncs
Implement the gtk_accessible functions and begin removing the old widget
based tree calls.
2023-02-03 11:49:17 +01:00
Lukáš Tyrychtr
5dfbaa53fc a11y: Add DOM-like API to GtkAccessible
Add get_parent and get_child_at_index to GtkAccessible so we can
decouple the a11y tree from the widget tree.
2023-02-03 11:49:17 +01:00
Matthias Clasen
463f12a3bb placessidebar: Make all rows ellipsize
Otherwise, we end up with a single long row
pushing the content of all the other rows
off to the left, which is much worse than
ellipsizing.

Fixes: #4710
2023-02-03 10:00:03 +01:00
Matthias Clasen
cabd18fba0 textbtree: Fix a compiler warning 2023-02-02 17:15:28 +01:00
Matthias Clasen
8911ed5d9b Merge branch 'monitor-description' into 'main'
Add GdkMonitor::description

See merge request GNOME/gtk!5466
2023-02-02 14:12:23 +00:00
Carlos Garnacho
7ad74ad6c3 gdk/wayland: Deprecate GdkDisplay windowing-specific for startup IDs
This is currently just used as a convenience storage of the startup ID
between the GtkApplication and the GtkWindow (after it's ready to notify
on it).

This could be untangled in the GTK layers so there is no involvement
from GDK in keeping the startup ID around, in the mean time just deprecate
these gdk_wayland* API calls.
2023-02-02 12:50:59 +01:00
Carlos Garnacho
bb777507ce gtkmodelbutton: Avoid gtk_gesture_set_sequence_state()
It is not necessary for this widget to know about the specific
sequence that is interacting.
2023-02-02 12:50:59 +01:00
Carlos Garnacho
1e1d79d4f7 gtktextview: Avoid gtk_gesture_set_sequence_state()
Use gtk_gesture_set_state() as this widget does not need specific
knowledge on the sequence being used for interaction.
2023-02-02 12:50:59 +01:00
Carlos Garnacho
a254a4529f gtkscrolledwindow: Clean up input handling a bit
These pieces were added in commit 8d2f81cca4, but are no longer
necessary since there's no capture_button_press special behavior
toggle.

This can be simplified again.
2023-02-02 12:50:59 +01:00
Matthias Clasen
e7bd691532 inspector: Show monitor descriptions 2023-02-02 12:32:28 +01:00
Carlos Garnacho
3ba3e8286f gtkwindowhandle: Refactor click handling a bit
Do not get a GdkEvent first and foremost, and only do that in the
parts where the GdkEvent is absolutely necessary (i.e. popping up
the WM menu for the window).
2023-02-02 11:21:22 +01:00
Carlos Garnacho
fbf4817ef5 gtkgesture: Deprecate gtk_gesture_set_sequence_state()
We can abstract widgets about the specific ongoing sequences that
are triggering a GtkGesture. This used to be more necessary in
GTK3 world where complex widgets might have required handling
different events in different areas, but in GTK4 world that would
be done with multiple widgets.

This is no longer necessary to carry forward.
2023-02-02 11:21:22 +01:00
Carlos Garnacho
db43e0669f gtkscrolledwindow: Avoid gtk_gesture_set_sequence_state()
This widget does not require special knowledge about the ongoing
event sequences, just make it use gtk_gesture_set_state() generically.
2023-02-02 11:21:22 +01:00
Carlos Garnacho
386c77b13d gtkwindowhandle: Avoid gtk_gesture_set_sequence_state()
It does not require special knowledge about the ongoing event
sequences, and it can instead trust the event controller. Make
it use gtk_gesture_set_state() generically.
2023-02-02 11:21:21 +01:00
Matthias Clasen
26650787e1 main: Compiler warnin gfixes 2023-02-02 08:44:53 +01:00
Matthias Clasen
b4ef072188 icontheme: Compiler warning fixes 2023-02-02 08:44:28 +01:00
Matthias Clasen
3858c5282c Deprecate GtkAssistant
It is a dialog-like toplevel, and libadwaita has
replacement parts (like AdwCarousel).
2023-02-02 08:39:25 +01:00
Matthias Clasen
1ff8dad8ec Deprecate GtkLockButton
This is a very specialized widget, and should really just
live with the applications where it is used.
2023-02-02 08:39:25 +01:00
Matthias Clasen
d8cb11ec4a Deprecate GtkStatusbar
The design patterns using statusbar are no longer popular,
and it is pretty easy to make a statusbar yourself with boxes
and labels, if you need one. The only thing special about
GtkStatusbar was its window resize handle, but that has
been gone for a long time.
2023-02-02 08:39:24 +01:00
Matthias Clasen
8796950651 Deprecate more startup-notification API 2023-02-02 08:30:32 +01:00
Fina Wilke
35e3c22832 filechooserwidget: Fix file chooser crash when dropping empty file list 2023-01-30 19:28:24 +00:00
Matthias Clasen
53af41e2fa passwordentry: Fix an asymmetry
When connecting a signal in realize,
we should disconnect in unrealize.

Fixes: #5285
2023-01-29 22:39:28 -05:00
Matthias Clasen
1e9dbf2df0 tooltip: Prevent too-wide tooltip windows
Set the label to expand, so it actually fills
the width that we allocated for it, instead
of shrinking back to the minimum width for
its height.

Fixes: #5521
2023-01-28 13:07:26 -05:00
Matthias Clasen
dce21f06dd tooltip: Don't play games with max-width-chars
Setting max-width-chars to the number of characters
in the string works ok only as long as the average
char width we get from Pango matches reality. Sadly
that seems not always the case, and this code was
causing short Chinese tooltips to always be broken
into two lines.

Fixes: #4470
2023-01-28 13:06:30 -05:00
Matthias Clasen
a9d2fa296e Merge branch 'position-as-double' into 'main'
Boyscouting: fix position type in `gtk_drag_source_drag_begin()`

See merge request GNOME/gtk!5437
2023-01-28 03:24:19 +00:00
Vlad Zahorodnii
65f03121a4 wayland: Fix handling of activation-token in org.freedesktop.Application requests
At the moment, GTK applications search for "desktop-startup-id" in the
platform data on Wayland , but desktop environments such as plasma set
"activation-token" property instead as indicated in the spec:

    activation-token: This should be a string of the same value as would
    be stored in the XDG_ACTIVATION_TOKEN environment variable, as specified
    by the XDG Activation protocol for Wayland.

https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#dbus
2023-01-27 19:20:53 +00:00
Matthias Clasen
ee0e026237 Merge branch 'fix_5551' into 'main'
object_tree.c: One gtk_list_item_get_child call is redundant

Closes #5551

See merge request GNOME/gtk!5449
2023-01-27 16:22:17 +00:00
Lukáš Tyrychtr
7b6f254e64 object_tree.c: One gtk_list_item_get_child call is redundant
Fixes #5551
2023-01-27 15:43:33 +01:00
Sophie Herold
e62ca17f88 scrolledWindow: Propagate event for no scrolling 2023-01-26 20:12:10 +01:00
Matthias Clasen
30987168fb Merge branch 'fix_5543' into 'main'
GtkCssProvider: fix element type in docs

Closes #5543

See merge request GNOME/gtk!5441
2023-01-25 13:08:07 +00:00
Lukáš Tyrychtr
93a875bf20 Actually, the annotation is not needed in this case 2023-01-25 11:46:53 +01:00
Alessandro Bono
53d87e42a5 gtkswitch: Decouple set_state with set_active.
Allow the user to set a state that doesn't reflect the active property.
2023-01-24 14:55:16 +01:00
Emmanuele Bassi
7df73c4fd2 Use wording from a suggestion 2023-01-23 11:50:28 +00:00
Lukáš Tyrychtr
1ea5a08c8f GtkCssProvider: fix element type in docs
The method takes an array of char, which actually is UTF-8, so make the docs say so.
Fixes #5543
2023-01-23 12:12:00 +01:00
Matthias Clasen
1a5184bc85 iconhelper: Handle GtkSymbolicPaintable
If we are given a GtkSymbolicPaintable,
treat it as symbolic.
2023-01-22 13:18:18 -05:00
Matthias Clasen
83a5611ce8 settings: Modernize the code
Drop some things that are no longer relevant,
and make this code look like modern GObject code.
2023-01-17 15:19:50 -05:00