Benjamin Otte
5f0a9a60e9
tooltipwindow: Cast the correct object
...
the tooltipwindow is in the userdata.
2023-04-21 09:01:34 +02:00
Cam Cook
fcec5a817e
Documentation corrections for GtkTextIter
...
| method | current | suggestion |
|------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------|-----------------------------------------------------------------|
| [backward_visible_cursor_position](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3785 ) | "Moves @iter forward to the previous visible cursor position" | "Moves @iter backward to the previous visible cursor position." |
| [get_offset](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L595 ) | "Use [method@Gtk,TextBuffer.get_iter_at_offset]" | "Use [method@Gtk.TextBuffer .get_iter_at_offset]" |
| [starts_tag](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L1201 ) | "returns %TRUE, [method@Gtk.TextIter .has_tag" | "returns %TRUE, [method@Gtk.TextIter .has_tag] " |
| method | current | suggestion |
|--------------------------------------------------------------------------------------------------------|-----------------------------------------------------|-----------------------------------------------------------|
| [backward_cursor_position](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3715 ) | "Like gtk_text_iter_forward_cursor_position()" | "Like [method@Gtk.TextIter .forward_cursor_position]" |
| [backward_find_char](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L4483 ) | "Same as gtk_text_iter_forward_find_char()" | "Same as [method@Gtk.TextIter .forward_find_char]" |
| [backward_search](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L5295 ) | "Same as gtk_text_iter_forward_search()" | "Same as [method@Gtk.TextIter .forward_search]" |
| [backward_sentence_starts](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3611 ) | "Calls gtk_text_iter_backward_sentence_start()" | "Calls [method@Gtk.TextIter .backward_sentence_start]" |
| [backward_visible_word_starts](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3421 ) | "Calls gtk_text_iter_backward_visible_word_start()" | "Calls [method@Gtk.TextIter .backward_visible_word_start]" |
| [backward_word_starts](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3345 ) | "Calls gtk_text_iter_backward_word_start()" | "Calls [method@Gtk.TextIter .backward_word_start]" |
| [forward_sentence_ends](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3591 ) | "Calls gtk_text_iter_forward_sentence_end()" | "Calls [method@Gtk.TextIter .forward_sentence_end]" |
| [forward_to_end](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L4131 ) | "gtk_text_iter_get_char() called on" | "[method@Gtk.TextIter .get_char] called on" |
| [forward_visible_word_ends](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3403 ) | "Calls gtk_text_iter_forward_visible_word_end()" | "Calls [method@Gtk.TextIter .forward_visible_word_end]" |
| [forward_word_ends](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3327 ) | "Calls gtk_text_iter_forward_word_end()" | " Calls [method@Gtk.TextIter .forward_word_end]" |
| [is_end](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L1664 ) | "gtk_text_iter_is_end() is the most efficient" | "[method@Gtk.TextIter .is_end] is the most efficient" |
| [set_line_index](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3900 ) | "Same as gtk_text_iter_set_line_offset()" | "Same as [method@Gtk.TextIter .set_line_offset]" |
| [set_visible_line_index](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3987 ) | "Like gtk_text_iter_set_line_index()" | "Like [method@Gtk.TextIter .set_line_index]" |
| [set_visible_line_offset](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3946 ) | "Like gtk_text_iter_set_line_offset()" | "Like [method@Gtk.TextIter .set_line_offset]" |
2023-04-21 09:01:02 +02:00
Cam Cook
9782158a9e
Documentation corrections for GtkTextIter
...
| method | current | suggestion |
|------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------|-----------------------------------------------------------------|
| [backward_visible_cursor_position](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3785 ) | "Moves @iter forward to the previous visible cursor position" | "Moves @iter backward to the previous visible cursor position." |
| [get_offset](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L595 ) | "Use [method@Gtk,TextBuffer.get_iter_at_offset]" | "Use [method@Gtk.TextBuffer .get_iter_at_offset]" |
| [starts_tag](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L1201 ) | "returns %TRUE, [method@Gtk.TextIter .has_tag" | "returns %TRUE, [method@Gtk.TextIter .has_tag] " |
| method | current | suggestion |
|--------------------------------------------------------------------------------------------------------|-----------------------------------------------------|-----------------------------------------------------------|
| [backward_cursor_position](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3715 ) | "Like gtk_text_iter_forward_cursor_position()" | "Like [method@Gtk.TextIter .forward_cursor_position]" |
| [backward_find_char](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L4483 ) | "Same as gtk_text_iter_forward_find_char()" | "Same as [method@Gtk.TextIter .forward_find_char]" |
| [backward_search](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L5295 ) | "Same as gtk_text_iter_forward_search()" | "Same as [method@Gtk.TextIter .forward_search]" |
| [backward_sentence_starts](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3611 ) | "Calls gtk_text_iter_backward_sentence_start()" | "Calls [method@Gtk.TextIter .backward_sentence_start]" |
| [backward_visible_word_starts](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3421 ) | "Calls gtk_text_iter_backward_visible_word_start()" | "Calls [method@Gtk.TextIter .backward_visible_word_start]" |
| [backward_word_starts](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3345 ) | "Calls gtk_text_iter_backward_word_start()" | "Calls [method@Gtk.TextIter .backward_word_start]" |
| [forward_sentence_ends](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3591 ) | "Calls gtk_text_iter_forward_sentence_end()" | "Calls [method@Gtk.TextIter .forward_sentence_end]" |
| [forward_to_end](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L4131 ) | "gtk_text_iter_get_char() called on" | "[method@Gtk.TextIter .get_char] called on" |
| [forward_visible_word_ends](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3403 ) | "Calls gtk_text_iter_forward_visible_word_end()" | "Calls [method@Gtk.TextIter .forward_visible_word_end]" |
| [forward_word_ends](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3327 ) | "Calls gtk_text_iter_forward_word_end()" | " Calls [method@Gtk.TextIter .forward_word_end]" |
| [is_end](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L1664 ) | "gtk_text_iter_is_end() is the most efficient" | "[method@Gtk.TextBuffer .is_end] is the most efficient" |
| [set_line_index](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3900 ) | "Same as gtk_text_iter_set_line_offset()" | "Same as [method@Gtk.TextBuffer .set_line_offset]" |
| [set_visible_line_index](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3987 ) | "Like gtk_text_iter_set_line_index()" | "Like [method@Gtk.TextBuffer .set_line_index]" |
| [set_visible_line_offset](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3946 ) | "Like gtk_text_iter_set_line_offset()" | "Like [method@Gtk.TextBuffer .set_line_offset]" |
2023-04-21 09:00:47 +02:00
Matthias Clasen
67310c8753
inspector: Update some misc info rows
2023-04-21 08:59:19 +02:00
Georges Basile Stavracas Neto
e09a5bc2dd
gsk/gl/renderjob: Decompose matrix for 3D transforms
...
While this can be more expensive, it's also correct.
2023-04-21 08:58:17 +02:00
Matthias Clasen
a14ac90229
inspector: Improve display of paths
...
The values in the path section are long and generally
ellipsized. It does not make sense to reserve extra
space that the labels don't need.
2023-04-21 08:57:12 +02:00
Bilal Elmoussaoui
67d8b4c976
docs: Improve GtkLabel rendering
...
By adding some missing links & avoid the browser
from rendering the entities as their equivalent symbols
2023-04-21 08:56:28 +02:00
Matthias Clasen
6a566648d2
listitem: Fix a notification problem
...
We were notifying ::item when ::child is
changed. Oops
2023-04-21 08:48:57 +02:00
Lukáš Tyrychtr
1b07d02671
a11y: Set ATSPI_STATE_SHOWING for all widgets, not only for windows
...
According to the at-spi2 docs, for a widget to be considered visible,
it needs both the showing and visible states. Many applications rely on that,
for example the flat review functionality of Orca.
this fixes #5194
2023-04-21 08:48:04 +02:00
Emmanuele Bassi
47e90f1de6
Remove wrong annotation for GdkToplevel::compute-size
...
The size argument is passed to the signal by the GDK surface machinery,
as is: it's not going to be allocated by the caller (since it's a
signal), and it's not an out argument.
2023-04-21 08:43:34 +02:00
Matthias Clasen
1b2ae02b26
magnifier: Correct position of area
...
The widget paintable uses the widgets bounds
as intrinsic size, so we need to offset from
that to the allocation, which is what the
coordinates are relative to.
2023-04-21 08:38:46 +02:00
Matthias Clasen
b02ade43c3
texthandle: Correct placement of handles
...
Text handles had the same problem as popovers.
They were interpreting their pointing-to rectangle
relative to the widgets bounds, when it is meant
to be relative to the widgtets allocation.
While we touch this code, rewrite it to use
gtk_widget_compute_point.
2023-04-21 08:38:17 +02:00
Matthias Clasen
bb48a02a77
popover: Correct placement of popovers
...
When we don't have a pointing-to rectangle, we want to place
the popover wrt to the parents bounds. But if we have a
pointing-to rectangle, it is relative to the widgets allocation,
which is different from the bounds.
We were not handling the second case correctly, leading to context
menus in the text view being mispositioned by the widgets CSS padding.
While we are touching this code, rewrite it to handle transforms.
Fixes : #5695
2023-04-21 08:38:12 +02:00
Matthias Clasen
4897ff0278
docs: Improve markup for keys
...
Consistently use <kbd>x</kbd> to render keys in the docs
and use + for key combinations.
2023-04-21 08:37:02 +02:00
Matthias Clasen
40fdf4aa9f
docs: Some updates
...
Fix some links ot point to docs.gtk.org.
2023-04-21 08:36:54 +02:00
Marco Trevisan (Treviño)
354ceb5778
gtkwidget: Do a type-check in gtk_widget_in_destruction()
...
Given it can be called during a widget destruction, it's safer to do a
type-check before crashing.
See: https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1727
2023-04-21 08:34:47 +02:00
Caolán McNamara
7cf72976d9
fix crash with gtk_accessible_role_to_name and GTK_ACCESSIBLE_ROLE_TOGGLE_BUTTON
...
presumably since:
commit de80f503e4
Date: Thu Feb 23 14:22:20 2023 +0100
a11y: Introduce a dedicated role for toggle buttons
2023-04-21 08:32:22 +02:00
Benjamin Otte
243f4b0729
checkbutton: Only andle arrow focus if we're in a group
...
If there is no other widget in the group that we can focus, don't focus
and activate ourselves.
Otherwise the arrow keys on checkbuttons toggle the checkbutton.
2023-04-21 08:31:32 +02:00
Marco Trevisan (Treviño)
b4d33c0810
theme: Use 0.5 opacity for disabled pictures
...
If a GtkImage is using an icon we use a gtk-icon-filter to se the icon
opacity when in insensitive state, however when using other kinds of
pictures we do not apply the same style leading to an inconsistent
result.
Closes : #5683
2023-04-21 08:31:25 +02:00
Matthias Clasen
24f615cad1
gsk: Use explicit switches
...
This makes it harder to forget to add new
node types here.
2023-04-21 08:23:26 +02:00
Matthias Clasen
370b72c674
gsk: Mask nodes support 2d transforms
...
When adding mask nodes, I overlooked that
we have two separate functions for determining
what transforms a node supports without offlines.
Since we claim that mask nodes support general
transform, they must certainly support 2d transforms
as well.
2023-04-21 08:22:51 +02:00
Matthias Clasen
806639d974
Stop binding textdomain for -properties
...
We don't have these translations anymore.
2023-04-21 08:22:06 +02:00
Matthias Clasen
9ca65eb787
gtk-demo: Reset properties when the image changes
2023-04-21 08:20:44 +02:00
Matthias Clasen
ee22a3ea36
broadway: Don't cause traffic when disconnecting
...
The recently added transient-for support was causing
roundtrips when a client with transients disconnects,
leading to assertion failures. Avoid that.
2023-04-21 08:19:17 +02:00
Matthias Clasen
dd8bd8ad15
docs: Update broadway docs
...
Using Broadway without broadwayd hasn't worked since 2013...
Fixes : #5662
2023-04-21 08:19:06 +02:00
Benjamin Otte
53655c1041
gldriver: Quick workaround for filter mismatch
...
We should really use texture views or samplers to handle this case for
shared textures, but this at least makes NEAREST not break.
2023-04-21 08:18:47 +02:00
Matthias Clasen
28e56d0dde
label: Use GtkFileLauncher for file URI
...
The GtkUriLauncher calls into the openuri portal, which distinguishes
between files, directories, and URI. The GtkFileLauncher contains logic
to deal with this, because it can already handle the file and folder
differences.
If we have a file:// URI it's easier to create a GFile out of it, and
use the GtkFileLauncher API, while leaving the GtkUriLauncher API for
every other URI scheme.
Same fix as de3c1d0c73 , for GtkLabel.
Fixes : #5671
2023-04-21 08:17:35 +02:00
Emmanuele Bassi
6a797f6b1a
linkbutton: Use GtkFileLauncher for file URI
...
The GtkUriLauncher calls into the openuri portal, which distinguishes
between files, directories, and URI. The GtkFileLauncher contains logic
to deal with this, because it can already handle the file and folder
differences.
If we have a file:// URI it's easier to create a GFile out of it, and
use the GtkFileLauncher API, while leaving the GtkUriLauncher API for
every other URI scheme.
Fixes : #5671
2023-04-21 08:16:55 +02:00
Alexander Mikhaylenko
6b5baefd75
theme: Port .boxed-list style from libadwaita
...
Consistently use it for boxed lists in inspector and gtk-demo.
Fixes issues like https://gitlab.gnome.org/GNOME/gtk/-/issues/3145
2023-04-21 08:15:19 +02:00
Matthias Clasen
a6010b40f2
Merge branch 'fix-410-tests' into 'gtk-4-10'
...
testsuite: Fix broken test
See merge request GNOME/gtk!5855
2023-04-21 05:55:14 +00:00
Matthias Clasen
80c765b54d
Merge branch 'cherry-pick-03b71a97' into 'gtk-4-10'
...
Merge branch 'wip/otte/for-main' into 'main'
See merge request GNOME/gtk!5854
2023-04-21 05:42:51 +00:00
Benjamin Otte
1b872743bc
testsuite: Fix broken test
...
The test was referencing a nonexisting image.
Plus, node parsing cannot reference relative URLs.
2023-04-21 07:37:53 +02:00
Benjamin Otte
3e26418dfe
Merge branch 'wip/otte/for-main' into 'main'
...
testsuite: Be less verbose in accessor-apis test
Closes #5763
See merge request GNOME/gtk!5851
(cherry picked from commit 03b71a9759 )
be5f2250 testsuite: Be less verbose in accessor-apis test
39583e40 testsuite: Allow accessors in interfaces
e47c0760 adjustment: Split out a function
75c47755 adjustment: sanity-check values when setting them
f393f70e listbase: Don't warn on scroll in empty list
2023-04-21 00:48:27 -04:00
Sabri Ünal
78931915e4
Update Turkish translation
2023-04-19 12:59:55 +00:00
Matthias Clasen
15a62434f4
Merge branch 'cherry-pick-faac2f78' into 'gtk-4-10'
...
filesystemmodel: Notify correct position removed in remove_file()
See merge request GNOME/gtk!5816
2023-04-11 06:02:23 +00:00
Corey Berla
e041f7bf71
filesystemmodel: Notify correct position removed in remove_file()
...
32247bc50e made several changes to account for the
fact that we no longer have a NULL editable at the beginning of the list
model. The commit mistakenly left out one change in remove_file(),
which causes the wrong file to be removed.
(cherry picked from commit faac2f7894 )
2023-04-11 01:28:45 -04:00
Alexander Shopov
f15aa82eaf
Update Bulgarian translation
2023-04-07 16:26:55 +00:00
Matthias Clasen
625219508b
Merge branch 'cherry-pick-515f39f1' into 'gtk-4-10'
...
Merge branch 'wip/otte/for-main' into 'main'
See merge request GNOME/gtk!5760
2023-04-01 12:48:49 +00:00
Matthias Clasen
520b25e96c
Merge branch 'cherry-picks-for-4-10' into 'gtk-4-10'
...
scrolledwindow: Disconnect the right handler
See merge request GNOME/gtk!5762
2023-04-01 01:23:44 +00:00
Benjamin Otte
f00b29f2c6
rendernodeparser: Emit error when failing to resolve URL
2023-03-31 20:26:19 -04:00
Benjamin Otte
5c20cb08dc
rendernodeparser: Failing to parse a string is an error
...
Testcase included.
2023-03-31 20:26:12 -04:00
Matthias Clasen
5d8bf6d9ca
wayland: Comply with protocol requirements
...
If you send a bad anchor rect to mutter, it crashes.
Thats not great, so lets not do that.
2023-03-31 20:25:51 -04:00
Matthias Clasen
ea6f176055
gdk: Avoid a pointless indirection
...
Don't use g_fprintf if GLib is using system printf
anyway.
2023-03-31 20:23:42 -04:00
Matthias Clasen
eec1298aa1
Improve an error message
...
We were producing a misleading error message
when gtk_init() fails.
Fixes : #5704
2023-03-31 20:23:27 -04:00
Matthias Clasen
61536ea1a7
gdk: Improve logging for backends
...
Log more when trying backends.
2023-03-31 20:22:11 -04:00
Benjamin Otte
340ab6c20f
enums: Move G_END_DECLS to the end of the file
2023-03-31 20:21:51 -04:00
Bilal Elmoussaoui
2229ff6807
docs: Fix various broken links
2023-03-31 20:21:36 -04:00
Jonas Ådahl
7bc18a125f
wayland/popup: Handle late received reposition feedback
...
If we map, reposition, unmap, remap, the reposition feedback from the
last time a popup was mapped might be received while we're dealing with
the new version of the popup. At this point, the old reposition token
has no meating, so lets drop it. Also reset the reposition tokens when
creating new protocol objects, so that the reposition token are as if
we're in the initial state.
This fixes an issue where we'd get stuck if repeatedly smashing a button
that'd create popups that'd immediately get dismissed by the compositor.
2023-03-31 20:21:28 -04:00
Ludovico de Nittis
5303bbf66a
wayland: Try to open the display even if XDG_RUNTIME_DIR is unset
...
Since Wayland 1.15, it is now possible to use absolute paths in
"WAYLAND_DISPLAY".
In that scenario, having a valid "XDG_RUNTIME_DIR" is not a requirement
anymore.
For this reason we remove the "XDG_RUNTIME_DIR" check and we let
`wl_display_connect()` decide if our environment is correct.
Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com >
2023-03-31 20:21:02 -04:00
Benjamin Otte
c2f432b6df
magnifier: Don't check for visibility
...
gtk_widget_queue_draw() already does that.
2023-03-31 20:20:41 -04:00