Commit Graph

18022 Commits

Author SHA1 Message Date
Balázs Úr
c78bf538e6 Update Hungarian translation 2018-03-15 14:32:46 +00:00
Philip Withnall
d1077304ec gsocketlistener: Document the need to call g_socket_listener_close()
GSocketListener can keep internal references to itself for pending
accept() calls, which mean that it can stay alive (and keep listening
on ports) even after a user drops their last reference to it. They need
to call g_socket_listener_close() explicitly to avoid that.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=794207
2018-03-14 17:21:28 +00:00
Philip Withnall
dd815c3d2b gsocketlistener: Fix a typo in the documentation
Mismatched singular/plural.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=794207
2018-03-14 17:21:27 +00:00
Emmanuele Bassi
b4117b8d88 Conditionally warn if pre-processing tools are not found
There's no need to unconditionally print an error message if xmllint or
json-glib-format are not found when running glib-compile-resources is
called; we only need to warn if they are not available when we need
them. To avoid spamming the build logs, we can also warn once.

https://bugzilla.gnome.org/show_bug.cgi?id=794285
2018-03-14 14:21:41 +00:00
Emmanuele Bassi
c5c3fa83c9 docs: Use appropriate tags for commands
The glib-compile-resources documentation refers to various command line
tools, and those should be wrapped in the <command> DocBook tag.

https://bugzilla.gnome.org/show_bug.cgi?id=794284
2018-03-14 14:09:24 +00:00
Emmanuele Bassi
72402877cc Use g_file_open_tmp() instead of hand-rolling it
The glib-compile-resources tool has hand-rolled "open a temporary file"
code paths. Since error handling is hard, let's rely on GLib API that is
meant to do that consistently for us.

Get rid of some tabs mixed with spaces while we're at it.

https://bugzilla.gnome.org/show_bug.cgi?id=794284
2018-03-14 11:48:13 +00:00
Emmanuele Bassi
7fd17c4337 Support whitespace stripping for JSON resources
Similarly to how glib-compile-resources can call xmllint to eliminate
whitespace in XML files to reduce their size inside a GResource, we can
use json-glib-format to achieve the same result.

The mechanism for using json-glib-format is the same, with a separate
environment variable if we want to direct glib-compile-resources to a
version of json-glib-format that is not the one in the PATH.

https://bugzilla.gnome.org/show_bug.cgi?id=794284
2018-03-14 11:46:17 +00:00
Philip Withnall
c672fcc0a8 gunixmounts: Allow root to display mounts under /run/media/$username
Normally, the list of mounts is filtered to exclude mounts in
/run/media/$username where $username is not the current user. However,
root can access all the mounts under /run/media/, regardless of the
username — so there’s no point in filtering out those mounts.

In some cases, filtering them out is harmful. In the case of a system
service which uses GVolumeMonitor, for example, filtering them out means
the service cannot see automounted USB sticks belonging to user
sessions.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=793994
2018-03-13 12:55:16 +00:00
Philip Withnall
7c1f38b1c9 gapplication: Tighten up application ID validation
Tighten up the validation of application IDs so they are always exactly
D-Bus well-known names. This is a slight change to the accepted format,
but since anyone using the API with an application ID which was
previously valid, but which was not a valid D-Bus well-known name, would
have received an error from D-Bus when their application tried to
register on the bus, I think this break is acceptable.

It will affect any applications which have application IDs which are not
valid D-Bus well-known names, and which use the G_APPLICATION_NON_UNIQUE
flag. From a quick search in Debian Codesearch, no C applications use
that flag.

Update the documentation to use the rules from the D-Bus specification,
including the latest advice discouraging use of hyphens:

https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus

Update the tests:
 • Add the examples from the documentation to validate them.
 • Especially the venerable 7-zip.org example.
 • Move a couple of tests from expected-failure to expected-success:
   they are valid D-Bus well-known names even if they’re a bit weird.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=793400
2018-03-13 12:45:13 +00:00
Philip Withnall
b046c5b772 tests: Use modern test assertions in GApplication test
This will make the assertion failure messages a little more useful, and
prevent the assertions being compiled out with G_DISABLE_ASSERT.
Introduces no functional changes.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=793400
2018-03-13 12:45:13 +00:00
Martin Pieuchot
aa39a0557c kqueue: Multiple fixes and simplifications
- Stop using a custom thread for listening to kqueue(2) events.  Instead
   call kevent(2) in non blocking mode in a monitor callback.  Under the
   hood poll(2) is used to figure out if new events are available.

 - Do not use a socketpair with a custom protocol requiring 2 supplementary
   context switches per event to commicate between multiple threads.  Calling
   kevent(2), in non blocking mode, to add/remove events is fine from any
   context.

 - Add kqueue(2) events without the EV_ONESHOT flag.  This removes a race
   where some notifications were lost because events had to be re-added for
   every new notification.

 - Get rid of the global hash table and its associated lock and races.  Use
   the 'cookie' argument of kevent(2) to pass the associated descriptor when
   registering an event.

 - Fix _kh_file_appeared_cb() by properly passing a monitor instead of a
   source to g_file_monitor_emit_event().

 - Properly refcount sources.

 - Remove a lot of abstraction making it harder to fix the remaining issues.

