Commit Graph

75708 Commits

Author SHA1 Message Date
Marco Trevisan (Treviño)
584fd36a5f gtk: Improve documentation on returned nodes for snapshot
Closes: #5747
2023-04-14 18:05:21 +02:00
Marco Trevisan (Treviño)
31c5961c4f gtk/dialogs: Destroy the window promptly on finish async function
Some bindings (GJS!) could add temporary references to the GAsyncResult
argument that we return, and thus to the GTask, which may cause the
dialog not to close when the finish function is called (but at garbage
collection instead!).

To prevent this, just manually destroy the window (by removing the task
data), so that we are not bound to the GTask lifetime anymore.

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5741
2023-04-12 15:39:39 +02:00
Matthias Clasen
e9f7a9b8e6 Merge branch 'matthiasc/for-main' into 'main'
filechooser: Fix the gridview

See merge request GNOME/gtk!5817
2023-04-11 06:10:56 +00:00
Matthias Clasen
93b1130c07 filechooser: Fix the gridview
2a70093a30 was a bit overeager in its porting
to GtkColumnViewCell. The gridview needs to keep its
list items.
2023-04-11 07:41:09 +02:00
Matthias Clasen
db48cd6467 Merge branch 'wip/corey/file-chooser-widget' into 'main'
More fixes to filechooserwidget

See merge request GNOME/gtk!5815
2023-04-11 05:32:38 +00:00
Matthias Clasen
ba43a126b9 Merge branch 'wip/corey/filesystemmodel' into 'main'
filesystemmodel: Notify correct position removed in remove_file()

See merge request GNOME/gtk!5814
2023-04-11 05:27:24 +00:00
Corey Berla
2a70093a30 filechooser: Set date and time after cell is a child of filechooserwidget
The date/time column relies on the filechooserwidget to format the date
properly.  During bind, the filechoosercell, get the filechooserwidget
ancestor, but now due to changes in the listview, the cell isn't a
child of the filechooserwidget at that point.  Since this is deeply
ingrained into the filechooserwidget, let's keep the same behavior,
but move it to filechoosercell in realize.  Alternatively, we could have
used a signal factory (with the file chooser widget as the user data),
but that would have been a major overhaul.
2023-04-10 18:02:35 -07:00
Corey Berla
dd407dab00 filechoosercell: Store type_format in filechoosercell
The format of the type column depends on the the type_format, which
is stored in the filechooserwidget.  We get that setting by looking
for the filechooserwidget ancestor, which no longer works after recent
changes to the list views (it was fragile to begin with).  At one point,
the setting appears to have been dynamic, but now it is only loading
from GSettings, so let's simply do the same within FileChooserCell.
2023-04-10 18:02:35 -07:00
Corey Berla
ccae75022b filechooserwidget: Finish port to GtkColumnViewCell
Some missing updates from f5dea9a3c2
2023-04-10 18:02:24 -07:00
Corey Berla
faac2f7894 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.
2023-04-10 12:56:08 -07:00
Matthias Clasen
d00b78d283 Merge branch 'matthiasc/for-main' into 'main'
node-editor: Typo fixes

See merge request GNOME/gtk!5812
2023-04-10 14:28:38 +00:00
Matthias Clasen
3eee1c0724 node-editor: Typo fixes
Fix some typos in the node format documentation.
2023-04-10 16:04:17 +02:00
Matthias Clasen
5e6bc681a3 Merge branch 'scrolled-window-critical' into 'main'
scrolledwindow: Avoid a critical

See merge request GNOME/gtk!5809
2023-04-10 05:50:20 +00:00
Matthias Clasen
87e16f3ad9 testsuite: Check widget properties better
Check that setting a property after resetting
it works. An instance of this was fixed in the
previous commit.
2023-04-10 00:24:57 -04:00
Matthias Clasen
aa9e83876d scrolledwindow: Avoid a critical
When setting the child property to NULL, we also need
to unset auto_added_viewport, to avoid triggering a
critical when setting it again.
2023-04-10 00:22:20 -04:00
Matthias Clasen
d8796b3075 Merge branch 'warn-show-destoyed-window' into 'main'
Show a warning when a destroyed window is shown

