Commit Graph

74611 Commits

Author SHA1 Message Date
Matthias Clasen
fecc923c2c Silence compiler warnings
Clang complains that these are dead stores.
They are, indeed.
2023-01-13 12:07:40 -05:00
Matthias Clasen
703ed608c0 Fix a compiler warning
Clang things that load_error might be NULL here.
It may be right.
2023-01-13 12:07:40 -05:00
Matthias Clasen
99f07c7c0a Fix a compiler warning
Clang things that timings can be NULL here,
and I think it might be right.
2023-01-13 12:07:40 -05:00
Matthias Clasen
51b4d70b8f gridview: Add a few assertions
Just to help static analysis out.

self->n_columns can't ever be 0, since
we clamp it between min_columns and
max_columns, with min_columns always
being at least one.
2023-01-13 12:07:40 -05:00
Matthias Clasen
746d12fc43 Silence a compiler warning
Clang was complaining that we never use the
value stored in mime_type. Just don't store it,
we are only interested in the side-effect
(interning the string).
2023-01-13 12:07:40 -05:00
Matthias Clasen
96ce9e10b8 Merge branch 'faster-ci' into 'main'
Add a build-testsuite option

See merge request GNOME/gtk!5419
2023-01-13 12:57:15 +00:00
Matthias Clasen
3090795351 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.
2023-01-13 07:26:41 -05:00
Matthias Clasen
815b54f3df Update the build documentation 2023-01-13 07:15:15 -05:00
Matthias Clasen
9ad27e4371 Add a build-testsuite option
This will let us run the testsuite in ci without
having to build all the manual tests.
2023-01-13 07:14:33 -05:00
Matthias Clasen
a6e1804474 Merge branch 'macos-werror' into 'main'
CI: turn on -Werror for MacOS build

See merge request GNOME/gtk!5418
2023-01-13 03:08:36 +00:00
Benjamin Otte
7ae549e253 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.
2023-01-12 20:12:37 -05:00
Matthias Clasen
434d8ef0ea Merge branch 'wip/chergert/fix-macos-warnings' into 'main'
Fixes a few compilation warnings on macOS

See merge request GNOME/gtk!5415
2023-01-13 00:10:48 +00:00
Matthias Clasen
31a6d73635 Merge branch 'ebassi/pin-gi' into 'main'
Add gobject-introspection as a subproject

See merge request GNOME/gtk!5414
2023-01-12 23:35:23 +00:00
Christian Hergert
958ecf2855 gdk/macos: fix warning about _coreCursorType 2023-01-12 13:22:47 -08:00
Christian Hergert
fb12ad807a gsk/gl: fix warning when join_sources() is unused 2023-01-12 13:22:25 -08:00
Christian Hergert
965c52d369 gdk: fix warning when !HAVE_EGL 2023-01-12 13:22:02 -08:00
Emmanuele Bassi
474872563f 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.
2023-01-12 17:56:37 +00:00
Matthias Clasen
b92e52bf0e Merge branch 'matthiasc/for-main' into 'main'
css: Avoid some allocations

See merge request GNOME/gtk!5413
2023-01-12 15:20:49 +00:00
Matthias Clasen
d226dc3812 iconcache: Be a bit less wasteful 2023-01-12 00:36:18 -05:00
Matthias Clasen
46e0fde606 css: Avoid more allocations for tokens
Make short string tokens static.
2023-01-12 00:12:09 -05:00
Matthias Clasen
1e7f525e0e css: Avoid some allocations
Avoid duplicating the function name just
for an error message.
2023-01-12 00:12:09 -05:00
Matthias Clasen
d43e0fb9a7 css: Avoid allocation for tokens
All valid dimensions are short, so store
the dimension inside the token.
2023-01-12 00:11:46 -05:00
Matthias Clasen
6fb6f47fc8 css: Avoid some allocations
Reuse the name_buffer for reading strings.
2023-01-12 00:11:11 -05:00
Matthias Clasen
0f7d8e04d8 css: Some inlining 2023-01-12 00:11:10 -05:00
Matthias Clasen
c9fca559dc Cosmetics 2023-01-12 00:11:10 -05:00
Matthias Clasen
b9d1b5d6a3 icontheme: Bit a bit less wasteful 2023-01-12 00:11:10 -05:00
Emin Tufan Çetin
5f75ba46a5 Update Turkish translation 2023-01-11 07:01:44 +00:00
Emin Tufan Çetin
2507301983 Update Turkish translation 2023-01-11 05:41:40 +00:00
Matthias Clasen
41aeff331d texthistory: Avoid g_autofree
msvc does not like it, unfortunately.
2023-01-10 22:20:57 -05:00
Matthias Clasen
3aab48ec16 Merge branch 'wip/chergert/fix-5506' into 'main'
istring: fix istring_prepend() on malloc transition

