gtk4.git
2 years agoGdkWin32: Remove declarations of unused types from gdkprivate-win32.h
Luca Bacci [Tue, 30 May 2023 17:57:04 +0000 (19:57 +0200)]
GdkWin32: Remove declarations of unused types from gdkprivate-win32.h

2 years agoGdkWin32: Remove declarations of unexisting functions from gdkprivate-win32.h
Luca Bacci [Tue, 30 May 2023 17:56:45 +0000 (19:56 +0200)]
GdkWin32: Remove declarations of unexisting functions from gdkprivate-win32.h

2 years agoGdkWin32: Remove defines for old MinGW headers
Luca Bacci [Tue, 30 May 2023 17:55:21 +0000 (19:55 +0200)]
GdkWin32: Remove defines for old MinGW headers

2 years agoGdkWin32: Remove _gdk_display_hdc global variable
Luca Bacci [Tue, 30 May 2023 17:52:13 +0000 (19:52 +0200)]
GdkWin32: Remove _gdk_display_hdc global variable

2 years agoGdkWin32: Turn a few functions to static
Luca Bacci [Tue, 30 May 2023 17:51:57 +0000 (19:51 +0200)]
GdkWin32: Turn a few functions to static

When used only in the source file they're defined in.
Also remove the corresponding declarations from
gdkrivate-win32.h.

2 years agoGdkWin32: Remove unused debug functions
Luca Bacci [Tue, 30 May 2023 17:51:38 +0000 (19:51 +0200)]
GdkWin32: Remove unused debug functions

 * _gdk_win32_print_paletteentries
 * _gdk_win32_print_system_palette
 * _gdk_win32_print_hpalette
 * _gdk_win32_drag_protocol_to_string
 * _gdk_win32_data_to_string
 * _gdk_win32_gdkrectangle_to_string
 * _gdk_win32_cairo_region_to_string
 * _gdk_win32_surface_description

2 years agoUpdate manifest XML for the GTK DLL
Luca Bacci [Tue, 30 May 2023 17:33:19 +0000 (19:33 +0200)]
Update manifest XML for the GTK DLL

2 years agoDo not keep HINSTANCE variables around
Luca Bacci [Thu, 23 Mar 2023 15:27:17 +0000 (16:27 +0100)]
Do not keep HINSTANCE variables around

Use &__ImageBase for the GTK DLL and GetModuleHandle (NULL)
for the application module. Then remove DllMain as it's not
necessary anymore.

References:

 [1] Accessing the current module's HINSTANCE from a static library:
     https://devblogs.microsoft.com/oldnewthing/20041025-00/?p=37483

2 years agoUpdate Catalan translation
Jordi Mas [Tue, 30 May 2023 04:41:10 +0000 (06:41 +0200)]
Update Catalan translation

2 years agoMerge branch 'fix_gtkstack_crash' into 'main'
Matthias Clasen [Mon, 29 May 2023 23:38:05 +0000 (23:38 +0000)]
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

2 years agoMerge branch 'macos-fixes' into 'main'
Matthias Clasen [Mon, 29 May 2023 23:37:22 +0000 (23:37 +0000)]
Merge branch 'macos-fixes' into 'main'

For main

See merge request GNOME/gtk!6032

2 years agotestsuite: rename 'wait' function to 'timed_loop'
Luca Bacci [Fri, 26 May 2023 15:46:08 +0000 (17:46 +0200)]
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.

2 years agoCheck for NULL groups in gtk_action_muxer_get_group ()
Luca Bacci [Wed, 17 May 2023 12:00:56 +0000 (14:00 +0200)]
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

2 years agoGtkStack: Fix a potential crash in gtk_stack_get_first_accessible_child
Lukáš Tyrychtr [Mon, 29 May 2023 13:14:51 +0000 (15:14 +0200)]
GtkStack: Fix a potential crash in gtk_stack_get_first_accessible_child

This one can occur when the stack has no pages.

2 years agoMerge branch 'win32-monitors' into 'main'
Luca Bacci [Mon, 29 May 2023 09:50:30 +0000 (09:50 +0000)]
Merge branch 'win32-monitors' into 'main'

GdkWin32Monitor fixes