https://bugzilla.gnome.org/show_bug.cgi?id=739424
2018-03-13 12:23:10 +00:00
Philip Withnall
46eedd12c0 tests: Add charset test to autotools and drop unnecessary undefs
Follow-ups from review in bug #751826.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=751826
2018-03-13 12:21:07 +00:00
Takao Fujiwara
e311a45653 gcharset: Add g_get_language_names_with_category
g_get_language_names() uses LC_MESSAGES and the fallback is useful
for other locale categories too.

https://bugzilla.gnome.org/show_bug.cgi?id=751826
2018-03-13 12:17:31 +00:00
Philip Withnall
15201345de build: Bump version to 2.57.0
Ready for the new unstable release series.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Reviewed-by: nobody
2018-03-13 12:17:31 +00:00
Philip Withnall
affe33b7e7 gversionmacros: Add version macros for GLib 2.58
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Reviewed-by: nobody
2018-03-13 12:17:31 +00:00
Руслан Ижбулатов
aab83f7475 gdbus: make hexencode() a shared function to avoid duplication
https://bugzilla.gnome.org/show_bug.cgi?id=794170
2018-03-13 12:09:01 +00:00
Руслан Ижбулатов
cc7ab04b33 gdbus: do not initialize gsize variables with -1
Use 0 instead, since gsize is unsigned.

https://bugzilla.gnome.org/show_bug.cgi?id=794170
2018-03-13 12:09:01 +00:00
Руслан Ижбулатов
249330c388 gdbus: pass string length to hexencode()
This is necessary for it to be able to encode strings
with embedded NUL characters.

https://bugzilla.gnome.org/show_bug.cgi?id=794170
2018-03-13 12:09:01 +00:00
Руслан Ижбулатов
f7c0ff773e gdbus: actually return string length from hexdecode()
https://bugzilla.gnome.org/show_bug.cgi?id=794170
2018-03-13 12:09:01 +00:00
Christoph Reiter
8e315bd8ae tests/date.c: include config.h to expose Vista+ macros
date.c uses SUBLANG_LITHUANIAN_LITHUANIA which is Vista+
Include config.h so that _WIN32_WINNT is defined and the newer macros
are exposed.

This fixes the build under MinGW.

https://bugzilla.gnome.org/show_bug.cgi?id=793729
2018-03-13 12:06:54 +00:00
Michael Olbrich
abe329343f gobject_gdb.py: 'address' is a property of gdb.Value not a function
'address' started out as a function, but it was changed to a property
before the gdb Python support was release with gdb 7.0.

https://bugzilla.gnome.org/show_bug.cgi?id=794194
2018-03-13 11:28:06 +00:00
Rafal Luzynski
987bf5bbeb gdatetime: Add missing #define WEEKDAY_FULL_IS_LOCALE
One more #define WEEKDAY_FULL_IS_LOCALE was missing from the commit
12f11090dc.

https://bugzilla.gnome.org/show_bug.cgi?id=793578
2018-03-13 10:52:08 +00:00
Rafal Luzynski
9cadb90b35 tests: Compare month names case-insensitively
This patch relaxes the comparison rules and allow the month names to be
in a mixed case.

Translators should be allowed to provide the month names in a different
case (lower/upper case, not grammatical case) from the content of glibc
because it is disputable at the moment whether the month names should
follow the language rules strictly and be titlecased only if it is
obligatory to titlecase them or they should be also titlecased in the
standalone case. Hopefully in future a conversion specifier will be
invented to control the upper/lower case individually.

https://bugzilla.gnome.org/show_bug.cgi?id=793645
2018-03-13 10:49:38 +00:00
Rafal Luzynski
7fe793e125 tests: Update month names
Update the abbreviated month names in the test to match the actual content
of the translated *.po files for Greek and Lithuanian.

https://bugzilla.gnome.org/show_bug.cgi?id=793645
2018-03-13 10:49:38 +00:00
Daniel Mustieles
423bf53b04 Updated Spanish translation 2018-03-13 09:18:18 +01:00
Matthias Clasen
f58d46e39f 2.56.0 2018-03-12 16:52:13 -04:00
Philip Withnall
c4f58e362e tests: Skip the gdatetime month names test when running uninstalled
It needs the translations to be installed. See the comment added to the
code.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=794180
2018-03-12 19:24:15 +00:00
Philip Withnall
36af567045 tests: Ensure gettext strings are loaded in UTF-8 in gdatetime.c
See the previous commit. By convention, GLib assumes strings loaded from
gettext are always in UTF-8, but we do need to tell gettext this. In
most other tests, it doesn’t matter; but in the gdatetime test, we test
re-encoding month names from EUC-JP, so we need to ensure the
translations start in UTF-8 correctly.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=793578
2018-03-12 19:22:13 +00:00
Philip Withnall
12f11090dc gdatetime: Fix locale handling for nl_langinfo() calls
With the various macros we use to provide fallbacks for missing
nl_langinfo() fields, the locale handling can become quite complex:
nl_langinfo() returns strings encoded in the current locale, but C_()
returns strings encoded in UTF-8 (by GLib convention — you do actually
need to call bind_textdomain_codeset() to achieve this).