See merge request GNOME/gtk!5122
2023-04-09 20:16:52 +00:00
Matthias Clasen
cefd720789 Merge branch 'matthiasc/for-main' into 'main'
gtk-demo: Add a keyword

See merge request GNOME/gtk!5805
2023-04-09 13:02:55 +00:00
Matthias Clasen
d4a34b1a0b gtk-demo: Stop using gtk_widget_get_allocation 2023-04-09 08:38:14 -04:00
Matthias Clasen
b7f48b7763 gtk-demo: Add a keyword
Make the demo using the 'bluroverlay' come up when you type 'blur'.
2023-04-09 08:38:14 -04:00
Matthias Clasen
61a0d06310 Merge branch 'matthiasc/for-main' into 'main'
range: Fix a copy-paste error

See merge request GNOME/gtk!5803
2023-04-09 12:37:44 +00:00
Matthias Clasen
34b6d46276 placessidebar: Stop using gtk_widget_get_allocation 2023-04-09 06:48:27 -04:00
Matthias Clasen
8957d4cb4f coloreditor: Stop using gtk_widget_get_allocation 2023-04-09 06:48:27 -04:00
Matthias Clasen
95f5c7beb6 range: Fix a copy-paste error
This was showing up as the alpha popup in
the color editor not being positioned correctly.
2023-04-09 06:48:27 -04:00
Benjamin Otte
3907711a49 Merge branch 'gbsneto/vulkan-glyph-fixes' into 'main'
Vulkan glyph fixes

See merge request GNOME/gtk!5802
2023-04-09 00:07:16 +00:00
Georges Basile Stavracas Neto
496c8f4a11 gsk/vulkan/glyphcache: Rework glyphs
The current implementation of the glyph cache deals with atlases by
padding them with 1 pixel at the beginning, at the end, and between
each glyph.

That's cool and all, however, there's a very subtle problem with
this approach: the contents of the atlas are garbage, so this padding
is filled with garbage memory!

Rework the Vulkan glyph cache to draw each and every glyph in a
surface that has 1 pixel border of padding around it. Ensure the
surface is completely black by drawing a rectangle before handing
it to Pango to draw the glyph. Update tx and ty to pick the texture
position adjusted to the 1 pixel padding. The atlas now starts at
position (0, 0), since each glyph individually contains its own padding.

To improve legibility, add a PADDING define and use it everywhere.
2023-04-08 20:13:13 -03:00
Georges Basile Stavracas Neto
8b6f69946c gsk/vulkan/pipeline: Simplify pipeline creation
Nothing uses gsk_vulkan_pipeline_new_full() anymore.
2023-04-08 20:13:13 -03:00
Georges Basile Stavracas Neto
48129298f0 gsk/vulkan: Use default blend factors
Vulkan renders text using VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA and
VK_BLEND_FACTOR_SRC_ALPHA, but that implies per-channel alpha
blending, which currently produces the wrong results when blending
glyphs with the images beneath them.

Use the default pipeline constructors, which implies using the
ONE and ONE_MINUS_SRC_ALPHA.
2023-04-08 20:13:13 -03:00
Georges Basile Stavracas Neto
c77c8d6309 gsk/vulkan: Cosmetics
Reorder code to match the order used in shaders.
2023-04-08 20:13:13 -03:00
Matthias Clasen
2c3f82fd01 Tweak the wording of the message. 2023-04-08 16:14:52 +00:00
Matthias Clasen
99251c0c8f Merge branch 'wip/carlosg/popover-ungrab-on-unmap' into 'main'
gtkpopover: Move GTK grabs to map/unmap

Closes #5730

See merge request GNOME/gtk!5801
2023-04-07 20:24:24 +00:00
Carlos Garnacho
1709538756 gtkpopover: Move GTK grabs to map/unmap
Typically, a popover gets mapped when shown and unmapped when
hidden. A situation there that breaks is where the popover gets
recursively unmapped/unrealized when its root is destroyed.

