gtk4.git
2 years agobuild: Pass gobject_types=true to graphene
Matthias Clasen [Mon, 2 Jan 2023 13:55:51 +0000 (08:55 -0500)]
build: Pass gobject_types=true to graphene

This is required for graphene-gobject to be built.

2 years agobuild: Bump introspection dep to 1.72
Matthias Clasen [Thu, 22 Dec 2022 14:16:46 +0000 (09:16 -0500)]
build: Bump introspection dep to 1.72

This should be kept in sync with glib.

2 years agobuild: Bump graphene req to 1.10
Matthias Clasen [Thu, 22 Dec 2022 14:15:38 +0000 (09:15 -0500)]
build: Bump graphene req to 1.10

So we don't require an unstable version.

2 years agoMerge branch 'wide-inspector' into 'main'
Matthias Clasen [Sat, 31 Dec 2022 20:07:45 +0000 (20:07 +0000)]
Merge branch 'wide-inspector' into 'main'

inspector: Avoid super-wide window

See merge request GNOME/gtk!5379

2 years agoMerge branch 'annotate-dialog-deprecation' into 'main'
Matthias Clasen [Sat, 31 Dec 2022 20:07:20 +0000 (20:07 +0000)]
Merge branch 'annotate-dialog-deprecation' into 'main'

docs: Annotate GtkDialog deprecation

See merge request GNOME/gtk!5376

2 years agoinspector: Avoid super-wide window
Matthias Clasen [Sat, 31 Dec 2022 17:30:40 +0000 (12:30 -0500)]
inspector: Avoid super-wide window

Ellipsize values that can get long, to avoid
forcing an excessively wide window.

2 years agodocs: Annotate GtkDialog deprecations
Marco Melorio [Fri, 30 Dec 2022 14:29:29 +0000 (15:29 +0100)]
docs: Annotate GtkDialog deprecations

2 years agoMerge branch 'wip/corey/list-item-visible' into 'main'
Benjamin Otte [Thu, 29 Dec 2022 22:21:43 +0000 (22:21 +0000)]
Merge branch 'wip/corey/list-item-visible' into 'main'

listitemwidget: Setup factory only once the widget is visible

See merge request GNOME/gtk!5374

2 years agogtkcolumnviewcolumn: Only create cells when the column is visible
Corey Berla [Thu, 29 Dec 2022 18:56:01 +0000 (10:56 -0800)]
gtkcolumnviewcolumn: Only create cells when the column is visible

It's a big performance drag to create many cells (and their associated
widgets) for columns that may never be shown. Only create cells
is the column is visible, and subsequently create/remove cells
when in column_set_visible.

2 years agoUpdate Hebrew translation
Yosef Or Boczko [Tue, 27 Dec 2022 21:46:52 +0000 (21:46 +0000)]
Update Hebrew translation

2 years agoMerge branch 'wip/corey/notify-drop-value' into 'main'
Matthias Clasen [Tue, 27 Dec 2022 16:45:16 +0000 (16:45 +0000)]
Merge branch 'wip/corey/notify-drop-value' into 'main'

gtkdroptarget: Notify value property on local drag

See merge request GNOME/gtk!5372

2 years agogtkdroptarget: Notify value property on local drag
Corey Berla [Tue, 27 Dec 2022 16:11:53 +0000 (08:11 -0800)]
gtkdroptarget: Notify value property on local drag

The value property is only getting notified when it's unset
or when it's set from gdk_drop_real_value_async().  Make sure
to always notify :value when its changed

2 years agoPost-release version bump
Matthias Clasen [Mon, 26 Dec 2022 12:22:39 +0000 (07:22 -0500)]
Post-release version bump

2 years ago4.9.2
Matthias Clasen [Mon, 26 Dec 2022 11:41:21 +0000 (06:41 -0500)]
4.9.2

2 years agoUpdates
Matthias Clasen [Sun, 25 Dec 2022 13:29:28 +0000 (08:29 -0500)]
Updates

2 years agoMerge branch 'wip/otte/for-main' into 'main'
Matthias Clasen [Sat, 24 Dec 2022 15:14:17 +0000 (15:14 +0000)]
Merge branch 'wip/otte/for-main' into 'main'

GtkDialog: Various API changes

See merge request GNOME/gtk!5251