Closes #5506

See merge request GNOME/gtk!5411
2023-01-11 02:39:32 +00:00
Christian Hergert
ad0348b85e texthistory: add debugging helpers to print undo stack
This is helpful to have when tracking down issues like #5506.
2023-01-10 13:36:16 -08:00
Christian Hergert
6a134551b9 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
2023-01-10 13:32:38 -08:00
Matthias Clasen
0e1ae6ad11 Merge branch 'matthiasc/for-main' into 'main'
Add some more text undo tests

See merge request GNOME/gtk!5410
2023-01-10 19:05:13 +00:00
Aleksandr Melman
5baf4b4b2e Update Russian translation 2023-01-10 12:57:03 +00:00
Matthias Clasen
63560061e8 Add some more text undo tests
Unsuccessfully trying to reproduce #5506.
2023-01-10 07:34:55 -05:00
Matthias Clasen
be721f5797 Merge branch 'matthiasc/for-main' into 'main'
Deprecate gdk_display_put_event

See merge request GNOME/gtk!5409
2023-01-09 21:15:08 +00:00
Matthias Clasen
0073bb79a7 Deprecate gdk_display_put_event
The documentation already tells you not to
use this function.

Ifdef the remaining users in the X11 backend.
2023-01-09 15:46:25 -05:00
Matthias Clasen
f59b506674 Merge branch 'macos-stable-dnd' into 'main'
macos: Drag and drop should not freeze applications

See merge request GNOME/gtk!5291
2023-01-09 11:52:50 +00:00
Matthias Clasen
88b4404296 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
2023-01-09 10:58:14 +00:00
Corey Berla
e20bc7723a 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
2023-01-08 22:32:22 -08:00
Emmanuele Bassi
7edf8841fb Merge branch 'a11y_check_null_path' into 'main'
a11y: Avoid crashing if GtkAtSpiContext::path is NULL

See merge request GNOME/gtk!5405
2023-01-09 00:14:21 +00:00
Emmanuele Bassi
6b5b7eab04 Merge branch 'doc-improvements' into 'main'
Two docs improvements

See merge request GNOME/gtk!5406
2023-01-08 22:16:49 +00:00
Marco Melorio
c775262e9d 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.
2023-01-08 22:41:19 +01:00
Marco Melorio
553fde9761 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.
2023-01-08 21:49:28 +01:00
Barnabás Pőcze
f2593dec4b 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.
2023-01-08 19:58:54 +01:00
Barnabás Pőcze
ab5a6ed0f1 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
      ...
2023-01-08 19:56:49 +01:00
Matthias Clasen
dd3cdc52f5 Fix code style 2023-01-08 14:41:11 +00:00
Matthias Clasen
5a3156a8b7 gdk: Update docs
Update the docs for gdk_display_get_monitor_at_surface.
2023-01-07 21:35:29 -05:00
Matthias Clasen
a4c2f19155 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
2023-01-07 20:39:04 +00:00
Matthias Clasen
be8fb1e9b8 Merge branch 'more-filesystemmodel-cleanups' into 'main'
filesystemmodel: Crop tree model cruft

See merge request GNOME/gtk!5402
2023-01-07 18:42:14 +00:00