Commit Graph

76472 Commits

Author SHA1 Message Date
Marco Trevisan (Treviño)
4fcf899852 gdkselectioninputstream-x11: Make it clearer how we manage the stream ownership
It gets unreffed during gdk_x11_selection_input_stream_complete, so use
APIs that make this clearer.
2023-05-30 17:54:29 +02:00
Marco Trevisan (Treviño)
371e860184 gtkselectioninputstream-x11: Do not add an extra reference to the returned stream
We create a new stream during gdk_x11_selection_input_stream_new_async()
then such stream is referenced when passed to the task via
g_task_return_pointer(), so there's no need to reference it again before
returning it, or we'd end up leaking.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4892
2023-05-30 17:50:56 +02:00
Marco Trevisan (Treviño)
bce1e0bfdd gtkselectioninputstream-x11: Do not add unreffed bytes to the chunks queue
This should never happen, but we may exit the loop because of count value
with an unreffed bytes pointer being added back to the chunks queue.
2023-05-30 17:43:57 +02:00
Marco Trevisan (Treviño)
468d2cb7f2 gtkselectioninputstream-x11: Do not add EOF marker twice to the chunks queue
We were adding the same EOF marker two times back to the chunks queue,
one implicitly, and the other time could happen when exiting the loop.
2023-05-30 17:42:59 +02:00
Jordi Mas
b520a5ceda Update Catalan translation 2023-05-30 06:41:10 +02:00
Matthias Clasen
e6bc82cff5 Merge branch 'fix_gtkstack_crash' into 'main'
GtkStack: Fix a potential crash in gtk_stack_get_first_accessible_child

See merge request GNOME/gtk!6031
2023-05-29 23:38:05 +00:00
Matthias Clasen
d021aa7bd2 Merge branch 'macos-fixes' into 'main'
For main

See merge request GNOME/gtk!6032
2023-05-29 23:37:22 +00:00
Luca Bacci
703494c7fa testsuite: rename 'wait' function to 'timed_loop'
When compiling for macOS, CLang errors out because a non-static
wait function is declared in sys/wait.h.
2023-05-29 16:43:28 +02:00
Luca Bacci
d642072603 Check for NULL groups in gtk_action_muxer_get_group ()
The groups hash table is initialized lazily when inserting
the first GActionGroup (gtk_action_muxer_insert ()). Do as
all surrounding code does and check for NULL before using
groups.

This avoids triggering a warning
2023-05-29 16:43:28 +02:00
Lukáš Tyrychtr
ab7a4f64cb GtkStack: Fix a potential crash in gtk_stack_get_first_accessible_child
This one can occur when the stack has no pages.
2023-05-29 15:14:51 +02:00
Luca Bacci
21c53a1969 Merge branch 'win32-monitors' into 'main'
GdkWin32Monitor fixes

See merge request GNOME/gtk!6015
2023-05-29 09:50:30 +00:00
Matthias Clasen
ae2dd1d907 Merge branch 'matthiasc/for-main' into 'main'
css: Add a test for non-ASCII font family

See merge request GNOME/gtk!6028
2023-05-28 17:58:38 +00:00
Matthias Clasen
f10c234361 css: Add a test for non-ASCII font family
This came up in #5852, so make sure that it works.
2023-05-28 07:57:40 -04:00
Matthias Clasen
3a650bff66 Merge branch 'matthiasc/for-main' into 'main'
Annotate more enum additions

See merge request GNOME/gtk!6027
2023-05-28 11:41:48 +00:00
Matthias Clasen
e9f622b81f listitemmanager: Small docs clarifications
If we write docs for private functions,
lets make them relevant.
2023-05-28 07:19:02 -04:00
Matthias Clasen
a85ad2ce67 Annotate more enum additions
We have the technology now, lets use it.
2023-05-28 07:19:02 -04:00
Daniel Boles
2af7e45860 MenuButton: Always mention child@always-show-arrow
get_always_show_arrow() did not mention at all that the custom child is
relevant. set_always_show_arrow() only did in the blurb, not for the arg
2023-05-28 11:35:44 +01:00
Matthias Clasen
2741e00210 Merge branch 'test-sections' into 'main'
testsections: A testbed for sections

See merge request GNOME/gtk!6025
2023-05-28 01:54:06 +00:00
Matthias Clasen
495411e16d testsections: A testbed for sections
Add a simple test client that lets us compare
and explore the section handling in listview
and gridview.
2023-05-27 21:30:14 -04:00
Matthias Clasen
9880f9d16a Merge branch 'slice-sections' into 'main'
Beef up our section models

Closes #5854

See merge request GNOME/gtk!6009
2023-05-28 01:00:04 +00:00
Matthias Clasen
5c1c22156c sortlistmodel: Optimize signals
When we emit items-changed due to a section
sorter change, don't also emit sections-changed.
Instead make the items-changed signal cover the
whole range.

Tests included.
2023-05-27 20:37:28 -04:00
Matthias Clasen
d7e8c52d37 Merge branch 'fix-section-sorter-keys' into 'main'
sortlistmodel: Fix handling of section sort keys

Closes #5854

See merge request GNOME/gtk!6024
2023-05-27 23:37:35 +00:00
Matthias Clasen
c3d3e2d47b sortlistmodel: Fix handling of section sort keys
When the section sorter changes, we need to update
the keys, otherwise the sorter will continue to report
the old sections.

This code is currently a bit suboptimal, since the
creation of sort keys and section sort keys are
muddled together.

Fixes: #5854
2023-05-27 19:09:05 -04:00
Matthias Clasen
9c1049e710 multiselection: Pass through sections-changed
If our underlying model emits sections-changed,
we need to pass it on.