There are various format specifiers, especially with the new %Ob, %OB,
%Oh specifiers, which conditionally call nl_langinfo() or something
based on C_(). This makes encoding handling difficult.

Add additional macros which indicate whether the macros they’re paired
with return something encoded in the current locale, or encoded in
UTF-8. The user of the macro can then use these to work out whether to
re-encode.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=793578
2018-03-12 19:22:13 +00:00
Mart Raudsepp
f59c379c7a Update Estonian translation 2018-03-12 16:25:24 +00:00
Justin van Steijn
7c1e2b7cef Update Dutch translation 2018-03-10 15:46:55 +00:00
Emin Tufan Çetin
5d93dd63e8 Update Turkish translation 2018-03-08 12:42:22 +00:00
Aurimas Černius
76f770ad98 More corrections in Lithuanian date formats 2018-03-05 22:57:16 +02:00
Aurimas Černius
8b89331d5a Updated Lithuanian translation 2018-03-05 22:48:26 +02:00
Dr. Michael Lauer
cc50c19544 configure.ac: link to AppKit on macOS.
This is actually only necessary for gio, not for the other libraries.

https://bugzilla.gnome.org/show_bug.cgi?id=793565
2018-03-05 16:48:07 +00:00
Piotr Drąg
b03c37cf3b Sync abbreviated month names in Greek translation with CLDR
https://bugzilla.gnome.org/show_bug.cgi?id=793645
2018-03-05 17:13:51 +01:00
Piotr Drąg
0040ba008b Add month names with day to Chinese (Taiwan) translation
https://bugzilla.gnome.org/show_bug.cgi?id=793645
2018-03-04 16:19:53 +01:00
Piotr Drąg
20d8cb3374 Add month names with day to Chinese (Hong Kong) translation
https://bugzilla.gnome.org/show_bug.cgi?id=793645
2018-03-04 16:19:53 +01:00
Piotr Drąg
a998018b5f Add month names with day to Chinese (Simplified) translation
https://bugzilla.gnome.org/show_bug.cgi?id=793645
2018-03-04 16:19:53 +01:00
Piotr Drąg
58e00dd89e Add month names with day to Vietnamese translation
https://bugzilla.gnome.org/show_bug.cgi?id=793645
2018-03-04 16:19:53 +01:00
Piotr Drąg
24f2398c60 Add month names with day to Ukrainian translation
Ukrainian uses genitive for month names with day.

https://bugzilla.gnome.org/show_bug.cgi?id=793645
2018-03-04 16:19:53 +01:00
Piotr Drąg
e663b246c9 Add month names with day to Uyghur translation
https://bugzilla.gnome.org/show_bug.cgi?id=793645
2018-03-04 16:19:53 +01:00
Piotr Drąg
05b7d38a57 Add month names with day to Turkish translation
https://bugzilla.gnome.org/show_bug.cgi?id=793645
2018-03-04 16:19:53 +01:00
Piotr Drąg
ca7c43e54d Add month names with day to Thai translation
https://bugzilla.gnome.org/show_bug.cgi?id=793645
2018-03-04 16:19:53 +01:00
Piotr Drąg
b9c332888a Add month names with day to Tajik translation
https://bugzilla.gnome.org/show_bug.cgi?id=793645
2018-03-04 16:19:53 +01:00
Piotr Drąg
44a96b6462 Add month names with day to Telugu translation
https://bugzilla.gnome.org/show_bug.cgi?id=793645
2018-03-04 16:19:53 +01:00
Piotr Drąg
c5123298b3 Add month names with day to Tamil translation
https://bugzilla.gnome.org/show_bug.cgi?id=793645
2018-03-04 16:19:53 +01:00
Piotr Drąg
360bf29202 Add month names with day to Slovenian translation
https://bugzilla.gnome.org/show_bug.cgi?id=793645
2018-03-04 16:19:53 +01:00
Piotr Drąg
1144cfcd75 Add month names with day to Slovak translation
Slovak uses genitive for month names with day.

https://bugzilla.gnome.org/show_bug.cgi?id=793645
2018-03-04 16:19:53 +01:00
Piotr Drąg
5f865be08b Add month names with day to Russian translation
Russian uses genitive for month names with day.

https://bugzilla.gnome.org/show_bug.cgi?id=793645
2018-03-04 16:19:53 +01:00