See merge request GNOME/gtk!6015

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sun, 28 May 2023 17:58:38 +0000 (17:58 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

css: Add a test for non-ASCII font family

See merge request GNOME/gtk!6028

2 years agocss: Add a test for non-ASCII font family
Matthias Clasen [Sun, 28 May 2023 11:57:40 +0000 (07:57 -0400)]
css: Add a test for non-ASCII font family

This came up in #5852, so make sure that it works.

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sun, 28 May 2023 11:41:48 +0000 (11:41 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

Annotate more enum additions

See merge request GNOME/gtk!6027

2 years agolistitemmanager: Small docs clarifications
Matthias Clasen [Sun, 28 May 2023 11:04:49 +0000 (07:04 -0400)]
listitemmanager: Small docs clarifications

If we write docs for private functions,
lets make them relevant.

2 years agoAnnotate more enum additions
Matthias Clasen [Sun, 28 May 2023 11:18:42 +0000 (07:18 -0400)]
Annotate more enum additions

We have the technology now, lets use it.

2 years agoMenuButton: Always mention child@always-show-arrow
Daniel Boles [Sun, 28 May 2023 10:35:44 +0000 (11:35 +0100)]
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

2 years agoMerge branch 'test-sections' into 'main'
Matthias Clasen [Sun, 28 May 2023 01:54:06 +0000 (01:54 +0000)]
Merge branch 'test-sections' into 'main'

testsections: A testbed for sections

See merge request GNOME/gtk!6025

2 years agotestsections: A testbed for sections
Matthias Clasen [Wed, 17 May 2023 20:27:06 +0000 (16:27 -0400)]
testsections: A testbed for sections

Add a simple test client that lets us compare
and explore the section handling in listview
and gridview.

2 years agoMerge branch 'slice-sections' into 'main'
Matthias Clasen [Sun, 28 May 2023 01:00:04 +0000 (01:00 +0000)]
Merge branch 'slice-sections' into 'main'

Beef up our section models

Closes #5854

See merge request GNOME/gtk!6009

2 years agosortlistmodel: Optimize signals
Matthias Clasen [Sat, 27 May 2023 23:40:20 +0000 (19:40 -0400)]
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.

2 years agoMerge branch 'fix-section-sorter-keys' into 'main'
Matthias Clasen [Sat, 27 May 2023 23:37:35 +0000 (23:37 +0000)]
Merge branch 'fix-section-sorter-keys' into 'main'

sortlistmodel: Fix handling of section sort keys

Closes #5854

See merge request GNOME/gtk!6024

2 years agosortlistmodel: Fix handling of section sort keys
Matthias Clasen [Sat, 27 May 2023 21:26:39 +0000 (17:26 -0400)]
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
2 years agomultiselection: Pass through sections-changed
Matthias Clasen [Tue, 23 May 2023 15:24:02 +0000 (11:24 -0400)]
multiselection: Pass through sections-changed

If our underlying model emits sections-changed,
we need to pass it on.

Add a test for this too.

2 years agosingleselection: Pass through sections-changed
Matthias Clasen [Tue, 23 May 2023 15:17:54 +0000 (11:17 -0400)]
singleselection: Pass through sections-changed

If our underlying model emits sections-changed,
we need to pass it on.

Add a test for this too.

2 years agonoselection: Pass through sections-changed
Matthias Clasen [Tue, 23 May 2023 15:10:49 +0000 (11:10 -0400)]
noselection: Pass through sections-changed

If our underlying model emits sections-changed,
we need to pass it on.

Add a test for this too.

2 years agofilterlistmodel: Pass through sections-changed
Matthias Clasen [Tue, 23 May 2023 13:13:00 +0000 (09:13 -0400)]
filterlistmodel: Pass through sections-changed

If our underlying model emits sections-changed,
we need to pass it on.

Add a test for this too.

2 years agoslicelistmodel: Pass through sections
Matthias Clasen [Tue, 23 May 2023 10:24:34 +0000 (06:24 -0400)]
slicelistmodel: Pass through sections

Implement GtkSectionModel in the obvious way.

Tests included.

2 years agosortlistmodel: Emit sections-changed
Matthias Clasen [Tue, 23 May 2023 10:30:40 +0000 (06:30 -0400)]
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.

2 years agosortlistmodel: Fix handling of section sort keys
Matthias Clasen [Sat, 27 May 2023 21:26:39 +0000 (17:26 -0400)]
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
2 years agoMerge branch 'columnview-sections' into 'main'
Benjamin Otte [Sat, 27 May 2023 18:51:12 +0000 (18:51 +0000)]
Merge branch 'columnview-sections' into 'main'

Columnview sections

See merge request GNOME/gtk!6006

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sat, 27 May 2023 18:42:34 +0000 (18:42 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

docs: Cosmetics

See merge request GNOME/gtk!6023

2 years agodocs: Cosmetics
Matthias Clasen [Tue, 23 May 2023 11:05:29 +0000 (07:05 -0400)]
docs: Cosmetics

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sat, 27 May 2023 18:30:37 +0000 (18:30 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

sortlistmodel: Cosmetics

See merge request GNOME/gtk!6022

2 years agoMerge branch 'handle-sections-changed' into 'main'
Matthias Clasen [Sat, 27 May 2023 17:55:00 +0000 (17:55 +0000)]
Merge branch 'handle-sections-changed' into 'main'

wip: list widgets: handle sections-changed

See merge request GNOME/gtk!6011

2 years agoCosmetics
Matthias Clasen [Sat, 27 May 2023 12:28:41 +0000 (08:28 -0400)]
Cosmetics

Fix copy-paste errors in line 1.

2 years agosortlistmodel: Cosmetics
Matthias Clasen [Sat, 27 May 2023 11:23:05 +0000 (07:23 -0400)]
sortlistmodel: Cosmetics

Make the set_[section]_sorter functions a bit more symmetric.

2 years agocolumnview: Add section plumbing
Matthias Clasen [Mon, 22 May 2023 11:43:41 +0000 (07:43 -0400)]
columnview: Add section plumbing

Add a header-factory property, and pass it through
to the listview.

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sat, 27 May 2023 13:35:27 +0000 (13:35 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

gtk: Annotate new enum values

See merge request GNOME/gtk!6021

2 years agoMerge branch 'wip/kabus/popover-direction' into 'main'
Matthias Clasen [Sat, 27 May 2023 13:19:28 +0000 (13:19 +0000)]
Merge branch 'wip/kabus/popover-direction' into 'main'

gtk/popover: Flip anchoring direction in RTL

Closes #5847

See merge request GNOME/gtk!6020

2 years agogtk/popover: Flip anchoring direction in RTL
Khalid Abu Shawarib [Sat, 27 May 2023 13:19:28 +0000 (13:19 +0000)]
gtk/popover: Flip anchoring direction in RTL

2 years agogtk: Annotate new enum values
Matthias Clasen [Sat, 27 May 2023 12:00:47 +0000 (08:00 -0400)]
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.

2 years agolistitemmanager: Listen to sections-changed
Matthias Clasen [Tue, 23 May 2023 17:49:04 +0000 (13:49 -0400)]
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.

2 years agoUpdate Turkish translation
Sabri Ünal [Fri, 26 May 2023 22:48:53 +0000 (22:48 +0000)]
Update Turkish translation

2 years agoMerge branch 'docs/gdk-RGBA-parse' into 'main'
Matthias Clasen [Thu, 25 May 2023 17:40:08 +0000 (17:40 +0000)]
Merge branch 'docs/gdk-RGBA-parse' into 'main'

docs: add HSL to Gdk.RGBA.parse

See merge request GNOME/gtk!6017

2 years agodocs: add HSL to Gdk.RGBA.parse
FineFindus [Thu, 25 May 2023 15:16:55 +0000 (17:16 +0200)]
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.

2 years agoNEWS: Updates
Matthias Clasen [Thu, 25 May 2023 02:03:48 +0000 (22:03 -0400)]
NEWS: Updates

2 years agowin32: implement fullscreen_on_monitor
Jason Francis [Wed, 24 May 2023 22:48:37 +0000 (18:48 -0400)]
win32: implement fullscreen_on_monitor

Track the HMONITOR so it can be used by the toplevel layout.

2 years agoMerge branch 'wip/otte/for-main' into 'main'
Benjamin Otte [Wed, 24 May 2023 22:22:48 +0000 (22:22 +0000)]
Merge branch 'wip/otte/for-main' into 'main'

2 GDK GL XWayland improvements

See merge request GNOME/gtk!6014

2 years agowin32: Invalidate inactive monitors
Jason Francis [Wed, 24 May 2023 21:34:34 +0000 (17:34 -0400)]
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).

2 years agoglx: Implement support for EXT_swap_control
Benjamin Otte [Thu, 18 May 2023 00:02:03 +0000 (02:02 +0200)]
glx: Implement support for EXT_swap_control

XWayland (at least on gnome-shell) does not support SGI_swap_control,
which we were using to unset the swap interval.

It does support EXT_swap_control though, which is the more modern
version of the same thing, so this commit adds support for that.

And now GDK_DEBUG=no-vsync gives me >1000fps instead of just 60fps,

2 years agogl: Update tracked buffers from 2 to 4
Benjamin Otte [Wed, 24 May 2023 19:41:47 +0000 (21:41 +0200)]
gl: Update tracked buffers from 2 to 4

With XWayland and direct scanout it is possible that some apps get into
a situation where more than 2 buffers are in flight and in that case we
want to be able to still track the change regions for those buffers.

Usually 3 buffers are in use, so we go one higher, just to be safe.

2 years agogl: Rewrite update area tracking code
Benjamin Otte [Wed, 24 May 2023 19:40:20 +0000 (21:40 +0200)]
gl: Rewrite update area tracking code

Make it more generic. That way we could dynamically change the number of
buffers we track.

We don't do that yet though.

2 years agoMerge branch 'lores-scroll-mid-detent' into 'main'
Carlos Garnacho [Wed, 24 May 2023 14:23:47 +0000 (14:23 +0000)]
Merge branch 'lores-scroll-mid-detent' into 'main'

Send low-res scroll event in the middle of the wheel detent

See merge request GNOME/gtk!5128

2 years agogtkeventcontrollerscroll: Send lores scroll in the middle of the detent
José Expósito [Mon, 17 Oct 2022 17:10:37 +0000 (19:10 +0200)]
gtkeventcontrollerscroll: Send lores scroll in the middle of the detent

Some mice send a value slightly lower than 120 for some detents. The
current approach waits until a value of 120 is reached before sending a
low-resolution scroll event.

For example, the MX Master 3 sends a value of 112 in some detents:

              detent                   detent
    |                        |                       |
                        ^    ^                    ^
                        112  REL_WHEEL            224

As illustrated, only one event was sent but two were expected. However,
sending the low-resolution scroll event in the middle plus the existing
heuristics to reset the accumulator solve this issue:

              detent                   detent
    |                        |                       |
                ^          ^             ^          ^
                REL_WHEEL  112           REL_WHEEL  224

Send low-resolution scroll events in the middle of the detent to solve
this problem.

Related to https://gitlab.gnome.org/GNOME/mutter/-/issues/2469

2 years agoMerge branch 'reomveunused' into 'main'
Matthias Clasen [Tue, 23 May 2023 23:49:25 +0000 (23:49 +0000)]
Merge branch 'reomveunused' into 'main'

widget: Don't include gtkpopover.h

See merge request GNOME/gtk!6012

2 years agowidget: Don't include gtkpopover.h
Maximiliano Sandoval R [Tue, 23 May 2023 21:43:15 +0000 (23:43 +0200)]
widget: Don't include gtkpopover.h

It is not used.

2 years agoMerge branch 'zbrown/marshallers' into 'main'
Emmanuele Bassi [Tue, 23 May 2023 13:50:26 +0000 (13:50 +0000)]
Merge branch 'zbrown/marshallers' into 'main'

marshallers: fix up some mistypes in drags

See merge request GNOME/gtk!6010

2 years agoMerge branch 'fix-menu-padding' into 'main'
Matthias Clasen [Mon, 22 May 2023 20:50:56 +0000 (20:50 +0000)]
Merge branch 'fix-menu-padding' into 'main'

menus: Avoid unnecessary right padding

Closes #5839

See merge request GNOME/gtk!6008

2 years agoMenuButton: Fix small grammar-o/match related syms
Daniel Boles [Mon, 22 May 2023 20:39:36 +0000 (21:39 +0100)]
MenuButton: Fix small grammar-o/match related syms

2 years agomenus: Avoid unnecessary right padding
Matthias Clasen [Mon, 22 May 2023 20:14:17 +0000 (16:14 -0400)]
menus: Avoid unnecessary right padding

We are using placeholders in the 'check' column
that are put in a size group, so that they all
take the same space once a check or radio is shown.

Unfortunately, for the inline-buttons option, we
were using a GtkBuiltinIcon as placeholder, and those
respect the -gtk-icon-size CSS property and take
a minimum size of 16px. Use a GtkGizmo instead to
get the expected result of no extra padding unless
there's a check or radio.

Fixes: #5839
2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Mon, 22 May 2023 13:17:58 +0000 (13:17 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

widget-factory: Align some widgets better

See merge request GNOME/gtk!6007

2 years agowidget-factory: Align some widgets better
Matthias Clasen [Mon, 22 May 2023 12:34:54 +0000 (08:34 -0400)]
widget-factory: Align some widgets better

2 years agoMerge branch 'wip/kabus/date-leak' into 'main'
Matthias Clasen [Mon, 22 May 2023 12:25:24 +0000 (12:25 +0000)]
Merge branch 'wip/kabus/date-leak' into 'main'

gtk/recentmanager: Fix date leak

Closes #5842

See merge request GNOME/gtk!6005

2 years agogtk/recentmanager: Fix date leak
Khalid Abu Shawarib [Mon, 22 May 2023 12:25:24 +0000 (12:25 +0000)]
gtk/recentmanager: Fix date leak

2 years agoUpdate Russian translation
Арсений Засыпкин [Mon, 22 May 2023 12:18:13 +0000 (12:18 +0000)]
Update Russian translation

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sun, 21 May 2023 23:57:48 +0000 (23:57 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

Improve section model docs

See merge request GNOME/gtk!6003

2 years agoMerge branch 'fm-showitems' into 'main'
Matthias Clasen [Sun, 21 May 2023 23:22:57 +0000 (23:22 +0000)]
Merge branch 'fm-showitems' into 'main'

filelauncher: Use ShowItems to show in File Manager

Closes #5842

See merge request GNOME/gtk!5997

2 years agoImprove section model docs
Matthias Clasen [Sun, 21 May 2023 23:11:15 +0000 (19:11 -0400)]
Improve section model docs

Mention sections in the list widget overview,
and document the list models that support sections.

2 years agomarshallers: fix up some mistypes in drags
Zander Brown [Sun, 21 May 2023 18:02:16 +0000 (19:02 +0100)]
marshallers: fix up some mistypes in drags

Fix: ff330668cfee65c9b969911adb16f7d5a2bb6749

2 years agoMerge branch 'gdk-introspection-fix' into 'main'
Matthias Clasen [Sun, 21 May 2023 14:25:59 +0000 (14:25 +0000)]
Merge branch 'gdk-introspection-fix' into 'main'

introspection: Include deprecated gdk api in gir

See merge request GNOME/gtk!5999

2 years agogdk: Fix up introspection build
Matthias Clasen [Sun, 21 May 2023 13:46:49 +0000 (09:46 -0400)]
gdk: Fix up introspection build

Referring to files across directories is not
easy, we need to use files() in just the right
way to make this work.

2 years agointrospection: Include deprecated gdk api in gir
Matthias Clasen [Sun, 21 May 2023 10:58:35 +0000 (06:58 -0400)]
introspection: Include deprecated gdk api in gir

This was overlooked in when the headers were moved
in ed265f6a7e7e6f24f48.

2 years agoMerge branch 'ebassi/build-introspection' into 'main'
Matthias Clasen [Sun, 21 May 2023 12:20:12 +0000 (12:20 +0000)]
Merge branch 'ebassi/build-introspection' into 'main'

ci: Add introspection to the feature flags

See merge request GNOME/gtk!6000

2 years agoci: Add introspection to the feature flags
Emmanuele Bassi [Sun, 21 May 2023 11:22:50 +0000 (12:22 +0100)]
ci: Add introspection to the feature flags

It should be enabled by default, if we ever want to catch issues.

2 years agoMerge branch 'docs-css-fix' into 'main'
Matthias Clasen [Sun, 21 May 2023 11:02:45 +0000 (11:02 +0000)]
Merge branch 'docs-css-fix' into 'main'

Fix typo in CSS docs

See merge request GNOME/gtk!5998

2 years agoFix typo in CSS docs
Arjan Molenaar [Sat, 20 May 2023 12:11:58 +0000 (14:11 +0200)]
Fix typo in CSS docs

2 years agoMerge branch 'list-tile-gc' into 'main'
Matthias Clasen [Sun, 21 May 2023 00:51:00 +0000 (00:51 +0000)]
Merge branch 'list-tile-gc' into 'main'

Add gtk_list_item_manager_gc_tiles

See merge request GNOME/gtk!5995

2 years agogridview: Use gtk_list_item_manager_gc_tiles
Matthias Clasen [Sat, 20 May 2023 20:45:19 +0000 (16:45 -0400)]
gridview: Use gtk_list_item_manager_gc_tiles

This simplifies the code a bit.

2 years agolistview: Use gtk_list_item_manager_gc_tiles
Matthias Clasen [Sat, 20 May 2023 20:12:25 +0000 (16:12 -0400)]
listview: Use gtk_list_item_manager_gc_tiles

This simplifies the code a bit.

2 years agotestsuite: Use gtk_list_item_manager_gc_tiles
Matthias Clasen [Sat, 20 May 2023 20:12:54 +0000 (16:12 -0400)]
testsuite: Use gtk_list_item_manager_gc_tiles

Use this  new api instead of open-coding it.

Also, assert that it merges consecutive
multi-item tiles.

2 years agofilelauncher: Use ShowItems to show in File Manager
Calvin Walton [Sat, 20 May 2023 23:25:43 +0000 (19:25 -0400)]
filelauncher: Use ShowItems to show in File Manager

The non-portal fallback method for launching a file manager to show the
file in its parent directory was incorrectly using the `ShowFolders`
method (open a folder) instead of `ShowItems` (open the parent directory
and show the file).

The `show_item` function (previously `show_folder`) had an unused
`callback` parameter; it has been removed and the type of the parameter
containing the GTask has been renamed and now uses the correct type
instead of gpointer to reduce the amount of casting required.

Fixes GNOME/gtk#5842

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sat, 20 May 2023 23:22:56 +0000 (23:22 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

Cosmetics

See merge request GNOME/gtk!5996

2 years agoCosmetics
Matthias Clasen [Sat, 20 May 2023 22:50:30 +0000 (18:50 -0400)]
Cosmetics

Fix some typos.

2 years agolistitemmanager: Stop exporting tile_gc
Matthias Clasen [Sat, 20 May 2023 22:55:05 +0000 (18:55 -0400)]
listitemmanager: Stop exporting tile_gc

This function is now just used internally,
so make it static.

2 years agolistitemmanager: Use gc_tiles
Matthias Clasen [Sat, 20 May 2023 22:52:44 +0000 (18:52 -0400)]
listitemmanager: Use gc_tiles

Replace an open-coded version of this function
with a call to gtk_list_item_manager_gc_tiles.

2 years agoAdd gtk_list_item_manager_gc_tiles
Matthias Clasen [Sat, 20 May 2023 20:10:54 +0000 (16:10 -0400)]
Add gtk_list_item_manager_gc_tiles

This will allow us to simplify size allocation
code in listview and gridview.

2 years agoMerge branch 'drop-filler-tiles' into 'main'
Benjamin Otte [Sat, 20 May 2023 17:18:53 +0000 (17:18 +0000)]
Merge branch 'drop-filler-tiles' into 'main'

Drop the FILLER tile type

See merge request GNOME/gtk!5993

2 years agogridview: Update factories in set_factory
Matthias Clasen [Sat, 20 May 2023 15:35:31 +0000 (11:35 -0400)]
gridview: Update factories in set_factory

Call update_factories() so the children get their
factories properly updated.

This matches what GtkListView does.

2 years agoDrop the FILLER tile type
Matthias Clasen [Wed, 17 May 2023 23:13:12 +0000 (19:13 -0400)]
Drop the FILLER tile type

It is not used anymore.

2 years agogridview: Stop using a filler tile
Matthias Clasen [Wed, 17 May 2023 23:09:43 +0000 (19:09 -0400)]
gridview: Stop using a filler tile

We can just use the footer to fill that space.

2 years agogridview: Add an assertion
Matthias Clasen [Wed, 17 May 2023 23:01:08 +0000 (19:01 -0400)]
gridview: Add an assertion

The want to use the footer tile at the end
to fill leftover space at the bottome right.

So lets assert that we actually dealing with
a footer tile, just in case something changes
in the future that might have us end up with
some other kind of tile.

2 years agoAdd some tile helpers
Matthias Clasen [Thu, 18 May 2023 00:10:08 +0000 (20:10 -0400)]
Add some tile helpers

2 years agoRevert "gridview: GC tiles first"
Matthias Clasen [Wed, 17 May 2023 23:26:12 +0000 (19:26 -0400)]
Revert "gridview: GC tiles first"

This reverts commit e121a5ca6f761fc4433187bf1ad13a093ede205d.

The tile that was causing the critical in #5836
(what that commit was about) was a FILLER, and we
are getting rid of FILLER tiles here. Which will
avoid the issue in a more elegant way.

2 years agoCosmetics
Matthias Clasen [Sat, 20 May 2023 11:39:21 +0000 (07:39 -0400)]
Cosmetics

Use the proper g_assert variant.

2 years agoMerge branch 'ci-clang-build' into 'main'
Matthias Clasen [Thu, 18 May 2023 19:10:52 +0000 (19:10 +0000)]
Merge branch 'ci-clang-build' into 'main'

ci: Add a clang build

See merge request GNOME/gtk!5987