Add a test for this too.
2023-05-27 17:27:19 -04:00
Matthias Clasen
a1352a88ff singleselection: Pass through sections-changed
If our underlying model emits sections-changed,
we need to pass it on.

Add a test for this too.
2023-05-27 17:27:19 -04:00
Matthias Clasen
8825917140 noselection: Pass through sections-changed
If our underlying model emits sections-changed,
we need to pass it on.

Add a test for this too.
2023-05-27 17:27:19 -04:00
Matthias Clasen
ba8d4902b5 filterlistmodel: Pass through sections-changed
If our underlying model emits sections-changed,
we need to pass it on.

Add a test for this too.
2023-05-27 17:27:19 -04:00
Matthias Clasen
8f3d3ca587 slicelistmodel: Pass through sections
Implement GtkSectionModel in the obvious way.

Tests included.
2023-05-27 17:27:19 -04:00
Matthias Clasen
aeba1e08e8 sortlistmodel: Emit sections-changed
When a new section sorter is set, potentially
all sections have changed. So emit sections-changed
for all items.

Tests included.
2023-05-27 17:27:19 -04:00
Matthias Clasen
9f47bfe193 sortlistmodel: Fix handling of section sort keys
When the section sorter changes, we need to update
    the keys, otherwise the sorter will continue to report
    the old sections.

    This code is currently a bit suboptimal, since the
    creation of sort keys and section sort keys are
    muddled together.

    Fixes: #5854
2023-05-27 17:27:19 -04:00
Benjamin Otte
43417e9e55 Merge branch 'columnview-sections' into 'main'
Columnview sections

See merge request GNOME/gtk!6006
2023-05-27 18:51:12 +00:00
Matthias Clasen
bbb7446e93 Merge branch 'matthiasc/for-main' into 'main'
docs: Cosmetics

See merge request GNOME/gtk!6023
2023-05-27 18:42:34 +00:00
Matthias Clasen
6623baeb52 docs: Cosmetics 2023-05-27 14:40:49 -04:00
Matthias Clasen
d90b09f8c3 Merge branch 'matthiasc/for-main' into 'main'
sortlistmodel: Cosmetics

See merge request GNOME/gtk!6022
2023-05-27 18:30:37 +00:00
Matthias Clasen
bcae6271df Merge branch 'handle-sections-changed' into 'main'
wip: list widgets: handle sections-changed

See merge request GNOME/gtk!6011
2023-05-27 17:55:00 +00:00
Matthias Clasen
fc524ed346 Cosmetics
Fix copy-paste errors in line 1.
2023-05-27 13:51:39 -04:00
Matthias Clasen
c80a0c0e85 sortlistmodel: Cosmetics
Make the set_[section]_sorter functions a bit more symmetric.
2023-05-27 13:47:46 -04:00
Matthias Clasen
7572f2ed87 columnview: Add section plumbing
Add a header-factory property, and pass it through
to the listview.
2023-05-27 13:39:55 -04:00
Matthias Clasen
54ec750238 Merge branch 'matthiasc/for-main' into 'main'
gtk: Annotate new enum values

See merge request GNOME/gtk!6021
2023-05-27 13:35:27 +00:00
Matthias Clasen
5d78cf6546 Merge branch 'wip/kabus/popover-direction' into 'main'
gtk/popover: Flip anchoring direction in RTL

Closes #5847

See merge request GNOME/gtk!6020
2023-05-27 13:19:28 +00:00
Khalid Abu Shawarib
d329b00bda gtk/popover: Flip anchoring direction in RTL 2023-05-27 13:19:28 +00:00
Matthias Clasen
ddf1ea9917 gtk: Annotate new enum values
We have decorators now to tell compilers when
enum values were added, so lets use them for the
new GtkAlign values.
2023-05-27 08:02:15 -04:00
Matthias Clasen
215f60e450 listitemmanager: Listen to sections-changed
And recreate header and footer tiles as needed.

This commit was tested using a sortlistmodel, changing
the section sorter from sorting only by first char
to sorting by the first two chars, which changes
the number of sections, but leaves the alphabetic
order of items unchanged.
2023-05-27 06:33:50 -04:00
Sabri Ünal
87070e0bdd Update Turkish translation 2023-05-26 22:48:53 +00:00
Matthias Clasen
19f51b5de2 Merge branch 'docs/gdk-RGBA-parse' into 'main'
docs: add HSL to Gdk.RGBA.parse

See merge request GNOME/gtk!6017
2023-05-25 17:40:08 +00:00
FineFindus
2d8c112f08
docs: add HSL to Gdk.RGBA.parse
Update the Gdk.RGBA.parse docs to reflect the ability to parse HSL, which has been added in 4.5.0.
2023-05-25 17:16:55 +02:00
Matthias Clasen
f1901081a6 NEWS: Updates 2023-05-24 22:03:48 -04:00
Jason Francis
cf79ad4433
win32: implement fullscreen_on_monitor
Track the HMONITOR so it can be used by the toplevel layout.
2023-05-24 18:48:37 -04:00
Benjamin Otte
d912628583 Merge branch 'wip/otte/for-main' into 'main'
2 GDK GL XWayland improvements

See merge request GNOME/gtk!6014
2023-05-24 22:22:48 +00:00
Jason Francis
f254ab700c
win32: Invalidate inactive monitors
Without this, there are still GdkMonitors present for displays that are
present but disconnected (such as when a laptop disables the internal
display to connect to an external monitor).
2023-05-24 17:34:34 -04:00