Commit Graph

74646 Commits

Author SHA1 Message Date
Matthias Clasen
a6e1c5c96a modules: Cosmetics
Use g_strv_length, instead of open-coding it.
2023-01-17 07:47:28 -05:00
Matthias Clasen
3c8c54ed15 stylecascade: Avoid some allocations 2023-01-17 07:39:51 -05:00
Matthias Clasen
c4d3d72c57 Merge branch 'fix-hidpi-pictures' into 'main'
picture: Fix hi-dpi image handling

See merge request GNOME/gtk!5430
2023-01-16 14:32:01 +00:00
Matthias Clasen
cd79159420 picture: Fix hi-dpi image handling
The idea behind this code was to let scalable
images (i.e. mainly SVGs) provide twice as much
detail when the scale is 2. But we were also
using a scaler for pngs, causing them to be too
small on a hidpi screen. Fix that.

Note that there are cases where you want scaling
for pngs (when you display them scaled down, so
the image has 'hidden' detail). But we are not
attempting to handle that situation automatically.
2023-01-16 08:48:37 -05:00
Emin Tufan Çetin
071c6c60c0 Update Turkish translation 2023-01-15 22:47:27 +00:00
Matthias Clasen
fc24f401b7 Merge branch 'matthiasc/for-main' into 'main'
Use GtkUriLauncher where appropriate

See merge request GNOME/gtk!5432
2023-01-15 18:48:22 +00:00
Matthias Clasen
6c96e51b07 Use GtkUriLauncher where appropriate
GtkLabel, GtkLinkButton and GtkAboutDialog
all have a uri, not a file, so it makes more
sense to use a GtkUriLauncher.
2023-01-15 13:26:53 -05:00
Matthias Clasen
e703163bc4 Merge branch 'uri-launcher-demo' into 'main'
urilauncher: Fix finish function mismatch

See merge request GNOME/gtk!5431
2023-01-15 17:47:18 +00:00
Matthias Clasen
ad549cbded gtk-demo: Add a uri launcher demo 2023-01-15 11:58:43 -05:00
Matthias Clasen
673beef210 urilauncher: Fix finish function mismatch
We need to call the finish function that
matches the async function.
2023-01-15 11:58:09 -05:00
Matthias Clasen
55baa1f2e1 Merge branch 'docs-escape-xml-tag' into 'main'
Escape GtkBuilder XML tag in comment with backtick

Closes #5312

See merge request GNOME/gtk!5429
2023-01-15 15:12:28 +00:00
sunce
b13f05537b Escape GtkBuilder XML tag in comment with backtick
Escape XML tags in gi-docgen oriented comment e.g. from <child> to
`<child>`, so that they don't become HTML tag on the final webpage.
This fix includes everything from commit ff46ea64 and #5312.

Fixes #5312
2023-01-15 16:55:18 +08:00
Matthias Clasen
0834dac6ee Merge branch 'matthiasc/for-main' into 'main'
widgetfactory: Load textures in threads

See merge request GNOME/gtk!5428
2023-01-15 04:12:47 +00:00
Matthias Clasen
3c31f72219 texture: Update docs
Document that we support TIFF as well.
2023-01-14 22:48:57 -05:00
Matthias Clasen
a0f63160d6 widgetfactory: Load textures in threads
It is useful to show how this is done, even
though the images here are not terribly large.
2023-01-14 22:38:20 -05:00
Matthias Clasen
c99d85954a Merge branch 'nielsdg/gtkwidgetactionactivatefunc-nullable-variant' into 'main'
Add missing nullable to GtkWidgetActionActivateFunc

See merge request GNOME/gtk!5424
2023-01-15 00:46:11 +00:00
Matthias Clasen
33f31d06f9 Merge branch 'uri-launcher' into 'main'
filelauncher: Plug a memory leak

See merge request GNOME/gtk!5425
2023-01-14 22:59:01 +00:00
Matthias Clasen
bf4b40f17e docs: Update deprecations for gtk_show_uri
We have a better replacement now.
2023-01-14 17:39:28 -05:00
Matthias Clasen
7aba9e3295 urilauncher: Add cross-references to the docs 2023-01-14 17:39:28 -05:00
Matthias Clasen
3080cb7acd Add GtkUriLauncher 2023-01-14 17:39:28 -05:00
Matthias Clasen
4b404f0dea Add g_openuri_portal_open_uri_async
This avoids a roundtrip through GFile and
thus works with random uri schemes.
2023-01-14 14:32:51 -05:00
Matthias Clasen
0c1c0524c7 openuri: Some reshuffling
This is in preparation of adding a method
that takes a uri instead of a GFile.
2023-01-14 14:32:51 -05:00
Matthias Clasen
b58ef290dc filelauncher: Plug a memory leak
Oops
2023-01-14 14:32:51 -05:00
Niels De Graef
1387fba7f8 Add missing nullable to GtkWidgetActionActivateFunc
The `GVariant` that is passed on to the `GtkWidgetActionActivateFunc`
can be `NULL` in case the parameter type is also `NULL`, so mark it
nullable.
2023-01-14 15:30:15 +01:00
Matthias Clasen
34b9ec5be2 Merge branch 'matthiasc/for-main' into 'main'
Fix a compiler warning

See merge request GNOME/gtk!5423
2023-01-14 05:30:10 +00:00
Matthias Clasen
cefdfbd894 icontheme: Streamline the suffix handling code 2023-01-14 00:14:43 -05:00
Matthias Clasen
3676ddbdff icontheme: Avoid some allocations
When loading icon themes, we can reuse memory
instead of allocating and freeing in a loop.
2023-01-14 00:14:43 -05:00
Matthias Clasen
7c1a0e0c15 icontheme: Keep a single string set
Instead of keeping a GtkStringSet per IconTheme,
just make one for the whole GtkIconTheme.

This avoids loops of the themes in some places, and
due to the overlap in icon names between the themes,
it reduces the amount of memory we use for the icon
names with Adwaita+hicolor from 5+4 chunks to 6 chunks.
2023-01-14 00:14:43 -05:00
Matthias Clasen
19bb043a85 testsuite: Fix various compiler warnings
These are mostly dead stores that clang
isn't happy with.
2023-01-14 00:14:43 -05:00
Matthias Clasen
fecc80b59c Fix a compiler warning
Clang things that timings can be NULL here,
and I think it might be right.
2023-01-14 00:14:41 -05:00
Matthias Clasen
1648dc36f8 Merge branch 'wip/corey/fix-docs' into 'main'
docs: Fix dependency names

See merge request GNOME/gtk!5422
2023-01-14 04:23:34 +00:00
Matthias Clasen
a27a2cbf40 Merge branch 'matthiasc/for-main' into 'main'
Silence a compiler warning

See merge request GNOME/gtk!5421
2023-01-14 00:18:50 +00:00
Corey Berla
e418656a04 docs: Fix dependency names
When gi-docgen added the "related" key, it also began checking
that the dependencies were actually dependencies otherwise they aren't
listed as dependencies.  The capitalization needs to match the
namespace.
2023-01-13 14:24:33 -08:00
Matthias Clasen
d4ec1afe44 Merge branch 'fix-spinner-stop' into 'main'
gtkcssanimatedstyle: Fix return of new_advance()

Closes #4426

See merge request GNOME/gtk!5420
2023-01-13 20:14:25 +00:00
Matteo Percivaldi
374d97008b gtkcssanimatedstyle: Fix return of new_advance()
This was causing animation and transition to stop randomly and reset
their state to initial state.

This issue has existed since commit
7b68bdb831.

Closes #4426
2023-01-13 18:08:56 +01:00
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