2 years agofiledialog: Handle initial-folder being NULL
Matthias Clasen [Sat, 24 Dec 2022 14:01:16 +0000 (09:01 -0500)]
filedialog: Handle initial-folder being NULL

This showed up as test failure in ci.

2 years agoalertdialog: Rephrase docs for show() a bit
Benjamin Otte [Fri, 23 Dec 2022 05:49:10 +0000 (06:49 +0100)]
alertdialog: Rephrase docs for show() a bit

In particular, discuss what to do about cancellables.

Related: !5326

2 years agofiledialog: Clarify interaction of :filters and :default-filter
Benjamin Otte [Fri, 23 Dec 2022 05:42:20 +0000 (06:42 +0100)]
filedialog: Clarify interaction of :filters and :default-filter

2 years agofiledialog: Rename :current-filter to :default-filter
Benjamin Otte [Fri, 23 Dec 2022 05:40:27 +0000 (06:40 +0100)]
filedialog: Rename :current-filter to :default-filter

The last "current" removed from properties. None of these are current.

2 years agofiledialog: Add gtk_file_dialog_set_initial_file()
Benjamin Otte [Fri, 23 Dec 2022 04:54:32 +0000 (05:54 +0100)]
filedialog: Add gtk_file_dialog_set_initial_file()

A shortcut for setting initial-folder and initial-name at the same time.

We can remove all arguments from the actual async calls this way.

2 years agofiledialog: Add gtk_file_dialog_set_initial_name()
Benjamin Otte [Fri, 23 Dec 2022 02:43:01 +0000 (03:43 +0100)]
filedialog: Add gtk_file_dialog_set_initial_name()

2 years agofiledialog: Rename current-folder to initial-folder
Benjamin Otte [Fri, 23 Dec 2022 01:42:36 +0000 (02:42 +0100)]
filedialog: Rename current-folder to initial-folder

It's not the current one - unlike in GtkFileChooser - because there are
no live updates. So we use a more descriptive name.

2 years agofontdialog: Handle Escape better
Benjamin Otte [Thu, 22 Dec 2022 21:17:45 +0000 (22:17 +0100)]
fontdialog: Handle Escape better

Closing the dialog by hitting Escape should
have the same effect as clicking the cancel
button. Make it so.

2 years agoalertdialog: Bring the GError back
Benjamin Otte [Wed, 23 Nov 2022 22:43:36 +0000 (23:43 +0100)]
alertdialog: Bring the GError back

Make sure we have a GError, so that dismissing and cancelling can be
separated.

2 years agodialog: GTK_DIALOG_ERROR_ABORTED => GTK_DIALOG_ERROR_CANCELLED
Benjamin Otte [Wed, 23 Nov 2022 22:35:11 +0000 (23:35 +0100)]
dialog: GTK_DIALOG_ERROR_ABORTED => GTK_DIALOG_ERROR_CANCELLED

This is done via the GCancellable, so let's call it cancelling.

2 years agodialog: GTK_DIALOG_ERROR_CANCELLED => GTK_DIALOG_ERROR_DISMISSED
Benjamin Otte [Wed, 23 Nov 2022 22:32:19 +0000 (23:32 +0100)]
dialog: GTK_DIALOG_ERROR_CANCELLED => GTK_DIALOG_ERROR_DISMISSED

The term "cancelling" is used with GCancellable, a user clicking a close
button is not that.
User input is usually described as "dismissing", so we use that term.

2 years agodirectorylist: Always add standard::name
Benjamin Otte [Mon, 17 Oct 2022 18:33:15 +0000 (20:33 +0200)]
directorylist: Always add standard::name

glib can't figure out how to do that, so we need to do that ourselves.

2 years agoMerge branch 'ccook/doc-changes-1' into 'main'
Matthias Clasen [Sat, 24 Dec 2022 12:52:19 +0000 (12:52 +0000)]
Merge branch 'ccook/doc-changes-1' into 'main'

Various spelling mistakes across a few domains that show up in documentation.

See merge request GNOME/gtk!5370

2 years agoMerge branch 'wip/carlosg/autohide-checks-on-x11' into 'main'
Matthias Clasen [Sat, 24 Dec 2022 12:50:09 +0000 (12:50 +0000)]
Merge branch 'wip/carlosg/autohide-checks-on-x11' into 'main'

