Commit Graph

30723 Commits

Author SHA1 Message Date
Michael Catanzaro
36eed2042d Merge branch '3450-epoll-create' into 'main'
build: Check for epoll_create1 rather than epoll_create in meson.build

Closes #3450

See merge request GNOME/glib!4209
2024-08-25 17:21:06 +00:00
Philip Withnall
282545565a Merge branch 'ci-msys2-mingw32-catch-access-violation' into 'main'
CI/msys2-mingw32: Set the G_DEBUGGER environment variable

See merge request GNOME/glib!4205
2024-08-25 15:36:08 +00:00
Philip Withnall
dfed38ef03
gmenumodel: Acknowledge in docs that the UI used in the example is old
This kind of deeply nested menu is definitely no longer good UI practice
for most apps (deeply nested menus make things hard to find, and require
good mouse control to navigate). However, it does serve as a good
demonstration of the concepts in `GMenuModel`, so keep it, with a
sentence to acknowledge that it’s not a good UI.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Fixes: #3451
2024-08-25 15:34:32 +01:00
Philip Withnall
87ebb444a5 Merge branch 'translation' into 'main'
Update Chinese translation

See merge request GNOME/glib!4207
2024-08-25 14:31:03 +00:00
Philip Withnall
fd8ede0b66
build: Check for epoll_create1 rather than epoll_create in meson.build
Because `epoll_create1()` is what the code in `giounix-private.c`
actually uses.

Spotted by Xuntao Chi.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Fixes: #3450
2024-08-25 15:28:21 +01:00
Philip Withnall
626ab87d16 Merge branch 'update-sv-translation' into 'main'
Update Swedish translation

See merge request GNOME/glib!4208
2024-08-25 14:27:30 +00:00
Anders Jonsson
052b295ac2 Update Swedish translation 2024-08-25 14:06:59 +02:00
lumingzh
f2007e0cfd update Chinese translation 2024-08-24 13:14:03 +00:00
Luca Bacci
84c2d64436 docs: Don't reference Unix-only method GLib.Source.add_unix_fd
gi-docgen won't find the method on Windows
2024-08-23 15:57:13 +02:00
Luca Bacci
1265b456d1 CI/msys2-mingw32: Set G_DEBUGGER environment variable
This enables us to catch access violation errors in CI and
get meaningful stacktraces with gdb.

Helps #3042

See https://docs.gtk.org/glib/running.html#environment-variables
2024-08-23 15:41:34 +02:00
Philip Withnall
3d53902fc3 Merge branch 'fix_typo_in_comment' into 'main'
issue 3428: fix comment in escape_string

Closes #3428

See merge request GNOME/glib!4200
2024-08-21 10:03:55 +00:00
LI Daobing
0ad7709c22 issue 3428: fix comment in escape_string 2024-08-20 18:24:33 -07:00
Michael Catanzaro
255ffe09d4 Merge branch 'unixmounts-fixes' into 'main'
gunixmounts: Fix use of uninitialised variable

See merge request GNOME/glib!4197
2024-08-20 16:21:24 +00:00
Philip Withnall
82295998ac
Revert "gmodule-dl: Use RTLD_DEFAULT on FreeBSD too"
This reverts commit bb2ab2647d.

It appears to break the use of `G_MODULE_BIND_LOCAL`, as evidenced by
the `test_local_binding()` test in `module-test.c` failing on FreeBSD
ever since that test was added. See #3415.

Looking back at the merge request (!3656), I should have pressed for
detail on why this change was needed.

Fixes: #3415
2024-08-20 14:47:23 +01:00
Philip Withnall
23a7b4bf17 Merge branch 'wip/pwithnall/cancellable-test-fixes' into 'main'
tests: Run expected-to-hang cancellable tests in subprocesses

See merge request GNOME/glib!4198
2024-08-20 13:40:34 +00:00
Philip Withnall
ce71da63ba
Revert "gio/tests/cancellable: Explain failure on GCancellableSource tests on valgrind"
This reverts commit 365411ea32.

