Matthias Clasen [Fri, 13 Jan 2023 12:57:15 +0000 (12:57 +0000)]
Merge branch 'faster-ci' into 'main'
Add a build-testsuite option
See merge request GNOME/gtk!5419
Matthias Clasen [Fri, 13 Jan 2023 12:26:41 +0000 (07:26 -0500)]
ci: Try to speed up builds a bit
Don't build demos and tests, and only build
the testsuite where we want to run it.
Matthias Clasen [Fri, 13 Jan 2023 12:15:15 +0000 (07:15 -0500)]
Update the build documentation
Matthias Clasen [Fri, 13 Jan 2023 12:14:33 +0000 (07:14 -0500)]
Add a build-testsuite option
This will let us run the testsuite in ci without
having to build all the manual tests.
Matthias Clasen [Fri, 13 Jan 2023 03:08:36 +0000 (03:08 +0000)]
Merge branch 'macos-werror' into 'main'
CI: turn on -Werror for MacOS build
See merge request GNOME/gtk!5418
Benjamin Otte [Wed, 3 Nov 2021 22:35:03 +0000 (23:35 +0100)]
CI: turn on -Werror for MacOS build
The build is error-free and we want to keep it that way.
We'd also like to make Timm do real work instead of having to fix clang
warnings all the time and this build is a clang build.
Matthias Clasen [Fri, 13 Jan 2023 00:10:48 +0000 (00:10 +0000)]
Merge branch 'wip/chergert/fix-macos-warnings' into 'main'
Fixes a few compilation warnings on macOS
See merge request GNOME/gtk!5415
Matthias Clasen [Thu, 12 Jan 2023 23:35:23 +0000 (23:35 +0000)]
Merge branch 'ebassi/pin-gi' into 'main'
Add gobject-introspection as a subproject
See merge request GNOME/gtk!5414
Christian Hergert [Thu, 12 Jan 2023 21:22:47 +0000 (13:22 -0800)]
gdk/macos: fix warning about _coreCursorType
Christian Hergert [Thu, 12 Jan 2023 21:22:25 +0000 (13:22 -0800)]
gsk/gl: fix warning when join_sources() is unused
Christian Hergert [Thu, 12 Jan 2023 21:22:02 +0000 (13:22 -0800)]
gdk: fix warning when !HAVE_EGL
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.
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
Matthias Clasen [Thu, 12 Jan 2023 05:35:43 +0000 (00:35 -0500)]
iconcache: Be a bit less wasteful
Matthias Clasen [Thu, 12 Jan 2023 05:00:54 +0000 (00:00 -0500)]
css: Avoid more allocations for tokens
Make short string tokens static.
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.
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.
Matthias Clasen [Thu, 12 Jan 2023 03:02:20 +0000 (22:02 -0500)]
css: Avoid some allocations
Reuse the name_buffer for reading strings.
Matthias Clasen [Thu, 12 Jan 2023 02:18:36 +0000 (21:18 -0500)]
css: Some inlining
Matthias Clasen [Thu, 12 Jan 2023 03:53:39 +0000 (22:53 -0500)]
Cosmetics
Matthias Clasen [Thu, 12 Jan 2023 02:18:56 +0000 (21:18 -0500)]
icontheme: Bit a bit less wasteful
Emin Tufan Çetin [Wed, 11 Jan 2023 07:01:44 +0000 (07:01 +0000)]
Update Turkish translation
Emin Tufan Çetin [Wed, 11 Jan 2023 05:41:40 +0000 (05:41 +0000)]
Update Turkish translation
Matthias Clasen [Wed, 11 Jan 2023 03:20:57 +0000 (22:20 -0500)]
texthistory: Avoid g_autofree
msvc does not like it, unfortunately.
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
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.
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
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
Aleksandr Melman [Tue, 10 Jan 2023 12:57:03 +0000 (12:57 +0000)]
Update Russian translation
Matthias Clasen [Tue, 10 Jan 2023 12:34:55 +0000 (07:34 -0500)]
Add some more text undo tests
Unsuccessfully trying to reproduce #5506.
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
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.
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
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
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
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
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
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.
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.
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.
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
...
Matthias Clasen [Sun, 8 Jan 2023 14:41:11 +0000 (14:41 +0000)]
Fix code style
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.
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
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
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
robxnano [Sat, 7 Jan 2023 18:14:36 +0000 (18:14 +0000)]
filechoosernativewin32: Set default extension
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.
Matthias Clasen [Sat, 7 Jan 2023 17:01:15 +0000 (12:01 -0500)]
filesystemmodel: Rename private header
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
Georges Basile Stavracas Neto [Sat, 7 Jan 2023 14:10:54 +0000 (09:10 -0500)]
gtkfilesystemmodel: Use g_clear_* helpers
Saves some code.
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.
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.
Matthias Clasen [Sat, 7 Jan 2023 13:45:35 +0000 (08:45 -0500)]
filesystemmodel: Use g_set_object
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.
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.
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
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
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().
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.
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.
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
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
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));
Benjamin Otte [Wed, 3 Nov 2021 23:59:19 +0000 (00:59 +0100)]
gtk-launch: Fix unused variable warning on macOS
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...
Benjamin Otte [Wed, 3 Nov 2021 22:40:33 +0000 (23:40 +0100)]
glcontext: Avoid gcc warning on non-egl build
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.
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
Matthias Clasen [Fri, 6 Jan 2023 22:02:03 +0000 (17:02 -0500)]
Drop gdkpopup-wayland-private.h
It is empty now.
Matthias Clasen [Fri, 6 Jan 2023 21:35:16 +0000 (16:35 -0500)]
waylandsurface: Introduce a few vfuncs
Matthias Clasen [Fri, 6 Jan 2023 21:00:22 +0000 (16:00 -0500)]
waylandpopup: Drop unused exports
Matthias Clasen [Fri, 6 Jan 2023 19:58:18 +0000 (14:58 -0500)]
waylandtoplevel: Drop unused exports
Matthias Clasen [Fri, 6 Jan 2023 19:55:45 +0000 (14:55 -0500)]
More cleanups
Matthias Clasen [Fri, 6 Jan 2023 19:46:47 +0000 (14:46 -0500)]
Misc cleanups
Detangle compute_size, among other things.
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.
Matthias Clasen [Fri, 6 Jan 2023 18:53:27 +0000 (13:53 -0500)]
wip: Split off GdkWaylandToplevel
This still needs some more cleanup.
Matthias Clasen [Fri, 6 Jan 2023 18:44:18 +0000 (13:44 -0500)]
wayland: Rearrange the surface code
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.
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.
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.
Matthias Clasen [Tue, 15 Nov 2022 14:40:32 +0000 (14:40 +0000)]
wayland: Move pending toplevel state to GdkWaylandToplevel
Another toplevel-only thing.
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.
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.
Matthias Clasen [Tue, 15 Nov 2022 12:27:58 +0000 (12:27 +0000)]
wayland: Move shortcuts_inhibitors to GdkWaylandToplevel
Another toplevel-only feature.
Matthias Clasen [Tue, 15 Nov 2022 12:06:24 +0000 (12:06 +0000)]
wayland: Move imported_transient_for to GdkWaylandToplevel
Another toplevel-only thing.
Matthias Clasen [Tue, 15 Nov 2022 11:50:02 +0000 (11:50 +0000)]
wayland: Move geometry hints to GdkWaylandToplevel
Another toplevel-only thing.
Matthias Clasen [Tue, 15 Nov 2022 11:38:01 +0000 (11:38 +0000)]
wayland: Move title to GdkWaylandToplevel
This is a toplevel property.
Matthias Clasen [Thu, 10 Nov 2022 14:27:04 +0000 (15:27 +0100)]
wayland: Move drag surfaces to their own file
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.
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
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
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
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
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
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.
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
Matthias Clasen [Fri, 6 Jan 2023 11:34:58 +0000 (06:34 -0500)]
testfiledialog: Be more lenient
Accept both open_multiple and open-multiple.
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.
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