gtk4.git
2 years agoAdd gobject-introspection as a subproject
Emmanuele Bassi [Thu, 12 Jan 2023 17:55:47 +0000 (17:55 +0000)]
Add gobject-introspection as a subproject

We pin GLib, so we must also pin g-i to the same version, otherwise
we'll get weird mismatches during development.

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Thu, 12 Jan 2023 15:20:49 +0000 (15:20 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

css: Avoid some allocations

See merge request GNOME/gtk!5413

2 years agoiconcache: Be a bit less wasteful
Matthias Clasen [Thu, 12 Jan 2023 05:35:43 +0000 (00:35 -0500)]
iconcache: Be a bit less wasteful

2 years agocss: Avoid more allocations for tokens
Matthias Clasen [Thu, 12 Jan 2023 05:00:54 +0000 (00:00 -0500)]
css: Avoid more allocations for tokens

Make short string tokens static.

2 years agocss: Avoid some allocations
Matthias Clasen [Thu, 12 Jan 2023 04:19:30 +0000 (23:19 -0500)]
css: Avoid some allocations

Avoid duplicating the function name just
for an error message.

2 years agocss: Avoid allocation for tokens
Matthias Clasen [Thu, 12 Jan 2023 04:07:19 +0000 (23:07 -0500)]
css: Avoid allocation for tokens

All valid dimensions are short, so store
the dimension inside the token.

2 years agocss: Avoid some allocations
Matthias Clasen [Thu, 12 Jan 2023 03:02:20 +0000 (22:02 -0500)]
css: Avoid some allocations

Reuse the name_buffer for reading strings.

2 years agocss: Some inlining
Matthias Clasen [Thu, 12 Jan 2023 02:18:36 +0000 (21:18 -0500)]
css: Some inlining

2 years agoCosmetics
Matthias Clasen [Thu, 12 Jan 2023 03:53:39 +0000 (22:53 -0500)]
Cosmetics

2 years agoicontheme: Bit a bit less wasteful
Matthias Clasen [Thu, 12 Jan 2023 02:18:56 +0000 (21:18 -0500)]
icontheme: Bit a bit less wasteful

2 years agoUpdate Turkish translation
Emin Tufan Çetin [Wed, 11 Jan 2023 07:01:44 +0000 (07:01 +0000)]
Update Turkish translation

2 years agoUpdate Turkish translation
Emin Tufan Çetin [Wed, 11 Jan 2023 05:41:40 +0000 (05:41 +0000)]
Update Turkish translation

2 years agotexthistory: Avoid g_autofree
Matthias Clasen [Wed, 11 Jan 2023 03:20:57 +0000 (22:20 -0500)]
texthistory: Avoid g_autofree

msvc does not like it, unfortunately.

2 years agoMerge branch 'wip/chergert/fix-5506' into 'main'
Matthias Clasen [Wed, 11 Jan 2023 02:39:32 +0000 (02:39 +0000)]
Merge branch 'wip/chergert/fix-5506' into 'main'

istring: fix istring_prepend() on malloc transition

Closes #5506

See merge request GNOME/gtk!5411

2 years agotexthistory: add debugging helpers to print undo stack
Christian Hergert [Tue, 10 Jan 2023 21:36:16 +0000 (13:36 -0800)]
texthistory: add debugging helpers to print undo stack

This is helpful to have when tracking down issues like #5506.

2 years agoistring: fix istring_prepend() on malloc transition
Christian Hergert [Tue, 10 Jan 2023 21:32:38 +0000 (13:32 -0800)]
istring: fix istring_prepend() on malloc transition

When transitioning from internal to malloc, the strings were placed in
the wrong order to g_strconcat(). This fixes an issue with undo where
if you hit the boundary in just the right way, your undo stack will do
unexpected things.

Fixes #5506

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Tue, 10 Jan 2023 19:05:13 +0000 (19:05 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

Add some more text undo tests

See merge request GNOME/gtk!5410

2 years agoUpdate Russian translation
Aleksandr Melman [Tue, 10 Jan 2023 12:57:03 +0000 (12:57 +0000)]
Update Russian translation

2 years agoAdd some more text undo tests
Matthias Clasen [Tue, 10 Jan 2023 12:34:55 +0000 (07:34 -0500)]
Add some more text undo tests

Unsuccessfully trying to reproduce #5506.

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Mon, 9 Jan 2023 21:15:08 +0000 (21:15 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

Deprecate gdk_display_put_event

See merge request GNOME/gtk!5409

2 years agoDeprecate gdk_display_put_event
Matthias Clasen [Mon, 9 Jan 2023 20:29:24 +0000 (15:29 -0500)]
Deprecate gdk_display_put_event

The documentation already tells you not to
use this function.

Ifdef the remaining users in the X11 backend.

2 years agoMerge branch 'macos-stable-dnd' into 'main'
Matthias Clasen [Mon, 9 Jan 2023 11:52:50 +0000 (11:52 +0000)]
Merge branch 'macos-stable-dnd' into 'main'

macos: Drag and drop should not freeze applications

See merge request GNOME/gtk!5291

2 years agoMerge branch 'wip/corey/popover-accel' into 'main'
Matthias Clasen [Mon, 9 Jan 2023 10:58:14 +0000 (10:58 +0000)]
Merge branch 'wip/corey/popover-accel' into 'main'

gtkmodelbutton: Ensure that accel label is always aligned to end

Closes #5504

See merge request GNOME/gtk!5407

2 years agogtkmodelbutton: Ensure that accel label is always aligned to end
Corey Berla [Mon, 9 Jan 2023 06:32:22 +0000 (22:32 -0800)]
gtkmodelbutton: Ensure that accel label is always aligned to end

When the model button just has a text label and accel text,
the button fills and the accel label is implicitly aigned to end.
When there's also a icon, even though it's not shown (because
icons are only shown if there's no text), the button doesn't fill
and the accel ends up not aligned (assuming one of the other buttons
is longer). Ensure that the accel label is aligned to the end.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5504
2 years agoMerge branch 'a11y_check_null_path' into 'main'
Emmanuele Bassi [Mon, 9 Jan 2023 00:14:21 +0000 (00:14 +0000)]
Merge branch 'a11y_check_null_path' into 'main'

a11y: Avoid crashing if GtkAtSpiContext::path is NULL

See merge request GNOME/gtk!5405

2 years agoMerge branch 'doc-improvements' into 'main'
Emmanuele Bassi [Sun, 8 Jan 2023 22:16:49 +0000 (22:16 +0000)]
Merge branch 'doc-improvements' into 'main'

Two docs improvements

See merge request GNOME/gtk!5406

2 years agodocs: Improve gtk_window_present description
Marco Melorio [Sun, 8 Jan 2023 21:37:42 +0000 (22:37 +0100)]
docs: Improve gtk_window_present description

Move most of the documentation from gtk_window_present_with_time and
also reword it a bit to make it more understandable.

2 years agodocs: Don't mention deprecated API in gtk_widget_set_visible
Marco Melorio [Sun, 8 Jan 2023 20:49:28 +0000 (21:49 +0100)]
docs: Don't mention deprecated API in gtk_widget_set_visible

That statement is true, but since that API is deprecated, it doesn't
need to be there anymore to avoid confusing people.

2 years agoa11y: Use fallback logic when GApplication has no DBus object path
Barnabás Pőcze [Sun, 8 Jan 2023 18:51:38 +0000 (19:51 +0100)]
a11y: Use fallback logic when GApplication has no DBus object path

Use the fallback logic to generate the base path for the GtkAtSpiRoot
if the GApplication has no DBus object path to guarantee that
the base path will not stay NULL.

2 years agoa11y: Check if path is NULL when removing from cache
Barnabás Pőcze [Sun, 8 Jan 2023 18:38:54 +0000 (19:38 +0100)]
a11y: Check if path is NULL when removing from cache

`gtk_at_spi_cache_add_context()` checks if the GtkAtSpiContext's path
is NULL before inserting the context object into the hash table.
Do the same in `gtk_at_spi_cache_remove_context()` to avoid a NULL
pointer dereference in `g_str_hash()` during the hash table lookup
if a context with NULL path is removed. That can happen when the
GtkAtSpiRoot::base_path is NULL, which, in turn, can happen if
`g_application_get_dbus_object_path()` returns NULL.

  ==394047==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7fd1966f8b84 bp 0x7fff11e3ded0 sp 0x7fff11e3de58 T0)
  ==394047==The signal is caused by a READ memory access.
  ==394047==Hint: address points to the zero page.
      #0 0x7fd1966f8b84 in g_str_hash (/usr/lib/libglib-2.0.so.0+0x37b84)
      #1 0x7fd1966f9c09 in g_hash_table_contains (/usr/lib/libglib-2.0.so.0+0x38c09)
      #2 0x7fd196062c10 in gtk_at_spi_cache_remove_context ../gtk/a11y/gtkatspicache.c:447
      #3 0x7fd19606e0a9 in gtk_at_spi_root_unregister ../gtk/a11y/gtkatspiroot.c:653
      #4 0x7fd196067f58 in gtk_at_spi_context_unrealize ../gtk/a11y/gtkatspicontext.c:1559
      #5 0x7fd195ced97f in gtk_at_context_unrealize ../gtk/gtkatcontext.c:668
      #6 0x7fd195f5576e in gtk_widget_unroot_at_context ../gtk/gtkwidget.c:2399
      #7 0x7fd195f55bd2 in gtk_widget_unroot ../gtk/gtkwidget.c:2499
      ...

2 years agoFix code style
Matthias Clasen [Sun, 8 Jan 2023 14:41:11 +0000 (14:41 +0000)]
Fix code style

2 years agogdk: Update docs
Matthias Clasen [Sun, 8 Jan 2023 02:35:29 +0000 (21:35 -0500)]
gdk: Update docs

Update the docs for gdk_display_get_monitor_at_surface.

2 years agoMerge branch 'gdk-display-get-monitor-is-nullable' into 'main'
Matthias Clasen [Sat, 7 Jan 2023 20:39:04 +0000 (20:39 +0000)]
Merge branch 'gdk-display-get-monitor-is-nullable' into 'main'

gdkdisplay: Document get_monitor_at_surface can return NULL

Closes #5075

See merge request GNOME/gtk!4917

2 years agoMerge branch 'more-filesystemmodel-cleanups' into 'main'
Matthias Clasen [Sat, 7 Jan 2023 18:42:14 +0000 (18:42 +0000)]
Merge branch 'more-filesystemmodel-cleanups' into 'main'

filesystemmodel: Crop tree model cruft

See merge request GNOME/gtk!5402

2 years agoMerge branch 'win-file-ext' into 'main'
Matthias Clasen [Sat, 7 Jan 2023 18:14:37 +0000 (18:14 +0000)]
Merge branch 'win-file-ext' into 'main'

filechoosernativewin32: Set default extension

See merge request GNOME/gtk!5266

2 years agofilechoosernativewin32: Set default extension
robxnano [Sat, 7 Jan 2023 18:14:36 +0000 (18:14 +0000)]
filechoosernativewin32: Set default extension

2 years agofilesystemmodel: Drop tree model cruft
Matthias Clasen [Sat, 7 Jan 2023 17:19:13 +0000 (12:19 -0500)]
filesystemmodel: Drop tree model cruft

We no longer need the placeholder item for the
editable, so drop it.

2 years agofilesystemmodel: Rename private header
Matthias Clasen [Sat, 7 Jan 2023 17:01:15 +0000 (12:01 -0500)]
filesystemmodel: Rename private header

2 years agoMerge branch 'filesystemmodel-cleanups' into 'main'
Matthias Clasen [Sat, 7 Jan 2023 14:36:20 +0000 (14:36 +0000)]
Merge branch 'filesystemmodel-cleanups' into 'main'

filesystemmodel: Cleanup unused defines

See merge request GNOME/gtk!5401

2 years agogtkfilesystemmodel: Use g_clear_* helpers
Georges Basile Stavracas Neto [Sat, 7 Jan 2023 14:10:54 +0000 (09:10 -0500)]
gtkfilesystemmodel: Use g_clear_* helpers

Saves some code.

2 years agofilesystemmodel: Use G_DECLARE_FINAL_TYPE()
Georges Basile Stavracas Neto [Sat, 7 Jan 2023 14:08:25 +0000 (09:08 -0500)]
filesystemmodel: Use G_DECLARE_FINAL_TYPE()

Clean up boilerplate. It's a private object anyway.

2 years agofilesystemmodel: Cosmetics
Georges Basile Stavracas Neto [Sat, 7 Jan 2023 14:01:29 +0000 (09:01 -0500)]
filesystemmodel: Cosmetics

Adjust code style, and shuffle some functions around. Remove
unhelpful doc comments.

2 years agofilesystemmodel: Use g_set_object
Matthias Clasen [Sat, 7 Jan 2023 13:45:35 +0000 (08:45 -0500)]
filesystemmodel: Use g_set_object

2 years agofilesystemmodel: Make function private to gtkfilesystemmodel.c
Georges Basile Stavracas Neto [Sat, 17 Dec 2022 12:30:12 +0000 (09:30 -0300)]
filesystemmodel: Make function private to gtkfilesystemmodel.c

The _gtk_file_system_model_update_file() function is not used outside
GtkFileSystemModel, so no need to expose it in the header.

Shuffle it around in code, and remove it from the header.

2 years agofilesystemmodel: Cleanup unused defines
Georges Basile Stavracas Neto [Sat, 17 Dec 2022 12:24:08 +0000 (09:24 -0300)]
filesystemmodel: Cleanup unused defines

They were made unused with the removal of GtkTreeModel interface
implementation.

2 years agoMerge branch 'werror-fixes' into 'main'
Matthias Clasen [Sat, 7 Jan 2023 13:22:20 +0000 (13:22 +0000)]
Merge branch 'werror-fixes' into 'main'

gtk-launch: Remove compile-time warning

See merge request GNOME/gtk!5400

2 years agoMerge branch 'wip/corey/calendar' into 'main'
Matthias Clasen [Sat, 7 Jan 2023 13:11:01 +0000 (13:11 +0000)]
Merge branch 'wip/corey/calendar' into 'main'

calendar: Fix marked days

See merge request GNOME/gtk!5399

2 years agocalendar: Set marked days immediately
Corey Berla [Sat, 7 Jan 2023 04:18:53 +0000 (20:18 -0800)]
calendar: Set marked days immediately

The marked days are set only as part of gtk_calendar_select_day().
This is insufficient, especially because the day-selected signal
is emitted after the marked days are set in gtk_calendar_select_day().

2 years agocalendar: Only apply the marked_day to the current month
Corey Berla [Sat, 7 Jan 2023 04:12:10 +0000 (20:12 -0800)]
calendar: Only apply the marked_day to the current month

The marked day gets applied to the current month, and either the previous
or subsequent month if they are visible within the current month.
This doesn't make any sense and likely was an accidental regression
in a6f9052cf1c1c7b4224834ed18a63e70477d8729.  Clarify the docs.

2 years agocalendar: Add css style for marked days
Corey Berla [Sat, 7 Jan 2023 04:14:15 +0000 (20:14 -0800)]
calendar: Add css style for marked days

As part of a6f9052cf1c1c7b4224834ed18a63e70477d8729, marked days lost
their style, essentially making that function worthless.  Previously,
they were simply bolded, but that doesn't give them proper justice.

2 years agoMerge branch 'wip/phako/fix-activate-action-annotation' into 'main'
Matthias Clasen [Sat, 7 Jan 2023 01:06:00 +0000 (01:06 +0000)]
Merge branch 'wip/phako/fix-activate-action-annotation' into 'main'

widget: Mark format as nullable in activate_action

See merge request GNOME/gtk!4653

2 years agoMerge branch 'main' into 'main'
Matthias Clasen [Sat, 7 Jan 2023 00:59:32 +0000 (00:59 +0000)]
Merge branch 'main' into 'main'

Fix a typo

See merge request GNOME/gtk!5170

2 years agobuild: Turn off tautological-constant-out-of-range-compare warning
Benjamin Otte [Wed, 3 Nov 2021 23:27:27 +0000 (00:27 +0100)]
build: Turn off tautological-constant-out-of-range-compare warning

This issues a warning when an enum value is compared to a value that is
out of range for the enum.

We do this a lot, either when using -1 for undefined values or when
comparing array sizes to enum values like so:

  enum {
    ONE,
    TWO,
    THREE
  } some_enum_value;
  const char *names= { "one", "two", "three" };

  g_assert (some_enum_value < G_N_ELEMENTS (names));

2 years agogtk-launch: Fix unused variable warning on macOS
Benjamin Otte [Wed, 3 Nov 2021 23:59:19 +0000 (00:59 +0100)]
gtk-launch: Fix unused variable warning on macOS

2 years agoci: Disable -Werror on all subprojects
Benjamin Otte [Thu, 4 Nov 2021 00:41:05 +0000 (01:41 +0100)]
ci: Disable -Werror on all subprojects

Would be nice if meson had a nicer way of doing this, but...

2 years agoglcontext: Avoid gcc warning on non-egl build
Benjamin Otte [Wed, 3 Nov 2021 22:40:33 +0000 (23:40 +0100)]
glcontext: Avoid gcc warning on non-egl build

2 years agogtk-launch: Remove compile-time warning
Benjamin Otte [Wed, 3 Nov 2021 22:39:38 +0000 (23:39 +0100)]
gtk-launch: Remove compile-time warning

This warning causes a -Werror build to fail.

2 years agoMerge branch 'wayland-surface-split3' into 'main'
Matthias Clasen [Fri, 6 Jan 2023 22:35:34 +0000 (22:35 +0000)]
Merge branch 'wayland-surface-split3' into 'main'

Split gdksurface-wayland.c

See merge request GNOME/gtk!5217

2 years agoDrop gdkpopup-wayland-private.h
Matthias Clasen [Fri, 6 Jan 2023 22:02:03 +0000 (17:02 -0500)]
Drop gdkpopup-wayland-private.h

It is empty now.

2 years agowaylandsurface: Introduce a few vfuncs
Matthias Clasen [Fri, 6 Jan 2023 21:35:16 +0000 (16:35 -0500)]
waylandsurface: Introduce a few vfuncs

2 years agowaylandpopup: Drop unused exports
Matthias Clasen [Fri, 6 Jan 2023 21:00:22 +0000 (16:00 -0500)]
waylandpopup: Drop unused exports

2 years agowaylandtoplevel: Drop unused exports
Matthias Clasen [Fri, 6 Jan 2023 19:58:18 +0000 (14:58 -0500)]
waylandtoplevel: Drop unused exports

2 years agoMore cleanups
Matthias Clasen [Fri, 6 Jan 2023 19:55:45 +0000 (14:55 -0500)]
More cleanups

2 years agoMisc cleanups
Matthias Clasen [Fri, 6 Jan 2023 19:46:47 +0000 (14:46 -0500)]
Misc cleanups

Detangle compute_size, among other things.

2 years agowip: Split off GdkWaylandPopup
Matthias Clasen [Thu, 17 Nov 2022 13:24:40 +0000 (08:24 -0500)]
wip: Split off GdkWaylandPopup

Like the GdkWaylandToplevel split-off, this needs some
more cleanup.

2 years agowip: Split off GdkWaylandToplevel
Matthias Clasen [Fri, 6 Jan 2023 18:53:27 +0000 (13:53 -0500)]
wip: Split off GdkWaylandToplevel

This still needs some more cleanup.

2 years agowayland: Rearrange the surface code
Matthias Clasen [Fri, 6 Jan 2023 18:44:18 +0000 (13:44 -0500)]
wayland: Rearrange the surface code

2 years agowayland: Split public headers
Matthias Clasen [Tue, 15 Nov 2022 19:52:49 +0000 (14:52 -0500)]
wayland: Split public headers

Split gdkwaylandsurface.h into itself,
gdkwaylandtoplevel.h and gdkwaylandpopup.h.
This is in preparation for splitting the
types for real.

2 years agowayland: Split display_server sub-structs
Matthias Clasen [Tue, 15 Nov 2022 15:17:55 +0000 (15:17 +0000)]
wayland: Split display_server sub-structs

Move these to GdkWaylandToplevel and GdkWaylandPopup
as appropriate.

2 years agowayland: Move next_layout into popup and toplevel
Matthias Clasen [Tue, 15 Nov 2022 14:47:23 +0000 (14:47 +0000)]
wayland: Move next_layout into popup and toplevel

This is where it belongs.

2 years agowayland: Move pending toplevel state to GdkWaylandToplevel
Matthias Clasen [Tue, 15 Nov 2022 14:40:32 +0000 (14:40 +0000)]
wayland: Move pending toplevel state to GdkWaylandToplevel

Another toplevel-only thing.

2 years agowayland: Move input_grab_seat to GdkWaylandPopup
Matthias Clasen [Tue, 15 Nov 2022 13:07:13 +0000 (13:07 +0000)]
wayland: Move input_grab_seat to GdkWaylandPopup

This is popup-only functionality.

2 years agowayland: Move reposition_token to GdkWaylandPopup
Matthias Clasen [Tue, 15 Nov 2022 12:37:18 +0000 (12:37 +0000)]
wayland: Move reposition_token to GdkWaylandPopup

This is only used for popups, so move it there.

2 years agowayland: Move shortcuts_inhibitors to GdkWaylandToplevel
Matthias Clasen [Tue, 15 Nov 2022 12:27:58 +0000 (12:27 +0000)]
wayland: Move shortcuts_inhibitors to GdkWaylandToplevel

Another toplevel-only feature.

2 years agowayland: Move imported_transient_for to GdkWaylandToplevel
Matthias Clasen [Tue, 15 Nov 2022 12:06:24 +0000 (12:06 +0000)]
wayland: Move imported_transient_for to GdkWaylandToplevel

Another toplevel-only thing.

2 years agowayland: Move geometry hints to GdkWaylandToplevel
Matthias Clasen [Tue, 15 Nov 2022 11:50:02 +0000 (11:50 +0000)]
wayland: Move geometry hints to GdkWaylandToplevel

Another toplevel-only thing.

2 years agowayland: Move title to GdkWaylandToplevel
Matthias Clasen [Tue, 15 Nov 2022 11:38:01 +0000 (11:38 +0000)]
wayland: Move title to GdkWaylandToplevel

This is a toplevel property.

2 years agowayland: Move drag surfaces to their own file
Matthias Clasen [Thu, 10 Nov 2022 14:27:04 +0000 (15:27 +0100)]
wayland: Move drag surfaces to their own file

2 years agowayland: Drop create_dnd_surface
Matthias Clasen [Thu, 10 Nov 2022 15:05:26 +0000 (16:05 +0100)]
wayland: Drop create_dnd_surface

It is only used in one place.

2 years agoMerge branch 'swap-3-4' into 'main'
Matthias Clasen [Fri, 6 Jan 2023 18:06:55 +0000 (18:06 +0000)]
Merge branch 'swap-3-4' into 'main'

docs: Place example-{3,4} in numerical order

See merge request GNOME/gtk!5319

2 years agoMerge branch 'gtk4-fix-xdg-activation-set-surface' into 'main'
Matthias Clasen [Fri, 6 Jan 2023 14:03:01 +0000 (14:03 +0000)]
Merge branch 'gtk4-fix-xdg-activation-set-surface' into 'main'

gdk/wayland: set requesting surface to xdg-activation

See merge request GNOME/gtk!5293

2 years agoMerge branch 'drop-file-dialog-shortcuts' into 'main'
Matthias Clasen [Fri, 6 Jan 2023 13:35:14 +0000 (13:35 +0000)]
Merge branch 'drop-file-dialog-shortcuts' into 'main'

filedialog: Drop shortcut folders

See merge request GNOME/gtk!5396

2 years agoMerge branch 'wip/otte/for-5496' into 'main'
Matthias Clasen [Fri, 6 Jan 2023 13:34:55 +0000 (13:34 +0000)]
Merge branch 'wip/otte/for-5496' into 'main'

filedialog: Never set the chooser's file

Closes #5496

See merge request GNOME/gtk!5393

2 years agoMerge branch 'macos-command-symbol' into 'main'
Matthias Clasen [Fri, 6 Jan 2023 13:17:36 +0000 (13:17 +0000)]
Merge branch 'macos-command-symbol' into 'main'

macos: Use Command key symbol in Keyboard shortcuts window

See merge request GNOME/gtk!5296

2 years agofiledialog: Drop shortcut folders
Matthias Clasen [Fri, 6 Jan 2023 12:40:57 +0000 (07:40 -0500)]
filedialog: Drop shortcut folders

The filechooser portal does not support this,
and we are defaulting to using the portal now.
Lets not offer a non-functional API.

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Fri, 6 Jan 2023 12:34:10 +0000 (12:34 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

testfiledialog: Be more lenient

See merge request GNOME/gtk!5395

2 years agotestfiledialog: Be more lenient
Matthias Clasen [Fri, 6 Jan 2023 11:34:58 +0000 (06:34 -0500)]
testfiledialog: Be more lenient

Accept both open_multiple and open-multiple.

2 years agomacos: Command should not come from gettext
Arjan Molenaar [Fri, 6 Jan 2023 11:08:55 +0000 (12:08 +0100)]
macos: Command should not come from gettext

Instead, just provide the right character.

See also
https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkaccelgroup.c#L916.

2 years agoMerge branch 'test-file-dialog' into 'main'
Matthias Clasen [Fri, 6 Jan 2023 04:28:28 +0000 (04:28 +0000)]
Merge branch 'test-file-dialog' into 'main'

Test file dialog

See merge request GNOME/gtk!5394

2 years agoAdd a test for GtkFileDialog
Matthias Clasen [Fri, 6 Jan 2023 04:03:27 +0000 (23:03 -0500)]
Add a test for GtkFileDialog

2 years agofiledialog: Cosmetics
Matthias Clasen [Fri, 6 Jan 2023 03:45:48 +0000 (22:45 -0500)]
filedialog: Cosmetics

2 years agoMerge branch 'wip/corey/dnd-use-cursor' into 'main'
Benjamin Otte [Thu, 5 Jan 2023 22:39:26 +0000 (22:39 +0000)]
Merge branch 'wip/corey/dnd-use-cursor' into 'main'

Fix accidental DnD

See merge request GNOME/gtk!5275

2 years agofiledialog: Never set the chooser's file
Benjamin Otte [Thu, 5 Jan 2023 20:05:24 +0000 (21:05 +0100)]
filedialog: Never set the chooser's file

Instead, get by with setting the name and hope the filechooser figures
things out by itself.

Fixes #5496

2 years agoMerge branch 'openuri-activation-token' into 'main'
Matthias Clasen [Thu, 5 Jan 2023 14:06:14 +0000 (14:06 +0000)]
Merge branch 'openuri-activation-token' into 'main'

Pass an activation token to OpenURI

See merge request GNOME/gtk!5389

2 years agoMerge branch 'filechooser-multi-folder' into 'main'
Matthias Clasen [Thu, 5 Jan 2023 14:01:35 +0000 (14:01 +0000)]
Merge branch 'filechooser-multi-folder' into 'main'

filechooser: Don't assert for possible cases

Closes #5494

See merge request GNOME/gtk!5392

2 years agofilechooser: Don't assert for possible cases
Matthias Clasen [Thu, 5 Jan 2023 13:37:29 +0000 (08:37 -0500)]
filechooser: Don't assert for possible cases

switch_to_selected_folder can be called when the
selection contains more than one item. Handle it
like it used to be handled: switch to the first
folder we find.

Fixes: #5494
2 years agoPass an activation token to OpenURI
Matthias Clasen [Wed, 4 Jan 2023 13:36:47 +0000 (08:36 -0500)]
Pass an activation token to OpenURI

The OpenURI portal can take an activation_token
nowadays. So it give one.

2 years agox11: Make a call NULL-safe
Matthias Clasen [Wed, 4 Jan 2023 21:35:56 +0000 (16:35 -0500)]
x11: Make a call NULL-safe

Make it safe to call gdk_x11_app_launch_context_get_startup_notify_id
with a NULL info.

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Wed, 4 Jan 2023 17:22:54 +0000 (17:22 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

Drop gtkmain.c from POTFILES

See merge request GNOME/gtk!5390

2 years agoDrop gtkmain.c from POTFILES
Matthias Clasen [Wed, 4 Jan 2023 17:01:33 +0000 (12:01 -0500)]
Drop gtkmain.c from POTFILES

No longer any translations here.