Commit Graph

26113 Commits

Author SHA1 Message Date
Marco Trevisan (Treviño)
1da208cddc gio/tests/gdbus-proxy-threads: Unref GVariant's that we own
This test is leaking various GVariant's that we are supposed to unref,
leading the valgrind CI job to complain about.

Helps with: https://gitlab.gnome.org/GNOME/glib/-/issues/333
2022-09-02 20:26:06 +02:00
Marco Trevisan
88d4b3b365 Merge branch 'fix-doc-portal-add-leak' into 'main'
documentportal: Fix small leak in add_documents with empty URI list

Closes #2733

See merge request GNOME/glib!2871
2022-09-02 18:24:48 +00:00
Sebastian Keller
27203e48c9 documentportal: Fix small leak in add_documents with empty URI list
When called with an empty URI list (or only inaccessible files),
g_document_portal_add_documents would not call g_variant_builder_end,
leaking the memory allocated by the variant builder.

Closes: https://gitlab.gnome.org/GNOME/glib/-/issues/2733
2022-09-02 19:48:36 +02:00
Marco Trevisan (Treviño)
511627b735 tests/dbus-appinfo: Add test case for flatpak opening an invalid file
We were testing the case in which we were opening an actual file, and so
potentially using a fd-list, however we were missing the case in which a file
was not existent.

And in such case we are incidentally hitting a leak now.
2022-09-02 19:48:36 +02:00
Emmanuele Bassi
e08c954693 Fix check before a memcpy
The search_total_results address is always going to be non-zero, so the
check will always evaluate to true, and GCC is kind enough to point this
out to us.

The appropriate fix is checking if the size of the search results array
is larger than zero, and if so, copy them into the total results array.
2022-09-02 12:59:22 +01:00
Emmanuele Bassi
903c004b37 Fix array-bounds compiler warnings with GCC 12
GCC isn't smart enough to recognise that the assertion on the size of
N_PROPERTIES also affects the assertion on the GParamSpec array access,
so we need to coalesce the two checks into one to avoid an array-bounds
compiler warning.
2022-09-02 12:46:57 +01:00
Luca Bacci
e112bdb247 GWin32AppInfo: Add missing g_spawn_close_pid 2022-09-02 12:35:17 +02:00
Emin Tufan Çetin
66c4e35e28 Update Turkish translation 2022-09-01 22:22:29 +00:00
Alan Mortensen
3242291bdc Update Danish translation 2022-09-01 16:28:58 +00:00
Balázs Úr
c0bd4d8de6 Update Hungarian translation 2022-08-31 23:44:07 +00:00
Marco Trevisan
2ef66ba386 Merge branch 'main' into 'main'
gio-launch-desktop: replace static_assert with G_STATIC_ASSERT

Closes #2713

See merge request GNOME/glib!2858
2022-08-31 15:06:27 +00:00
Leônidas Araújo
22757b2d50 Update Brazilian Portuguese translation 2022-08-31 14:58:38 +00:00
Marco Trevisan (Treviño)
a0e71ff86f gio-tool-mount: Return early on fgets EOF
As per commit a5390002 we're exiting with error in case fgets failed,
however it could also fail because of EOF (like on ^D), so in such case
we can just return early treating it as a non-error.

Otherwise still exit with error.

Fixes: #2737
2022-08-30 16:33:29 +02:00
Marek Černocký
695d6b4d8d Updated Czech translation 2022-08-29 10:50:21 +02:00
Matthias Clasen
56236d708f Merge branch 'use-cloexec-epoll' into 'main'
gio-unix: Use EPOLL_CLOEXEC by default

See merge request GNOME/glib!2868
2022-08-27 16:37:11 +00:00
Luca Bacci
e1e9bc9429 Merge branch 'g-win32-app-info-launch-uris-async' into 'main'
GWin32AppInfo: Implement launch_uris_async

Closes gtk#4400