In that situation, the popover does however unmap (without being
hidden first), moving the GTK grab from show/hide to map/unmap
will handle the previous situations, plus this one.

Fixes things being unclickable if e.g. a modal dialog got a
popover popped up, then got closed via Alt-F4.

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5730
2023-04-07 22:12:41 +02:00
Matthias Clasen
da5433e140 Merge branch 'inspector-action-fixes' into 'main'
actionmuxer: Make the compiler warn

See merge request GNOME/gtk!5800
2023-04-07 18:05:19 +00:00
Matthias Clasen
36c1003328 inspector: Redo the actions list
Make the actions list implement GtkActionObserver
for the muxer case, and make updates work.
2023-04-07 13:45:45 -04:00
Matthias Clasen
3eabcde868 inspector: Simplify the action editor
No need to listen for changes, the actions list
code will do so and tell us to update.
2023-04-07 13:45:12 -04:00
Matthias Clasen
7664048779 inspector: Add ActionHolder::changed
We will use this signal to communicate
action changes to the action list widgetry.
2023-04-07 13:17:22 -04:00
Matthias Clasen
8648ecf889 inspector: Cosmetics
Make the variant editor use a checkbutton
instead of a togglebutton.
2023-04-07 13:17:22 -04:00
Matthias Clasen
f1a01fb973 actionmuxer: Add a precondition
This helps with debugging the inspectors action
handling.
2023-04-07 12:53:57 -04:00
Alexander Shopov
b549a52f54 Update Bulgarian translation
(cherry picked from commit f15aa82eaf)
2023-04-07 16:27:04 +00:00
Matthias Clasen
6c97667be1 inspector: Be more careful
Tweak the variant-editor code to handle some
cases more explicitly.
2023-04-07 09:16:21 -04:00
Matthias Clasen
ce597cf034 inspector: Plug a memory leak 2023-04-07 08:55:40 -04:00
Matthias Clasen
cdcb55da58 inspector: Be safer when handling actions
Those query apis are serious about not ignoring
their return value, and may not set their our
arguments to anything if they return FALSE.
2023-04-07 08:52:51 -04:00
Matthias Clasen
b8d02c9398 actionmuxer: Make the compiler warn
Warn when the boolean return isn't used, since we
may not initialize the out arguments in the FALSE
case (see the previous commits).
2023-04-07 08:03:46 -04:00
Matthias Clasen
d97514ec67 textview: Handle a return value 2023-04-07 08:03:46 -04:00
Matthias Clasen
a96df553e0 Merge branch '5729_fix_inspector_crash' into 'main'
inspector: fix crash caused by uninitialized GVariant

Closes #5729

See merge request GNOME/gtk!5799
2023-04-07 12:01:22 +00:00
Nelson Benítez León
ed8148bd07 inspector: fix crash caused by uninitialized GVariant
we were not checking the return gboolean of
gtk_action_muxer_query_action() which was
returning FALSE for the crash case, meaning
it didn't set the passed in GVariant, but
we were still using it as it was non-null.

Fixes #5729
2023-04-06 20:05:53 -04:00
Matthias Clasen
e0dbc6a0ee Merge branch 'media-controls' into 'main'
mediacontrols: Add tooltip text to play button

See merge request GNOME/gtk!5794
2023-04-06 17:59:54 +00:00
Matthias Clasen
fb91418edd Merge branch 'alert_dialog_role_mapping_fix' into 'main'
a11y: Map GTK_ACCESSIBLE_ROLE_ALERT_DIALOG to ATSPI_ROLE_ALERT

See merge request GNOME/gtk!5796
2023-04-06 17:59:05 +00:00
Matthias Clasen
154ff6fe03 Merge branch 'matthiasc/for-main' into 'main'
glarea: Fix property notification

See merge request GNOME/gtk!5797
2023-04-06 15:06:26 +00:00
Matthias Clasen
a65dc036b1 glarea: Fix property notification
This was broken in 9c26262e3e.
2023-04-06 10:37:58 -04:00
Maximiliano Sandoval R
62865bc52d
mediacontrols: Add tooltip text to play button
This makes the button accessible.
2023-04-06 16:16:41 +02:00