Since commit 3a07b2abd4, issue 2309 has
been fixed, so we should no longer have failures from valgrind here.
2024-08-20 13:02:43 +01:00
Philip Withnall
71cd903118
tests: Run expected-to-hang cancellable tests in subprocesses
These tests are expected to cause a thread to deadlock. That seems to be
fine with glibc on Linux, but the glibc version on FreeBSD can detect
the deadlock, and aborts the whole test process with:
```
GLib (gthread-posix.c): Unexpected error from C library during 'pthread_mutex_lock': Resource deadlock avoided.  Aborting.
```

This is fair enough.

To avoid this causing the test suite to fail, run those two tests in
subprocesses. This also means we’re not carrying a deadlocked thread
around for the rest of the test suite.

Improves on commit 62192925b6.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-08-20 13:02:36 +01:00
Philip Withnall
4235c11757
gunixmounts: Fix use of uninitialised variable
And drop a load of unused variables.

Fixes commit 5040cf1943.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-08-20 12:39:15 +01:00
Philip Withnall
fe5b9b41b7 Merge branch 'main' into 'main'
Replace hi.po with updated translations.

See merge request GNOME/glib!4195
2024-08-19 11:46:09 +00:00
Karunakar Guntupalli
f67081e118 Replace hi.po with updated translations.
Please refer for veritimus submission -  https://l10n.gnome.org/vertimus/400/390/62/
2024-08-17 18:38:04 +00:00
Philip Withnall
73f5ca5763
2.81.2
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-08-16 19:37:20 +01:00
Marco Trevisan
e113052558 Merge branch 'wip/pwithnall/3315-sigaltstack-again' into 'main'
tests: Move alternate stack onto the heap rather than the main stack

Closes #3315

See merge request GNOME/glib!4194
2024-08-16 14:47:13 +00:00
Philip Withnall
84728d4e01
tests: Move alternate stack onto the heap rather than the main stack
And size it to `sysconf (_SC_MINSIGSTKSZ)`, if defined.

