Commit Graph

24647 Commits

Author SHA1 Message Date
Christian Hergert
dd43471f60 gobject: add GSignalGroup
Much like GBindingGroup, the GSignalGroup object allows you to connect many
signal connections for an object and connect/disconnect/block/unblock them
as a group.

This is useful when using many connections on an object to ensure that they
are properly removed when changing state or disposing a third-party
object.

This has been used for years in various GNOME projects and makes sense to
have upstream instead of multiple copies.
2022-02-01 17:09:14 -08:00
Matej Urbančič
1cdb0f8bed Update Slovenian translation 2022-02-01 19:32:46 +00:00
Philip Withnall
555bef05cf Merge branch 'file-test' into 'main'
File tests

See merge request GNOME/glib!2404
2022-02-01 11:15:45 +00:00
Philip Withnall
c540c6a80e ci: Add link to Coverage output at end of coverage job
This should make it a bit easier to find the coverage report, rather
than digging through the job artifacts.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-02-01 11:08:22 +00:00
Fran Dieguez
b617b40e24 Update Galician translation 2022-01-31 23:36:10 +00:00
Luming Zh
fd1890f713 Update Chinese (China) translation 2022-01-31 03:22:54 +00:00
sicklylife
78720effc1 Update Japanese translation 2022-01-30 15:25:28 +00:00
sicklylife
8d13fc5222 Update Japanese translation 2022-01-30 15:13:15 +00:00
Piotr Drąg
2415b3c793 Update Polish translation
(cherry picked from commit 49c377c61f)
2022-01-29 14:08:59 +00:00
Christian Hergert
0d9de09192 gobject: add GBindingGroup
Originally, GBindingGroup started with Builder as a way to simplify all
of the third-degree object bindings necessary around Model-Controller
objects such as TextBuffer/TextView.

Over time, it has grown to be useful in a number of scenarios outside
of Builder and has been copied into a number of projects such as GNOME
Text Editor, GtkSourceView, libdazzle, and more.

It makes sense at this point to unify on a single implementation and
include that upstream in GObject directly alongside GBinding.
2022-01-28 16:01:22 -08:00
Philip Withnall
ea0fa26029 Merge branch 'fix-gi-suproject' into 'main'
gi: expose some files as variable for gobject-introspection

See merge request GNOME/glib!2465
2022-01-28 16:44:20 +00:00
Andoni Morales Alastruey
b1ed9907c2 gi: expose some files as variable for gobject-introspection
see:
https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/313
2022-01-28 16:16:29 +01:00
Philip Withnall
88f4514a92 Merge branch 'SuibianP-main-patch-88562' into 'main'
Amend g_bus_get* documentation regarding private connection

See merge request GNOME/glib!2464
2022-01-28 13:11:36 +00:00
Hu Jialun
7f044ba9c0 Amend g_bus_get* documentation regarding private connection 2022-01-28 13:11:34 +00:00
Aleksandr Melman
7a759e18c9 Update Russian translation 2022-01-28 11:06:16 +00:00
Rafael Fontenelle
c2ac44b261 Update Brazilian Portuguese translation 2022-01-27 15:33:59 +00:00
Philip Withnall
4bd23d1b26 2.71.1
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-01-27 15:22:23 +00:00
Yuri Chornoivan
80b6aad868 Update Ukrainian translation 2022-01-27 14:52:54 +00:00
Philip Withnall
e01e6ef771 Merge branch 'windows-static-build-postfixes' into 'main'
Fix tests with static build on Windows

See merge request GNOME/glib!2442
2022-01-27 14:33:40 +00:00
Sebastian Dröge
a542c10ee4 Merge branch 'revert-7f2de9ab' into 'main'
Revert "Merge branch 'fix-windows-pc' into 'main'"

See merge request GNOME/glib!2463
2022-01-27 14:10:24 +00:00
Philip Withnall
cdda7bb59a Revert "Merge branch 'fix-windows-pc' into 'main'"
This reverts merge request !2459
2022-01-27 13:04:12 +00:00
Hugo Carvalho
73aebf3887 Update Portuguese translation 2022-01-27 12:53:46 +00:00
Loic Le Page
cbbc9206aa Fix exported symbols in proxy-libintl subproject 2022-01-27 12:10:13 +01:00
Loic Le Page
4f6673fb58 Fix glib/tests/completion test
GLists compare pointers values and not strings content.
2022-01-27 12:10:13 +01:00
Loic Le Page
38abadab3d Fix dbus process autolaunch with static build on Windows
On Windows, dbus is launched by spawning the gdbus.exe executable on
demand from the gio module. When linked dynamically, the executable
path is guessed relatively to the gio DLL path. But when linked
statically, the only reference path available is the current
executable path. In this case, gdbus.exe is not necessarily in the same
folder as the current executable.

This patch solves the issue using the same algorithm as the one used
with process spawning in glib core source code two commits above.
2022-01-27 12:10:13 +01:00
Loic Le Page
41f8bbd02d Fix process spawning with static build on Windows
On Windows, process spawning needs an external helper exe which is found
relatively to the glib DLL file. If glib has been built statically this
file doesn't exist anymore and reference path is not the DLL path
anymore but the current executable path.

This patch searches for the helper exe taking as starting point the
current executable path, relative 'bin', 'lib', 'glib' and 'gio' folders
and then gets one level up until the root path. If this search doesn't
give result then the helper exe is searched using the PATH variable.
2022-01-27 12:10:13 +01:00
Philip Withnall
94f4ec85c6 Merge branch 'fix-memleak-gdbusauthmechanismsha1' into 'main'
Fix memory leak in gio/gdbusauthmechanismsha1.c

