Commit Graph

72677 Commits

Author SHA1 Message Date
Matthias Clasen
412e77d500 a11y: Fix a memory leak
We need to free the queued context list in dispose
if we didn't get to register the contexts, and we also
need to free the list properly when we do get to
register them.

This showed up in valgrind as leaked GList structs.
2022-08-16 08:22:53 -04:00
Zurab Kargareteli
df1c6956b4 Update Georgian translation 2022-08-15 18:37:05 +00:00
Matthias Clasen
77e0b09efc Merge branch 'improve-css-test-4.6' into 'gtk-4-6'
css: Propagate charset conversion errors

See merge request GNOME/gtk!4944
2022-08-12 16:52:54 +00:00
Goran Vidović
1d6416c12b Update Croatian translation 2022-08-12 14:30:13 +00:00
Matthias Clasen
6b019d4dd0 tests: Check the error first
The error contains useful information when
things fail, so check it first to get useful
output in case of failure.
2022-08-11 20:10:48 -04:00
Matthias Clasen
ac18330f65 css: Propagate charset conversion errors
Lets not throw away informtation that
helps to figure out why things fail.
2022-08-11 20:10:48 -04:00
Matthias Clasen
e93a5479de Merge branch 'wip/carlosg/scroll-speed-4-6' into 'gtk-4-6'
gtkscrolledwindow: Backport scroll speed from 4.7/main

See merge request GNOME/gtk!4946
2022-08-11 23:51:02 +00:00
Carlos Garnacho
9d01189f2f gtkscrolledwindow: Backport scroll speed from 4.7/main
Only the scroll velocity factor is backported here, the scroll unit
event API is notably missing, so this implicitly applies to all smooth
scroll events.

The number also accounts for the 1/10th factor applied in GDK, compared
to the code in main.
2022-08-12 01:10:50 +02:00
Daniel Mustieles
3149f1c934 Updated Spanish translation 2022-08-08 12:45:00 +02:00
Matthias Clasen
e5d3cc20d9 Merge branch 'cherry-pick-c1d6160b' into 'gtk-4-6'
Merge branch 'otte-main-patch-86462' into 'main'

See merge request GNOME/gtk!4920
2022-08-03 11:56:41 +00:00
Matthias Clasen
57f6effa1a Merge branch 'for-gtk-4-6' into 'gtk-4-6'
frameclock: Run paint idle from flush idle (backport  !4858 to 4.6)

See merge request GNOME/gtk!4918
2022-08-01 23:07:08 +00:00
Benjamin Otte
584e9f93a4 Merge branch 'otte-main-patch-86462' into 'main'
Fix g_object_new(GTK_TYPE_SNAPSHOT)

See merge request GNOME/gtk!4919

(cherry picked from commit c1d6160bd4)

09f0c96b Fix g_object_new(GTK_TYPE_SNAPSHOT)
dbab69c4 snapshot: Don't critical on dispose
2022-08-01 20:47:27 +00:00
Benjamin Otte
41396e1344
frameclock: Run paint idle from flush idle
Don't return to the main loop, instead force a run of the paint idle.
The paint idle will know to skip all the phases that aren't requested.

This is critically important becuase gdksurface.c assumes the
FLUSH_EVENTS and RESUME_EVENTS phases are matched, and we cannot
guarantee that if we return to the main loop and let various reentrant
code change the frame clock state.

This would lead to bugs with events being paused and never unpaused
again or even crashes.

Fixes #4941
2022-08-01 19:45:14 +02:00
Aleksandr Melman
36ed85cc9c Update Russian translation 2022-08-01 13:12:35 +00:00
Luca Bacci
d57594c709 Merge branch 'backport-mr-4900-to-gtk-4-6' into 'gtk-4-6'
Fix DnD on Windows

See merge request GNOME/gtk!4908
2022-07-29 13:07:29 +00:00
darkcutler
5b888393e5 Fix DnD on Windows
DnD under Windows needed 3 fixes to work with Gtk.DropTarget.

1. The droptarget_w32format_contentformat_map list never gets
filled so the gdk_win32_drop_read_async throws
"No compatible transfer format found".
This is an easy fix and done the same way in the win32 clipboard code.

2. After a drop no gdk_drop_emit_leave_event gets emitted.
This causes a second drop to trigger a bunch of assertion
'self->drop == drop' failed because the first drop is still active.
This is also an easy fix and done the same way by the macos backend.