See merge request GNOME/glib!2760
2022-08-27 14:11:10 +00:00
Danial Behzadi
e493d59353 Update Persian translation 2022-08-27 06:00:22 +00:00
Luca Bacci
53515197df GWin32AppInfo: Instantiate ApplicationActivationManager out-of-process
This is recommended on MSDN
2022-08-26 11:33:22 +02:00
Luca Bacci
d12cf95836 GDesktopAppInfo: Tidy up code a bit
* Remove an unneeded field from LaunchUrisData and add annotations
* Rename local GError* variables to local_error
* Use g_set_object
* Fix indentation
2022-08-26 11:33:22 +02:00
Luca Bacci
361b4a8fc9 GAppInfo: Clarify that GAppInfo launch methods can spawn multiple instances
...of the application if many URI's are provided. This is important to note
because the GAppLaunchContext signals may be emitted multiple times during
a single launch operation.
2022-08-26 11:33:22 +02:00
Luca Bacci
42a76e1631 GWin32AppInfo: Check for task cancellation
We cannot cancel a spawn operation, but sometimes we have to
spawn the target application mutiple times (e.g. in case the
target app only supports one URI in its command-line, but we
were given multiple URI's), in that case continuously check
the cancellation status before attempting any spawn operation
2022-08-26 11:33:22 +02:00
Luca Bacci
cff3e660c1 GWin32AppInfo: Emit GAppLaunchContext signals for all code paths 2022-08-26 11:33:09 +02:00
Colin Walters
426fab1eca gio-unix: Use EPOLL_CLOEXEC by default
First, there's no reason not to use the new `epoll_create1` system call,
which quickly obsoleted `epoll_create` which has an obsolete and
unused size argument.

But more specifically, it offers `EPOLL_CLOEXEC` which we want
to use for general hygeine - there's no reason to potentially
leak this file descriptor to forked processes.

(GLib itself carefully closes file descriptors when forking child
 processes, but it may be linked with other software that doesn't;
 notably in my case for example the Rust standard library does not
 do this and hence relies more on the application code using
 `O_CLOEXEC` and variants)

This is just a drive-by fix; I saw the system call when I was using
`strace` to debug something else in rpm-ostree.
2022-08-26 04:10:22 -04:00
Kukuh Syafaat
c135882e7e Update Indonesian translation 2022-08-26 02:13:35 +00:00
Nart Tlisha
62a9a8a660 Update Abkhazian translation 2022-08-25 10:40:25 +00:00
Danial Behzadi
7435ac17d4 Update Persian translation 2022-08-24 07:19:21 +00:00
Aurimas Černius
1dfdcaf38b Updated Lithuanian translation 2022-08-22 23:17:51 +03:00
Emmanuele Bassi
0e112b457d Merge branch 'document-oom-behavior' into 'main'
mem: Document OOM behavior for allocations

See merge request GNOME/glib!2861
2022-08-22 14:01:15 +00:00
Sebastian Dröge
5abee3923d Merge branch 'andyholmes/gparampec-annotation-fixes' into 'main'
gparamspec: mark nick/blurb as nullable

Closes #2719

See merge request GNOME/glib!2863
2022-08-22 06:32:53 +00:00
Andy Holmes
79c70d7a36
gparamspec: mark nick/blurb as nullable
GParamSpec nicks and blurbs are effectively a deprecated feature,
or at least unused by most libraries these days. Since a number
of C libraries (i.e. GTK4) have started to null these out, annotate
them as `(nullable)` so bindings can do the same.

Closes #2719
2022-08-21 15:52:38 -07:00
Fran Dieguez
6b98081a9f Update Galician translation 2022-08-21 15:50:26 +00:00
Piotr Drąg
1fcaac94a0 Update Polish translation 2022-08-21 12:49:21 +00:00
Matthias Clasen
1df83acb87 mem: Document OOM behavior for allocations
For all the memory allocator APIS, document
that they terminate the program on failure.

This was so far only mentioned in the long description,
and in the docs for g_try_malloc(). And with gi-docgen
style docs, the long description is going away.
2022-08-19 08:29:36 -04:00
Luca Bacci
f0ff6a6af0 GWin32AppInfo: Add g_win32_app_info_launch_uris_impl utility function
This utility function will be called by both launch_uris and
launch_uris_async, passing a from_task parameter respectively
as NULL and non-NULL. The from_task parameter will be needed
to know whether GAppLaunchContext signals should be emitted
directly (from_task == NULL) or scheduled for emission on the
main thread (from_task != NULL).
2022-08-16 12:29:18 +02:00
Boyuan Yang
2a5219035a Update Chinese (China) translation 2022-08-15 20:23:42 +00:00
Seungha Yang
ebcc3c01db glib-mkenums: Specify output encoding as UTF-8 explicitly for non-English locale
Fixup regression introduced by
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2797
2022-08-16 04:53:34 +09:00
Marco Trevisan
813ce7f0b5 gio-launch-desktop: preserve static_assert message 2022-08-15 17:02:06 +00:00
Owen Rafferty
c850a06ea2
gio-launch-desktop: replace static_assert with G_STATIC_ASSERT 2022-08-15 01:41:50 -05:00
Jordi Mas
663a7959ca Update Catalan translation 2022-08-14 15:55:00 +02:00
Goran Vidović
9acb3e9dbc Update Croatian translation 2022-08-12 22:33:43 +00:00
Luca Bacci
bf13a5e0a4 GWin32AppInfo: Implement launch_uris_async
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4400
2022-08-12 18:33:20 +02:00
Michael Catanzaro
0ffe86a1f7 Replace most GObject warnings with criticals
All of these warnings indicate programmer error, so critical is most
appropriate here.

Exceptions: deprecation warnings are just warnings. Also, warnings that
are worded with uncertainty can remain warnings rather than criticals.
2022-08-09 13:18:47 -05:00
Danial Behzadi
bfe7c3475a Update Persian translation 2022-08-08 17:45:21 +00:00
Danial Behzadi
2375d85a55 Update Persian translation 2022-08-08 11:45:29 +00:00
Daniel Mustieles
d4c16c66d4 Updated Spanish translation 2022-08-08 12:42:43 +02:00
Simon McVittie
96c541c45a Merge branch 'tls-no-flags-rename-fix' into 'main'
gtlscertificate: Update reference to G_TLS_CERTIFICATE_NO_FLAGS

See merge request GNOME/glib!2855
2022-08-08 10:20:16 +00:00
Danial Behzadi
dcf6f547d3 Update Persian translation 2022-08-07 21:39:40 +00:00
Hugo Carvalho
98a6f2914b Update Portuguese translation 2022-08-07 21:31:28 +00:00
Yuri Chornoivan
9c8f6a9b10 Update Ukrainian translation 2022-08-07 16:08:01 +00:00
Asier Sarasua Garmendia
a23580a257 Update Basque translation 2022-08-07 09:49:11 +00:00