This might fix the sigaltstack test on muslc, as suggested by Markus
Wichmann (https://www.openwall.com/lists/musl/2024/05/30/2) and Rich Felker
(https://www.openwall.com/lists/musl/2024/05/29/7) on the musl mailing
list.

The thinking is that the CI machine might have a huge register file
(AVX512 or some other large extension) which doesn’t fit in `MINSIGSTKSZ`.
By sizing the alternate stack to `sysconf (_SC_MINSIGSTKSZ)` we should
be able to avoid that.

Moving it onto the heap should avoid any potential complications or bugs
from having one stack embedded within another.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Fixes: #3315
2024-08-16 14:27:25 +01:00
Philip Withnall
f4aceb0e91 Merge branch 'wip/pwithnall/unix-mount-tests' into 'main'
gunixmounts: Add mount point/entry getters from files and add tests based on them

See merge request GNOME/glib!4163
2024-08-15 14:25:52 +00:00
Emmanuele Bassi
b540bdd961 Merge branch 'volume-docs' into 'main'
docs: Clarify distinction between GDrive, GVolume and GMount

See merge request GNOME/glib!4193
2024-08-15 11:06:36 +00:00
Philip Withnall
b4332b0056
docs: Clarify distinction between GDrive, GVolume and GMount
Provide examples of what they all represent, and expand on the
descriptions of them in a few places.

Move references to their equivalents from `GnomeVFS` to lower down in
the documentation, since `GnomeVFS` has been deprecated for many years
now, and is unlikely to be pertinent to most readers.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-08-15 11:32:37 +01:00
Philip Withnall
67b4a27569 Merge branch 'ghrfunc-doc' into 'main'
ghash: Fix the documentation of GHRFunc

See merge request GNOME/glib!4192
2024-08-15 10:22:07 +00:00
Adrien Plazas
46ec058d2a ghash: Fix the documentation of GHRFunc
This function type isn't only used by g_hash_table_foreach_remove(), and
what happens to the data when we return TRUE depends on the calling
function.

Includes a port to modern gi-docgen syntax by Emmanuele Bassi.

Signed-off-by: Adrien Plazas <adrien.plazas@codethink.co.uk>
2024-08-15 10:22:07 +00:00
Philip Withnall
02ffe6a779 Merge branch 'fix_3429' into 'main'
gsettings-tool: Always use the global_schema_source to lookup schemas in list-recursively

Closes #3429

See merge request GNOME/glib!4183
2024-08-14 16:14:45 +00:00
Lukáš Tyrychtr
018581adb5 gsettings-tool: Always use the global_schema_source to lookup schemas in list-recursively
When listing schemas from a specified directory, explicitly
create the GSettings object from the schema, don't allow g_settings_new
to do the usual lookup. That lookup fails if no other schemas are
installed in the default directories.

Fixes #3429.
2024-08-14 16:14:45 +00:00
Philip Withnall
ab616db01e Merge branch 'wip/3v1n0/ci-really-use-fedora-39' into 'main'
ci: Ignore lcov errors on source missing, handle atomic writes and actually use Fedora 39 image

Closes #3381

See merge request GNOME/glib!4096
2024-08-14 14:58:36 +00:00
Philip Withnall
93fb9951aa
gunixmounts: Drop some Interix and QNX support
This can never have been tested, it was returning `GUnixMountEntry`
structs from functions which are typed to return `GUnixMountPoint`s.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-08-14 15:52:11 +01:00
Philip Withnall
04ee011171
tests: Add tests for handling of fstab and mtab files
While GLib doesn’t parse these files, it does provide API to access the
fields from them, and does implement some logic based on options fields
in them. It would be nice to be able to test that, and get coverage of
the methods for `GUnixMountPoint` and `GUnixMountEntry`.
2024-08-14 15:52:02 +01:00
Philip Withnall
5040cf1943
gunixmounts: Add mount point/entry getters from files
We don’t expect users to start querying the fstab or mtab by explicitly
loading data from those file paths. These functions are mainly intended
to prove a controllable entry point into the `gunixmounts.c` code for
unit testing.

It means we can provide a file with controllable contents in order to
test the mount entry/point code on.

See: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4155

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-08-14 15:51:49 +01:00
Philip Withnall
742f38fa93 Merge branch 'jsparber/open_uri_activation_token' into 'main'
gappinfo: Pass activation token from launch context to open_uri/file portal

Closes #2868

See merge request GNOME/glib!3933
2024-08-14 14:16:40 +00:00
Michael Catanzaro
d9b2d097b4 Merge branch 'gstring-free-unused-result' into 'main'
gstring: fix unused-result warning with g_string_free() in C++

See merge request GNOME/glib!4182
2024-08-14 13:34:30 +00:00
Philip Withnall
dfe5e15a0a Merge branch 'use-tap-14' into 'main'
gtestutils: Use TAP 14 syntax by default

Closes #2885

See merge request GNOME/glib!4178
2024-08-14 13:27:04 +00:00
Philip Withnall
c5e17bc37f Merge branch 'amolenaar/macos-launch-uris-async' into 'main'
macos: Implement GAppInfo launch_uris_async interface

Closes #3403

See merge request GNOME/glib!4129
2024-08-14 13:16:06 +00:00
Emmanuele Bassi
2a4f7b8421 Merge branch 'lukeshu/doc-conversion' into 'main'
docs: Fix mistakes from the GTK-Doc to GI-DocGen conversion

See merge request GNOME/glib!4187
2024-08-14 00:16:09 +00:00
Luke T. Shumaker
03a2ec8fee docs: g_socket_{get,set}_option: Fix the link to gnetworking.h 2024-08-13 15:19:21 -06:00
Luke T. Shumaker
9f6afbdb33 docs: g_regex_match_all: Remove a stray ";" in an example regex 2024-08-13 15:19:21 -06:00
Luke T. Shumaker
e4a2aa8f39 docs: Wrap things that gi-docgen mistakes as HTML tags in backticks
This are nasty, because they mean words get dropped from the
documentation.  This can be seen at

 - https://docs.gtk.org/gio/ctor.DBusNodeInfo.new_for_xml.html where
   it reads "one top-level element" instead of "one top-level <node>
   element".

 - https://docs.gtk.org/gio/method.ProxyResolver.lookup.html where it
   reads "where could be" instead of "where <protocol> could be".

 - https://docs.gtk.org/gio/method.Socket.get_option.html where it
   reads "[][gio-gnetworking.h]" instead of
   "[<gio/gnetworking.h>][gio-gnetworking.h" (also, this markdown link
   needs fixed, but let's save that for another commit).

 - https://docs.gtk.org/glib/ctor.DateTime.new_from_iso8601.html where
   the text is incomprehensible; "strings of the form are supported"
   instead of "strings of the form <date><sep><time><tz> are
   supported"; further references to <sep>, <date>, <time>, and <tz>
   are similarly mangled.

 - https://docs.gtk.org/glib/method.MatchInfo.fetch_named.html and
   https://docs.gtk.org/glib/method.MatchInfo.fetch_named_pos.html
   where the regex reads as "(?Pa)?b" instead of as "(?P<X>a)?b",
   changing the meaning of it.

 - https://docs.gtk.org/glib/method.Regex.match_all_full.html is all
   wack because the "<a>" in the example string is taken to be an HTML
   link; and all example strings and regexes are mangled (also, one of
   the regexes has a stray ";" in it, but let's save that for another
   commit).

 - https://docs.gtk.org/glib/method.Regex.replace.html where it simply
   reads "\g" instead of "\g<number>" and "\g<name>".

Fix those.
2024-08-13 15:19:21 -06:00
Luke T. Shumaker
d0b59da656 docs: Transition remaining DocBook XML to markdown/HTML
These remaining DocBook tags are mostly harmless; they are passed as
HTML5 tags to the browser, which effectively treats them as just
<span> elements, so all this mistake is doing is dropping some
styling.

This lack of of styling can be seen at:

 - https://docs.gtk.org/gio/enum.DriveStartStopType.html "ATA SECURITY
   UNLOCK DEVICE" is not indicated to be a quote or anything.

 - https://docs.gtk.org/gio/struct.UnixMountEntry.html "/media/cdrom"
   is not rendered in monospace.

 - https://docs.gtk.org/gio/struct.UnixMountPoint.html "/dev" is not
   rendered in monospace.

 - https://docs.gtk.org/glib/type_func.Thread.init.html the notes are
   not indicated to be anything other than regular paragraphs.

Fix that.
2024-08-13 15:19:14 -06:00
Michael Catanzaro
7f6444cb79 Merge branch 'gobjectnotifyqueue_unused' into 'main'
gobjectnotifyqueue: add G_GNUC_UNUSED in unused parameters

See merge request GNOME/glib!4188
2024-08-13 14:28:47 +00:00
Pablo Barciela
de7fdced7f gobjectnotifyqueue: Add G_GNUC_UNUSED in unused parameters 2024-08-13 04:40:11 +02:00
Michael Catanzaro
0b64bb2204 Merge branch 'sophie-h-main-patch-f54e' into 'main'
doap: Remove invalid maintainer entry

See merge request GNOME/glib!4186
2024-08-12 13:33:08 +00:00
Sophie Herold
65ac113c4b doap: Remove invalid maintainer entry
The gnome:userid for this maintainer does not exist. Remove the entry for clarification and to avoid errors in automated processing of .doap-files.
2024-08-12 11:46:22 +00:00
Arjan Molenaar
2ad61ed0ee Fix formatting issues 2024-08-10 19:42:32 +02:00
Arjan Molenaar
d23c781e7b macos: Tune launch results for CI
It looks like we have no Finder running.
2024-08-10 19:34:29 +02:00
Arjan Molenaar
1053c016d9 macos: Add test case for invalid scheme
You may not always know which schemes are available.

The library should not bail out, but only show
an informal message. It's the responsibility of
the application to deal with invalid URI schemes.
2024-08-10 19:34:29 +02:00