3. Handling gdk_drop_status/gdk_drop_get_actions interaction.
In gtk_drop_target_do_drop the code
```gdk_drop_finish (self->drop, gdk_drop_get_actions (self->drop));```
calls the finish operation with the actions of the drop which triggers
```g_return_if_fail (gdk_drag_action_is_unique (action));```
in gdk_drop_finish. The code assumes that GdkDrop::actions gets
narrowed down by calling gdk_drop_status. This is hard to assure
because at the same time gdk_drop_get_actions is used by
gtk_drop_target_accept to figure out if a drag is accepted.
GdkDrop::actions serves a double purpose here as the supported source
actions and the currently agreed on action. Both the x11 and the
wayland backend get this wrong somewhat too. Under wayland/x11 when
a drag coming from a source that supports both MOVE and COPY is
first hovering a drop target that only supports COPY it is afterwards
no longer accepted by other drop targets only accepting MOVE.
Under x11 this is permanent for this drag but with wayland the drag
recovers when hovering other widgets. The win32 backend now sets the
supported source actions before any enter/move/drop and narrows them
down in gdk_win32_drop_status.

The patch only touches the win32 backend and fixes all three issues,
for me restoring DnD under windows.

Closes #4498
2022-07-29 14:44:26 +02:00
Matthias Clasen
2f138ce93b Merge branch 'cherrypick-for-4-6' into 'gtk-4-6'
Cherry-pick changes from main for gtk-4-6

See merge request GNOME/gtk!4894
2022-07-28 18:10:14 +00:00
Matthias Clasen
a6d22b3af1 Merge branch 'cherry-pick-09da4db8' into 'gtk-4-6'
Merge branch 'dnd' into 'main'

See merge request GNOME/gtk!4891
2022-07-28 18:05:51 +00:00
Benjamin Otte
6479495fbf Merge branch 'cherry-pick-0c052c9a' into 'gtk-4-6'
Merge branch 'gridview' into 'main'

See merge request GNOME/gtk!4904
2022-07-26 17:25:49 +00:00
Benjamin Otte
1ea2643aa9 Merge branch 'gridview' into 'main'
Gridview fix rubberbanding issues

Closes #3462 and #3445

See merge request GNOME/gtk!4688

(cherry picked from commit 0c052c9a37)

2bcae546 gridview: Move gtk_grid_view_computer_total_height() up for reuse
c6f357e4 gridview: Limit rectangle to gridview columns
1e9a36ff gridview: Allow starting rubberband in empty space below last row
ba909cf9 gridview: Fix get_items_in_rect() selection
f3fc8f5b gridview: Return an empty bitset when selecting only empty space
57c032e6 listbase: Clear selection if rubberband selected an empty set
aba2d994 gridview: Fix typo in docstring for gtk_grid_view_get_cell_at_y()
e14b84ff listview: Return an empty bitset when selecting only empty space
d6fab140 listview: Allow starting rubberband in empty space below last row
a7bbc258 listview: Fix selection for last item in get_items_in_rect
2022-07-26 16:37:40 +00:00
Luca Bacci
a241b4480e Merge branch 'backport-mr-4674-to-gtk-4-6' into 'gtk-4-6'
GtkFileChooserWidget: Propagate captured key events when the location entry is focused

See merge request GNOME/gtk!4714
2022-07-20 07:04:59 +00:00
Mat
f8231cf1a7 treepopover: Add support for scrolling
Add support for scrolling large tree popovers in a similar fashion to GtkPopoverMenu.

Fixes #3674
Fixes #4877
2022-07-18 18:56:18 +03:00
Mat
a730012006 droptarget: Provide a unique action for gdk_drop_finish
gdk_drop_finish() requires a unique drop action. Reuse the existing
make_action_unique() function to get one.

Fixes #5051
2022-07-18 18:55:59 +03:00
Mat
977a69ab84 treeview: Check for column header area in row click/drag gestures
Bail out if a row click/drag gesture is performed in the column header area,
since separate gestures handle column headers.

Fixes #4453
2022-07-18 18:55:38 +03:00
Mat
7e4d6b556c tree/iconview: Use a unique drag action in drag_enter/motion callbacks
Functions already exist for providing a unique drag action for gdk_drop_finish().
Reuse these functions in the drag_enter/motion callbacks, since they require
a unique action as the return value.

Fixes #3187
2022-07-18 18:55:09 +03:00
Benjamin Otte
45ff81848f Merge branch 'dnd' into 'main'
DnD Fix Preferred Action for X11

Closes #4259

See merge request GNOME/gtk!4785

(cherry picked from commit 09da4db81f)

c9c48d78 gdkdrop-x11: Fix preferred action
16fd2608 gdkdrop-x11: Use the preferred action if possible
2022-07-18 14:21:45 +00:00
Luca Bacci
73afd4976a Propagate key events when the location entry is focused
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4880
2022-07-13 13:38:01 +02:00
Matthias Clasen
07c115a383 Merge branch 'fix-gtk-stack-get-page-annotation' into 'gtk-4-6'
Fix gi-docgen comments for gtk_stack_get_page.