gdk/surface: Handle clicks outside client surfaces

See merge request GNOME/gtk!5369

2 years agoMake stylecheck happy
Cam Cook [Fri, 23 Dec 2022 16:21:18 +0000 (11:21 -0500)]
Make stylecheck happy

2 years agoMerge remote-tracking branch 'upstream/main' into ccook/doc-changes-1
Cam Cook [Fri, 23 Dec 2022 16:02:18 +0000 (11:02 -0500)]
Merge remote-tracking branch 'upstream/main' into ccook/doc-changes-1

2 years agoVarious spelling mistakes across a few domains that show up in documentation.
Cam Cook [Fri, 23 Dec 2022 16:01:07 +0000 (11:01 -0500)]
Various spelling mistakes across a few domains that show up in documentation.

| domain | current | suggestion |
|--------|---------|------------|
| [GtkAspectFrame](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkaspectframe.c#L457)    | "requistion of the child" | "requisition of the child" |
| [GtkPaned](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkpaned.c#L2500)               | "(attributes org.gtk.Method.set_propery=wide-handle)" | "(attributes org.gtk.Method.set_property=wide-handle)"|
| [GtkPopover](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkpopover.c#L2484)           | "with gtk_popover_set_offset()." | "with [method@Gtk.Popover.set_offset()]." |
| [GtkPopoverMenu](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkpopovermenu.c#L859)    | "with gtk_popover_menu_add_child()" | "with [method@Gtk.PopoverMenu.add_child()]" |
| [GtkSelectionModel](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkselectionmodel.c#L316) | "the queired range" | "the queried range" |
| [GtkScrolledWindow](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkscrolledwindow.c#L76) | "automatically removed hen" | "automatically removed when"|
| [GtkSearchBar](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtksearchbar.c#L425)         | "Connects the \`GtkEditable widget" | "Connects the `GtkEditable` widget" |

2 years agogdk/surface: Handle clicks outside client surfaces
Carlos Garnacho [Fri, 23 Dec 2022 15:04:02 +0000 (16:04 +0100)]
gdk/surface: Handle clicks outside client surfaces

The owner_events=TRUE grab makes GDK on X11 see events happening
outside every client window as received on the grab window.
Additionally check that the pointer is inside the grab window
(i.e. it received GDK_CROSSING_NORMAL crossing events for the
core pointer) in order to handle clicks happening outside client
windows.

These new paths are expected to be a no-op on Wayland, and to
also work for touchscreen input on X11, due to emulated pointer
events.

2 years agoUpdate Ukrainian translation
Yuri Chornoivan [Fri, 23 Dec 2022 13:49:23 +0000 (13:49 +0000)]
Update Ukrainian translation

2 years agoMerge branch 'wip/ignazp/clipboard_eol' into 'main'
Matthias Clasen [Thu, 22 Dec 2022 13:31:07 +0000 (13:31 +0000)]
Merge branch 'wip/ignazp/clipboard_eol' into 'main'

clipboard: improve EOL conversion of plain text

See merge request GNOME/gtk!5367

2 years agoclipboard: improve EOL conversion of plain text
Ignazio Pillai [Thu, 22 Dec 2022 11:55:30 +0000 (12:55 +0100)]
clipboard: improve EOL conversion of plain text

Handle the case of clipboard text with CR line endings

2 years agoMerge branch 'tweak-gtkfilechooser-button-tooltips' into 'main'
Matthias Clasen [Wed, 21 Dec 2022 12:39:53 +0000 (12:39 +0000)]
Merge branch 'tweak-gtkfilechooser-button-tooltips' into 'main'

GtkFileChooser: Tweak Grid View & List View button tooltips

See merge request GNOME/gtk!5345

2 years agoMerge branch 'remove_a11y_name_fallback' into 'main'
Emmanuele Bassi [Wed, 21 Dec 2022 11:06:20 +0000 (11:06 +0000)]
Merge branch 'remove_a11y_name_fallback' into 'main'

Don't present GTK class names to assistive technologies even as a fallback

Closes gnome-control-center#2244

See merge request GNOME/gtk!5365

2 years agoDon't present GTK class names to assistive technologies even as a fallback
Lukáš Tyrychtr [Wed, 21 Dec 2022 10:04:07 +0000 (11:04 +0100)]
Don't present GTK class names to assistive technologies even as a fallback

A screen reader user is not interested in GTK internals, for example,
he does not care whether a button is an image button or not,
and a screen reader will report the fact that it is a button anyway.
Same applies for GtkEntry widgets, for example.

This actually is sufficient to fix gnome-control-center#2244.
And, according to the discussion in #5145, it should be fine.

2 years agoMerge branch 'file-nullable' into 'main'
Matthias Clasen [Wed, 21 Dec 2022 03:23:58 +0000 (03:23 +0000)]
Merge branch 'file-nullable' into 'main'

filelauncher: Make set_file argument nullable

See merge request GNOME/gtk!5357

2 years agoMerge branch 'wip/antoniof/listbase-rubberband-better-fix' into 'main'
Benjamin Otte [Wed, 21 Dec 2022 01:14:57 +0000 (01:14 +0000)]
Merge branch 'wip/antoniof/listbase-rubberband-better-fix' into 'main'

listbase: Cancel rubberband if not handling drag

See merge request GNOME/gtk!4831

2 years agoMerge branch 'include-hicolor-index-theme-as-resource-rebased' into 'main'
Luca Bacci [Tue, 20 Dec 2022 16:08:11 +0000 (16:08 +0000)]
Merge branch 'include-hicolor-index-theme-as-resource-rebased' into 'main'

Include hicolor index.theme as a resource (rebased)

Closes #5303

See merge request GNOME/gtk!5361

2 years agoInclude hicolor index.theme as a resource
Luca Bacci [Tue, 20 Dec 2022 15:30:00 +0000 (16:30 +0100)]
Include hicolor index.theme as a resource

index.theme file copied from upstream xdg/default-icon-theme
repository at tag 0.17:

https://gitlab.freedesktop.org/xdg/default-icon-theme/-/tree/0.17

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5303

2 years agoMerge branch 'revert-09691ead' into 'main'
Emmanuele Bassi [Tue, 20 Dec 2022 15:22:28 +0000 (15:22 +0000)]
Merge branch 'revert-09691ead' into 'main'

Revert "Merge branch 'include-hicolor-index-theme-as-resource' into 'main'"

See merge request GNOME/gtk!5360

2 years agoRevert "Merge branch 'include-hicolor-index-theme-as-resource' into 'main'"
Luca Bacci [Tue, 20 Dec 2022 13:23:51 +0000 (13:23 +0000)]
Revert "Merge branch 'include-hicolor-index-theme-as-resource' into 'main'"

This reverts merge request !5341

2 years agoMerge branch 'include-hicolor-index-theme-as-resource' into 'main'
Matthias Clasen [Tue, 20 Dec 2022 12:24:25 +0000 (12:24 +0000)]
Merge branch 'include-hicolor-index-theme-as-resource' into 'main'

Include hicolor index.theme as a resource

Closes #5303

See merge request GNOME/gtk!5341

2 years agofilelauncher: Make set_file argument nullable
Maximiliano Sandoval R [Tue, 20 Dec 2022 10:08:28 +0000 (11:08 +0100)]
filelauncher: Make set_file argument nullable

2 years agoUpdate Russian translation
Aleksandr Melman [Tue, 20 Dec 2022 09:33:25 +0000 (09:33 +0000)]
Update Russian translation

2 years agoMerge branch 'fix-asan-more' into 'main'
Matthias Clasen [Tue, 20 Dec 2022 06:04:46 +0000 (06:04 +0000)]
Merge branch 'fix-asan-more' into 'main'

ci: Disable f16c for asan

See merge request GNOME/gtk!5356

2 years agoci: Disable f16c for asan
Matthias Clasen [Tue, 20 Dec 2022 05:29:48 +0000 (00:29 -0500)]
ci: Disable f16c for asan

It appears that f16c crashes asan instantly.

2 years agoMerge branch 'no-more-installed-tests' into 'main'
Matthias Clasen [Tue, 20 Dec 2022 05:33:56 +0000 (05:33 +0000)]
Merge branch 'no-more-installed-tests' into 'main'

build: Drop the install-tests option

See merge request GNOME/gtk!5352

2 years agoci: More verbose output from asan
Matthias Clasen [Tue, 20 Dec 2022 04:36:19 +0000 (23:36 -0500)]
ci: More verbose output from asan

2 years agoMerge branch 'another-flaky-reftest' into 'main'
Matthias Clasen [Tue, 20 Dec 2022 05:07:51 +0000 (05:07 +0000)]
Merge branch 'another-flaky-reftest' into 'main'

ci: Declare a reftest as flaky

See merge request GNOME/gtk!5354

2 years agoMerge branch 'macos-ci-is-iffy' into 'main'
Matthias Clasen [Tue, 20 Dec 2022 05:02:25 +0000 (05:02 +0000)]
Merge branch 'macos-ci-is-iffy' into 'main'

ci: Mark macos build as allow-fail

See merge request GNOME/gtk!5355

2 years agoci: Mark macos build as allow-fail
Matthias Clasen [Tue, 20 Dec 2022 04:55:13 +0000 (23:55 -0500)]
ci: Mark macos build as allow-fail

It fails too often, and it never does us
any good.

2 years agoci: Declare a reftest as flaky
Matthias Clasen [Tue, 20 Dec 2022 04:51:34 +0000 (23:51 -0500)]
ci: Declare a reftest as flaky

fixed-widget-stacking is failing frequently due
to a blinking cursor showing up in one of the
windows in ci.

2 years agoMerge branch 'fix-gtk_doc=true' into 'main'
Matthias Clasen [Tue, 20 Dec 2022 04:17:22 +0000 (04:17 +0000)]
Merge branch 'fix-gtk_doc=true' into 'main'

meson: Require gi-docgen when gtk_doc is required

See merge request GNOME/gtk!5351

2 years agobuild: Drop the install-tests option
Matthias Clasen [Tue, 20 Dec 2022 04:11:20 +0000 (23:11 -0500)]
build: Drop the install-tests option

We no longer use installed tests in CI,
so lets reap the benefit and simplify
our build setup for tests.

2 years agoMerge branch 'fix-introspection-test-deps' into 'main'
Matthias Clasen [Tue, 20 Dec 2022 04:04:17 +0000 (04:04 +0000)]
Merge branch 'fix-introspection-test-deps' into 'main'

build: Lift gir and build_gir to toplevel

See merge request GNOME/gtk!5350

2 years agomeson: Require gi-docgen when gtk_doc is required
Nirbheek Chauhan [Tue, 20 Dec 2022 03:54:30 +0000 (09:24 +0530)]
meson: Require gi-docgen when gtk_doc is required

Fixes build with only `-Dgtk_doc=true` without
`-Dintrospection=enabled`:

    Program gi-docgen found: NO
    Configuring gdk4.toml using configuration

    docs/reference/gdk/meson.build:13:2: ERROR: Tried to use not-found external program in "command"

`introspection` is `auto` by default.

The rest of the docs build is only contingent on
`if get_option('gtk_doc')` so we should use the same restriction here.

We check for `build_gir` below already, and the gi-docgen subproject
itself does not need gobject-introspection so it's fine to do it like
this.

2 years agotests: Maybe skip introspection tests
Matthias Clasen [Tue, 20 Dec 2022 02:18:16 +0000 (21:18 -0500)]
tests: Maybe skip introspection tests

If we don't find the python gi module,
skip the introspection test.

2 years agobuild: Lift gir and build_gir to toplevel
Matthias Clasen [Tue, 20 Dec 2022 02:10:55 +0000 (21:10 -0500)]
build: Lift gir and build_gir to toplevel

build_gir is used in multiple subdirectories,
so it is a bit nasty that it is defined in
one too.

2 years agoMerge branch 'ebassi/ci-image-for-main' into 'main'
Emmanuele Bassi [Tue, 20 Dec 2022 03:37:43 +0000 (03:37 +0000)]
Merge branch 'ebassi/ci-image-for-main' into 'main'

Various CI fixes

See merge request GNOME/gtk!5349

2 years agoci: Don't cache subprojects
Emmanuele Bassi [Tue, 20 Dec 2022 02:41:52 +0000 (02:41 +0000)]
ci: Don't cache subprojects

We're downloading them anyway.

2 years agoMerge branch 'wip/gtk4-fix-delete-surrounding' into 'main'
Matthias Clasen [Tue, 20 Dec 2022 02:40:14 +0000 (02:40 +0000)]
Merge branch 'wip/gtk4-fix-delete-surrounding' into 'main'

gtkimcontextwayland: Convert byte based offset to char based offset in delete_surrounding_text

See merge request GNOME/gtk!5254

2 years agotests: Add shorthand-entry-border to the flaky suite
Emmanuele Bassi [Tue, 20 Dec 2022 02:18:25 +0000 (02:18 +0000)]
tests: Add shorthand-entry-border to the flaky suite

This test fairly consistently times out when running in a contended CI.

2 years agoci: Remove installed-tests job
Emmanuele Bassi [Tue, 20 Dec 2022 01:56:28 +0000 (01:56 +0000)]
ci: Remove installed-tests job

Installed tests require access to the system prefix, and thus a
system-wide installation of Meson, which we don't have.

We're going to restore this job at a later date.

2 years agoci: Don't use builddep to install Wayland build dependencies
Emmanuele Bassi [Tue, 20 Dec 2022 01:52:36 +0000 (01:52 +0000)]
ci: Don't use builddep to install Wayland build dependencies

We don't want to bring undefined dependencies into the image.

Additionally, Wayland depends on Meson, and we don't want to use
Fedora's version of Meson.

2 years agoci: Update the Fedora image
Emmanuele Bassi [Tue, 20 Dec 2022 01:34:45 +0000 (01:34 +0000)]
ci: Update the Fedora image

2 years agogtkimcontextwayland: Convert byte based offset to char based offset in delete_surroun...
Alynx Zhou [Thu, 24 Nov 2022 10:18:49 +0000 (18:18 +0800)]
gtkimcontextwayland: Convert byte based offset to char based offset in delete_surrounding_text

ClutterInputFocus/GtkIMContext uses char based offset for
delete_surrounding, however, text_input_v3 uses byte based offset for
it. Currently only GTK with mutter can work correctly via text_input_v3
because they both forget to convert between char based offset and byte
based offset.

This commit fixes it in GTK by converting byte based offset to char
based offset with the UTF-8 encoded surrounding text.

Fixes <https://gitlab.gnome.org/GNOME/gtk/-/issues/4566>.

2 years agoMerge branch 'meson-subproject-usage-fixes' into 'main'
Matthias Clasen [Tue, 20 Dec 2022 01:50:47 +0000 (01:50 +0000)]
Merge branch 'meson-subproject-usage-fixes' into 'main'

Various fixes for using gtk4 as a meson subproject

See merge request GNOME/gtk!5347

3 years agolistbase: Cancel rubberband if not handling drag
António Fernandes [Fri, 24 Jun 2022 08:05:29 +0000 (09:05 +0100)]
listbase: Cancel rubberband if not handling drag

If the drag events are claimed by another gesture (e.g. a GtkDragSource
in an item widget), list base still commits a rubberband selection, for
a rubberband which wasn't even visible yet. This is a problem for the
GNOME Files application which needs both rubberbanding and drag-n-drop.

My previous fix[0] was enough for the case where the event sequence is
claimed right before the first GtkDragGesture::drag-update emission,
but it's useless if the event is claimed later (e.g. after the drag
treashold), because a rubberband already exists by that time.

Therefore, the complete solution requres checking whether the event
sequence is no longer being handled by our gesture, and commit the
selection changes only if it is, but otherwise cleanup the rubberband.

This is what GtkFlowBox does already, so let's do the same here.

[0] commit dc4540fae98d4f707ce1030b0f8d161c987646e0

3 years agoci: Always update subprojects to latest revision
Nirbheek Chauhan [Mon, 19 Dec 2022 03:38:28 +0000 (09:08 +0530)]
ci: Always update subprojects to latest revision

Otherwise we're not actually updating anything. `meson subprojects
download` will skip subprojects that already exist.

3 years agoci: Fix fedora-mingw64 job
Nirbheek Chauhan [Sun, 18 Dec 2022 05:37:43 +0000 (11:07 +0530)]
ci: Fix fedora-mingw64 job

3 years agoci: Update meson version used for vs2017 job
Nirbheek Chauhan [Sun, 18 Dec 2022 05:49:14 +0000 (11:19 +0530)]
ci: Update meson version used for vs2017 job

3 years agomeson: Fix find_program and subproject usage
Nirbheek Chauhan [Sun, 18 Dec 2022 04:41:54 +0000 (10:11 +0530)]
meson: Fix find_program and subproject usage

Dummy dependencies are not required to execute a subproject
automatically for providing a program, nor do you need to explicitly
call subproject() to do that.

A `[provide]` section in the wrap file is enough.

3 years agomeson: Stop using fallback: kwarg for deps that don't need it
Nirbheek Chauhan [Sun, 18 Dec 2022 01:30:44 +0000 (07:00 +0530)]
meson: Stop using fallback: kwarg for deps that don't need it

Subprojects that use meson.override_dependency() do not require the
caller to provide the dependency variable name inside the subproject.

We also don't want to provide the *subproject* name, because the
subproject name can be `pango-1.50.12` instead of `pango` when using
wrap-file to download the tarball instead of using wrap-git. This
causes the pango subproject to be executed twice when using gtk as
a subproject inside gstreamer (which uses pango-1.50.12 as
a wrap-file).

All the dependencies we use can be switched in this way, but the
remaining ones need to be changed to use meson.override_dependency()
first.

3 years agomeson: Update gitlab.gnome.org SSH server names
Nirbheek Chauhan [Sun, 18 Dec 2022 01:29:33 +0000 (06:59 +0530)]
meson: Update gitlab.gnome.org SSH server names

Also switch the wrap file style to use spaces around `=` which is the
canonical style used by wrapdb now.

3 years agomeson: Remove redundant, duplicate, harfbuzz check
Nirbheek Chauhan [Sun, 18 Dec 2022 01:28:02 +0000 (06:58 +0530)]
meson: Remove redundant, duplicate, harfbuzz check

3 years agomeson: Always look for both cmake and pkgconfig names
Nirbheek Chauhan [Sun, 18 Dec 2022 01:24:44 +0000 (06:54 +0530)]
meson: Always look for both cmake and pkgconfig names

The is_msvc_like change is wrong; it used a false correlation between
"compiler being used" and "dependency method" by saying that on
Windows, when building with MSVC, you will only use CMake to find png,
jpeg, tiff.

You can use pkgconfig to find these deps on Windows with MSVC -- when
the deps have been built with Autotools or Meson (with MSVC). You can
also find these deps using CMake on other platforms like macOS or
Linux.

The solution is simple: just search for both names on all platforms,
and just search for the pkgconfig name first.

3 years agoMerge branch 'nirbheek/fix-build-with-latest-glib' into 'main'
Matthias Clasen [Sun, 18 Dec 2022 16:07:11 +0000 (16:07 +0000)]
Merge branch 'nirbheek/fix-build-with-latest-glib' into 'main'

gdk: Fix g_set_str version check

See merge request GNOME/gtk!5348

3 years agogdk: Fix g_set_str version check
Nirbheek Chauhan [Sun, 18 Dec 2022 05:42:34 +0000 (11:12 +0530)]
gdk: Fix g_set_str version check

The function was added to glib in 2.75.1. This fixes gtk's build with
the glib main branch.

3 years agoGtkFileChooser: Tweak Grid View & List View button tooltips
sunflowerskater [Sat, 17 Dec 2022 21:21:10 +0000 (18:21 -0300)]
GtkFileChooser: Tweak Grid View & List View button tooltips

The tooltips from the Grid View & List View buttons are unnecessarily long and look different from the tooltips used in Nautilus.

This commit makes the tooltips to be consistent with Nautilus and, consequently, makes them shorter.

3 years agoMerge branch 'wip/cdavis/file-dialog-accept-label' into 'main'
Matthias Clasen [Fri, 16 Dec 2022 17:04:00 +0000 (17:04 +0000)]
Merge branch 'wip/cdavis/file-dialog-accept-label' into 'main'

gtkfiledialog: Allow devs to set custom accept labels

Closes #5421

See merge request GNOME/gtk!5339

3 years agogtkfiledialog: Allow devs to set custom accept labels
Christopher Davis [Fri, 16 Dec 2022 02:35:56 +0000 (21:35 -0500)]
gtkfiledialog: Allow devs to set custom accept labels

Accept labels can be used for additional context regarding
the purpose of a file. The old GtkFileChooser APIs allowed
developers to set it, but the initial FileDialog API was missing
this functionality.

This commit adds `gtk_file_dialog_set_accept_label ()` to
restore the missing functionality.

Closes https://gitlab.gnome.org/GNOME/gtk/-/issues/5421

3 years agogdkprivate: Add compatibility shim for g_set_str()
Christopher Davis [Fri, 16 Dec 2022 04:08:35 +0000 (23:08 -0500)]
gdkprivate: Add compatibility shim for g_set_str()

Allows us to make use of this API without depending
on bleeding-edge glib

3 years agoInclude hicolor index.theme as a resource
Luca Bacci [Fri, 16 Dec 2022 13:17:29 +0000 (14:17 +0100)]
Include hicolor index.theme as a resource

index.theme file copied from upstream xdg/default-icon-theme
repository at tag 0.17:

https://gitlab.freedesktop.org/xdg/default-icon-theme/-/tree/0.17

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5303

3 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Fri, 16 Dec 2022 12:30:26 +0000 (12:30 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

Silence a compiler warning

See merge request GNOME/gtk!5340

3 years agoSilence a compiler warning
Matthias Clasen [Fri, 16 Dec 2022 05:12:44 +0000 (00:12 -0500)]
Silence a compiler warning

3 years agoMerge branch 'ebassi/ci-image-for-main' into 'main'
Matthias Clasen [Fri, 16 Dec 2022 03:55:18 +0000 (03:55 +0000)]
Merge branch 'ebassi/ci-image-for-main' into 'main'

ci: Install Meson in the build jobs

See merge request GNOME/gtk!5335

3 years agoMerge branch 'no-portals' into 'main'
Matthias Clasen [Thu, 15 Dec 2022 16:27:33 +0000 (16:27 +0000)]
Merge branch 'no-portals' into 'main'

Add GDK_DEBUG=no-portals

Closes #5441

See merge request GNOME/gtk!5336

3 years agoMerge branch 'deprecate-show-hide' into 'main'
Matthias Clasen [Thu, 15 Dec 2022 14:53:48 +0000 (14:53 +0000)]
Merge branch 'deprecate-show-hide' into 'main'

Deprecate gtk_widget_show/hide

See merge request GNOME/gtk!5278

3 years agoMerge branch 'check-button-radio-docs' into 'main'
Matthias Clasen [Thu, 15 Dec 2022 00:25:08 +0000 (00:25 +0000)]
Merge branch 'check-button-radio-docs' into 'main'

gtkcheckbutton: Document how to keep track of changes for radio buttons

See merge request GNOME/gtk!5328

3 years agoMerge branch 'wip/corey/listbase-focus' into 'main'
Benjamin Otte [Wed, 14 Dec 2022 19:06:57 +0000 (19:06 +0000)]
Merge branch 'wip/corey/listbase-focus' into 'main'

listbase: Use set_focus_child properly

Closes #5433 and #5432

See merge request GNOME/gtk!5169

3 years agoci: Install tests in a separate prefix
Emmanuele Bassi [Wed, 14 Dec 2022 19:00:32 +0000 (19:00 +0000)]
ci: Install tests in a separate prefix

Avoid using `sudo` in the installed-tests CI job, since we're installing
Meson as the current user.

3 years agogtkcheckbutton: Document how to keep track of changes for radio buttons
Pablo Correa Gómez [Tue, 13 Dec 2022 22:58:55 +0000 (23:58 +0100)]
gtkcheckbutton: Document how to keep track of changes for radio buttons

3 years agoAdd GDK_DEBUG=no-portals
Matthias Clasen [Wed, 14 Dec 2022 18:49:30 +0000 (13:49 -0500)]
Add GDK_DEBUG=no-portals

Fixes: #5441
3 years agoci: Redefine PATH
Emmanuele Bassi [Wed, 14 Dec 2022 18:35:52 +0000 (18:35 +0000)]
ci: Redefine PATH

3 years agolistbase: Use set_focus_child properly
Corey Berla [Mon, 24 Oct 2022 22:53:29 +0000 (15:53 -0700)]
listbase: Use set_focus_child properly

The EventControllerFocus on the list item, updates the list base focus
tracker and scrolled to position any time the list item enters focus.
This works when interacting within a single window, but has unexpected
results when changing focus between multiple windows.

Instead of using the focus controller workaround, just make
gtk_list_base_update_focus_tracker the set_focus_child vfunc

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5433
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5432