See merge request GNOME/glib!2461
2022-01-27 11:05:45 +00:00
Philip Withnall
f242299b3e Merge branch 'windows-static-resource' into 'main'
Windows: Do not link DLL specific resources when doing a static build

Closes #2585

See merge request GNOME/glib!2457
2022-01-27 11:02:34 +00:00
Philip Withnall
7f519624e2 Merge branch '1190-debug-interface' into 'main'
gdebugcontroller: Add debug controller API and D-Bus implementation

Closes #1190

See merge request GNOME/glib!2330
2022-01-27 11:00:40 +00:00
Sebastian Dröge
13ee46538f Merge branch 'fix-g_find_program_in_path' into 'main'
gutils: Fix g_find_program_in_path() to return an absolute path

Closes #2586

See merge request GNOME/glib!2460
2022-01-27 10:50:36 +00:00
Loic Le Page
6ec432386e Fix memory leak in gio/gdbusauthmechanismsha1.c 2022-01-27 10:39:49 +01:00
Sebastian Dröge
7f2de9ab83 Merge branch 'fix-windows-pc' into 'main'
gio: add missing zlib dependency in gio-windows-2.0.pc

See merge request GNOME/glib!2459
2022-01-27 08:45:53 +00:00
Christoph Niethammer
78dc1cc3cd gutils: Fix g_find_program_in_path() to return an absolute path
Fix a possibility of returning a relative path, in case PATH contains
a relative path. According to the doc, the function should return an
absolute path.

Signed-off-by: Christoph Niethammer <christoph.niethammer@gmail.com>
2022-01-27 03:54:01 +01:00
Leônidas Araújo
4d97fef04c Update Brazilian Portuguese translation 2022-01-26 19:29:01 +00:00
Rafael Fontenelle
2e4eccb872 Update Brazilian Portuguese translation
(cherry picked from commit 22e9237d02)
2022-01-26 19:22:41 +00:00
Fran Dieguez
d36390778b Update Galician translation 2022-01-26 18:47:41 +00:00
Simon McVittie
2eb1eb1649 Merge branch 'glib-compile-resources-build-improvements' into 'main'
tests: Pass --internal and -z noexecstack to glib-compile-resources tests

See merge request GNOME/glib!2456
2022-01-26 18:13:05 +00:00
Andoni Morales Alastruey
d2ab2bcefd gio: add missing zlib dependency in gio-windows-2.0.pc 2022-01-26 18:13:05 +01:00
Hugo Carvalho
34458a7f2a Update Portuguese translation 2022-01-26 15:47:11 +00:00
Philip Withnall
0c8f7de55a gdebugcontroller: Add debug controller API and D-Bus implementation
This is intended to provide a uniform interface for controlling whether
the debug output from an application (or service) is emitted, typically
to journald, but actually to wherever the application chooses to output
it.

The main implementation of `GDebugController` is `GDebugControllerDBus`,
which is intended to be used on Linux. Other implementations may be
added in future for other platforms, or larger applications may want to
provide their own implementation which integrates with their ecosystem.

The `GDebugControllerDBus` implementation exposes a D-Bus interface at
`/org/gtk/Debugging` with a method to enable or disable debug
output at runtime.

This could be used by external harnesses, such as GNOME Builder or
systemd, to give a uniform way to get debug output from an application.

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

Fixes: #1190
2022-01-26 15:19:27 +00:00
Philip Withnall
bb4bec0921 gmessages: Expose a property for enabling debug message output
This is an API analogue of the G_MESSAGES_DEBUG environment variable. It
is intended to be exposed outside applications (for example, as a D-Bus
interface — see follow-up commits) so that there is a uniform interface
for controlling the debug output of an application.

Helps: #1190
2022-01-26 15:17:02 +00:00
Philip Withnall
70c116e602 Merge branch 'win32-afunix' into 'main'
gio: Add some AF_UNIX support on Windows

Closes #2487

See merge request GNOME/glib!2445
2022-01-26 15:11:48 +00:00
Xavier Claessens
9159e84ce5 Windows: Do not link DLL specific resources when doing a static build
Fixes: #2585
2022-01-26 09:49:30 -05:00
Philip Withnall
9cde484b9f tests: Mark compiled resource file as not having an executable stack
As with the previous commit, this isn’t needed for GLib’s tests to work
correctly, but is probably needed in other projects which might be
tempted to copy and paste the Meson tooling from GLib.

Inspired by https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/4330

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-01-26 14:28:46 +00:00
Hugo Carvalho
51e6e4fc2f Update Portuguese translation 2022-01-26 14:28:38 +00:00
Philip Withnall
55fa866cc8 tests: Pass --internal to glib-compile-resources tests
This isn’t needed to make the tests any better (it doesn’t really affect
them), but is probably needed for anyone who copies this Meson code in
order to add `glib-compile-resources` support to their project. It’s
pretty unlikely that someone would want to compile *and export* a
resource from a shared library.

Inspired by https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/4334

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-01-26 14:27:38 +00:00
Marc-André Lureau
9a9e2b5d7d gio: enable unix: address on win32
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-01-26 18:19:44 +04:00
Marc-André Lureau
e796124b31 gio: tests AF_UNIX socket credentials on win32
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-01-26 18:19:44 +04:00
Marc-André Lureau
95c3e28af5 gio: add G_CREDENTIALS_TYPE_WIN32_PID
Credentials are often used to check peer processes details.

With AF_UNIX sockets on Windows, SIO_AF_UNIX_GETPEERPID can
be used to retrive the peer PID.

We will probably introduce more advanced mechanisms later on, though,
but I am not a Windows API expert.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-01-26 18:19:44 +04:00
Marc-André Lureau
568f00d65f gio/tests: enable most AF_UNIX tests on all platforms
The main difference is that g_socket_new_from_fd() requires bound
sockets on Win32.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-01-26 18:19:44 +04:00