See merge request GNOME/gtk!4794
2022-07-11 18:18:26 +00:00
Hugo Parente Lima
a9f658ab8f Fix gi-docgen comments for gtk_stack_get_page. 2022-07-11 18:18:25 +00:00
Andika Triwidada
9c258a5441 Update Indonesian translation 2022-07-03 08:20:41 +00:00
Мирослав Николић
7c0cf9e0c9 Update Serbian translation 2022-07-03 02:18:43 +00:00
Matthias Clasen
57ba5ad39e 4.6.6 2022-07-02 14:38:25 -04:00
Sabri Ünal
1ba946d3ba Update Turkish translation 2022-06-10 05:53:37 +00:00
Rafael Fontenelle
d43ddcb2e8 Update Brazilian Portuguese translation 2022-06-09 23:44:08 +00:00
Matthias Clasen
05e4079682 Merge branch 'hc-icontheme-for-4-6' into 'gtk-4-6'
Don't use the HighContrast icon theme

See merge request GNOME/gtk!4805
2022-06-08 18:48:15 +00:00
Florian Müllner
317209597d wayland/display: Don't force HighContrast icon theme
The theme is considered deprecated in favor of symbolic icons from
the regular theme.

Cherry-picked from main.
2022-06-08 14:33:07 -04:00
Matthias Clasen
fad664c89e Merge branch 'builtin-icontheme-fix-for-4-6' into 'gtk-4-6'
Add scalable directories to the builtin hicolor index

See merge request GNOME/gtk!4797
2022-06-06 22:25:07 +00:00
Matthias Clasen
e3c4076b27 Add more directories to the builtin hicolor index
We haven't had any scalable directories in this list.
Add some. Since we seem to have settled on including
just actions and status as subdirectories for each
size, add scalable/actions and scalable/status.

Fixes: #4960
2022-06-06 18:05:25 -04:00
Aleksandr Melman
99f7cc1e61 Update Russian translation 2022-06-05 12:33:06 +00:00
Carlos Garnacho
154107696a Merge branch 'wip/carlosg/activation-roundtrip-fix-4.6' into 'gtk-4-6'
gdk/wayland: Dispatch GdkAppLaunchContext activation token in its own queue

See merge request GNOME/gtk!4791
2022-06-03 11:20:39 +00:00
Carlos Garnacho
1cdb6ada4e gdk/wayland: Check the GdkSurface wl_surface before using it for activation
Double check the GdkSurface has a wl_surface before using it as the activation
token source, since we cannot use NULL surfaces here.

Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1862

(cherry-picked from commit 4b41d4f78c)
2022-06-03 13:04:15 +02:00
Carlos Garnacho
56607e8cfe gdk/wayland: Dispatch GdkAppLaunchContext activation token in its own queue
Use a separate queue to dispatch the token object exclusively, just like we
do on the GdkSurface activation paths.

(cherry-picked from commit fb68600d88)
2022-06-03 13:03:58 +02:00
Matthias Clasen
94b47ce47a Merge branch 'fix-gtk-stack-get-page-annotation' into 'gtk-4-6'
Fix introspection annotation for gtk_stack_get_page

See merge request GNOME/gtk!4783
2022-06-02 10:40:49 +00:00
Matthias Clasen
3594df7f87 Merge branch 'fix-ui-file-translation' into 'gtk-4-6'
Fix ui files to work for translations

See merge request GNOME/gtk!4784
2022-06-01 23:00:14 +00:00
Matthias Clasen
c96113e6d8 Fix ui files to work for translations
We need to keep using translatable="yes", since
that is what the installed its file is looking
for.

Fixes: #4957
2022-06-01 14:47:08 -04:00
Hugo Parente Lima
69b1b4d95b Fix introspection annotation for gtk_stack_get_page
Annotate gtk_stack_get_page return value as nullable.

Fixes #4958
2022-05-31 20:49:58 -03:00
Matthias Clasen
3e766a4fe2 4.6.5 2022-05-30 16:26:00 -04:00
Matthias Clasen
60a8367594 Merge branch 'gtk-4-6-backports' into 'gtk-4-6'
Drop the quit-mnemonic reftest

See merge request GNOME/gtk!4775
2022-05-30 11:22:32 +00:00
Aurimas Černius
22b9cf1644 Updated Lithuanian translation 2022-05-29 22:39:41 +03:00
Benjamin Otte
224a8390eb testsuite: Add tests for label overdraw
This brings back a subset of what quit-mnemonic.ui tested for, but
trying a lot harder to trigger the label overdrawing its allocation,
which will cause the text to be cut off when clipping is happening.

It should not be an issue at all with GTK4, but keeping that test around
is a good idea.
2022-05-29 08:13:09 -04:00