Commit Graph

16944 Commits

Author SHA1 Message Date
Florian Müllner
05f0d8199b appinfo: Only use portal as fallback
We currently assume that the OpenURI portal should be used
unconditionally when running inside a flatpak sandbox. While
the portal is what we usually want, there are exceptions:
Yelp is now included in the GNOME runtime to allow displaying
help without exporting the user documentation, and the sandboxed
app itself may register a scheme handler.
To account for those cases transparently, always try the normal
code path first and only fall back to calling the portal when
that fails.

https://bugzilla.gnome.org/show_bug.cgi?id=780471
2017-03-25 22:43:58 +01:00
Piotr Drąg
c675a4ef82 Update Polish translation 2017-03-25 19:38:40 +01:00
Philip Withnall
21b6b1fba7 gmessages: Don’t check G_MESSAGES_DEBUG in old logging API
Now that the old logging API forwards through to the new structured
logging API, we don’t need to check the level or domain of a message
against INFO_LEVELS or G_MESSAGES_DEBUG — just pass it straight through
to the new structured logging API writer function.

https://bugzilla.gnome.org/show_bug.cgi?id=775879
2017-03-24 15:08:16 +00:00
Philip Withnall
8e8deb1336 build: Bump version to 2.53.0
Ready for the new unstable release series.
2017-03-24 11:01:24 +00:00
Marc-André Lureau
73c5e927d5 gio-querymodules: fix memory leak
Spotted thanks to ASAN.

https://bugzilla.gnome.org/show_bug.cgi?id=778207

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2017-03-24 12:50:30 +04:00
Philip Withnall
aebcb15a9b gversionmacros: Add version macros for GLib 2.54
Let the new API season commence.
2017-03-23 16:21:28 +00:00
Philip Withnall
b3362bb834 ghash: Document order of parameters in GEqualFunc usage
See https://bugzilla.gnome.org/show_bug.cgi?id=698064#c15.
2017-03-23 15:55:31 +00:00
Philip Withnall
fb5a07ad39 ghash: Fix gtk-doc syntax in a documentation comment 2017-03-23 15:55:05 +00:00
Philip Withnall
35c0dd2755 gbase64: Fix base-64 stepped encoding with small chunks
If encoding with small chunks such that the call to
g_base64_encode_close() has to deal with 0 < x < 24 bits of remaining
state, the encoding code would not correctly use zeroes to pad out the
state — it would use left-over state from an earlier iteration in the
encoding process.

This resulted in invalid base-64 encodings.

Add a unit test for incremental encoding using different sized chunks
too.

Thanks to Rainier Perske for reporting and analysing the bug.

https://bugzilla.gnome.org/show_bug.cgi?id=780066

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-03-23 15:34:11 +00:00
Philip Withnall
32aae79db5 gmain: Document that set_ready_time() is safe on destroyed GSources
Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=778049
2017-03-23 15:07:49 +00:00
Philip Withnall
c408256b52 gmain: Document threading properties of g_source_is_destroyed()
https://bugzilla.gnome.org/show_bug.cgi?id=778049
2017-03-23 15:03:13 +00:00
Philip Withnall
4091b2d19e gio: Drop redundant g_source_is_destroyed() calls
These calls cause race warnings from tsan, but are not a thread safety
problem, because we can only ever observe single bit changes: all
modifications to the GSource.flags field are done with a lock held; all
reads are of independent fields, so no intermediate state can ever be
observed. This assumes that a non-atomic read will consistently give us
an old value or a new value.

In any case, these g_source_is_destroyed() calls can happen from any
thread, and the state could be changed from another thread immediately
after the call returns; so the checks are pointless. In addition,
calling g_source_set_ready_time() or g_source_destroy() on a destroyed
source is not a problem.

https://bugzilla.gnome.org/show_bug.cgi?id=778049
2017-03-23 15:00:19 +00:00
Philip Withnall
553329358c gmodule: Add the visibility attribute to G_MODULE_EXPORT on gcc
For versions of GCC which support it (≥ 4), define G_MODULE_EXPORT as
__attribute__((visibility("default"))). This is normally a no-op, unless
compiling with -fvisibility=hidden, in which case it marks a symbol to
be publicly exported from the library, which is what G_MODULE_EXPORT is
for. Previously G_MODULE_EXPORT has only worked on Windows.

The compatibility check for whether the compiler supports
__attribute__((visibility)) is based on the __GNUC__ define, and is
similar to the check done in configure.ac for defining G_GNUC_INTERNAL.

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

https://bugzilla.gnome.org/show_bug.cgi?id=778287
2017-03-23 14:58:46 +00:00
Mario Sanchez Prada
92cb02392c appinfo: Don't hardcode strings for the OpenURI portal's D-Bus method
We added several #define in the previous commit, so use those instead.
2017-03-23 14:46:02 +00:00
Mario Sanchez Prada
b374cc2e23 appinfo: Launch the OpenURI portal using a synchronous D-Bus call
Calling the D-Bus method for the OpenURI portal "protects" the logic from
not ever having the remote method running in case the xdg-desktop-portal
process is not yet running and the caller quits quickly after the call.

This should not be a problem as the method returns immediately (regardless
of the user making a selection), but making it synchronous would prevent
situations where the OpenURI method would never be called because of D-Bus
dropping the message after the caller dies, without explicitly waiting for
a reply.

https://bugzilla.gnome.org/show_bug.cgi?id=780441
2017-03-23 11:28:22 +00:00
Mario Sanchez Prada
26e0b3dde4 appinfo: Don't leak the session bus in launch_default_with_portal_async
The session bus object needs to be unreferenced before early returning.
2017-03-23 11:03:34 +00:00
Jordi Mas
21f1425e8c Update Catalan translation 2017-03-22 07:38:01 +01:00
Daniel Macks
929e1b1fde Do not build utf8_encode on CARBON platform
utf8_encode is not used by g_utf8_collate_key on this platform.

https://bugzilla.gnome.org/show_bug.cgi?id=780306
2017-03-21 08:43:43 +00:00
Philip Withnall
69b4c72fe5 gutf8: Clarify documentation for g_utf8_get_char_validated()
There is no such thing as ‘no maximum’ when reading a string. It’s got
to end somewhere.

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

https://bugzilla.gnome.org/show_bug.cgi?id=780095
2017-03-20 11:07:48 +00:00
Philip Withnall
1c56a87c08 gutf8: Clarify return values from g_utf8_get_char_extended()
It’s hard to remember what the difference is between -1 and -2, so give
them names.

This introduces no functional changes.

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

https://bugzilla.gnome.org/show_bug.cgi?id=780095
2017-03-20 11:07:48 +00:00
Andika Triwidada
30e382bace Update Indonesian translation 2017-03-19 08:07:48 +00:00
Matthias Clasen
bce36c2d46 2.52.0 2017-03-18 20:40:40 -04:00
Philip Withnall
e6e38f4b8a gbase64: Document that g_base64_encode_close() does not nul-terminate
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-03-17 11:33:13 +00:00
Colin Walters
dd914da1c8 gio/fam: Remove leftover debug print
This leftover debug print was introduced by d682df186e
and is obviously bad for applications that are expecting something
else on stdout, etc.

See: https://bugzilla.redhat.com/show_bug.cgi?id=1396386

https://bugzilla.gnome.org/show_bug.cgi?id=780144
2017-03-16 10:36:17 -04:00
Philip Withnall
2411b76c5e docs: Fix some DocBook usage in a few gtk-doc comments
<emphasis> and <ulink> tags. Replace them with Markdown.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-03-16 13:50:19 +00:00
Claude Paroz
3a1e98cca8 Updated French translation 2017-03-16 10:04:35 +01:00
Rūdolfs Mazurs
5ebfb179b9 Update Latvian translation 2017-03-15 21:24:01 +02:00
Iain Lane
ec02a1875f tests/gdatetime: Use a real rather than invented timezone
The tzdata maintainers had previously invented abbreviations for
timezones. As of their 2017a release, the one we were testing ("BRT")
has been dropped.

Switch to testing PST, which is a real timezone abbreviation.

https://bugzilla.gnome.org/show_bug.cgi?id=779799
2017-03-15 11:06:55 +00:00
Fabio Tomat
567f01044f Update Friulian translation 2017-03-15 04:47:21 +00:00
Piotr Drąg
e9fe8868a7 Use single non-Unicode quotation marks in a new translatable message
Actually, Unicode changes to this file got reverted in
2d56c49b10. Also, there is
"No such interface '%s'" string already, so we avoid
breaking the string freeze.
2017-03-14 14:51:49 +01:00
Piotr Drąg
bb93f3a4aa Use consistent quotation marks in a new translatable message
Double quotation marks are used everywhere else in glib, as per
<https://developer.gnome.org/hig/stable/typography.html>.
2017-03-14 14:45:48 +01:00
Philip Withnall
e1f362ba49 gsubprocess: Add missing G_GNUC_NULL_TERMINATED attribute
g_subprocess_launcher_spawn() is NULL-terminated, and must have a
non-NULL argv0 specified, so G_GNUC_NULL_TERMINATED is appropriate here.

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

https://bugzilla.gnome.org/show_bug.cgi?id=780032
2017-03-14 12:57:32 +00:00
Philip Withnall
ff327ba2d7 gdbusmessage: Add missing G_GNUC_PRINTF attribute
This highlighted a bug in GDBusConnection, where an interface name was
not included in a message referring to it.

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

https://bugzilla.gnome.org/show_bug.cgi?id=780032
2017-03-14 12:57:32 +00:00
Chun-wei Fan
e013164c5c Visual Studio builds: Fix gio project generation
We need to include gcontenttype-win32.c in our Visual Studio projects...
2017-03-14 14:48:23 +08:00
Matthias Clasen
37f5feb1d2 Fix distcheck
Typo in the win32 source list...
2017-03-13 12:30:56 -04:00
Matthias Clasen
7a36df7b01 2.51.5 2017-03-13 11:23:00 -04:00
TingPing
90dfea2b61 Implement GAppInfo on OSX
This is an implementation of most of GAppInfo using the OS X
NSBundle APIs.

Missing at this point are things that don't have equivalents
in OS X, such as hidden desktop files, last-used, manual type
associations, and g_app_info_get_all().

https://bugzilla.gnome.org/show_bug.cgi?id=734946
2017-03-13 10:33:23 -04:00
TingPing
3953d85a92 Implement GContentType on OSX
This is an implementation of most of GContentType using the OS X
UTType APIs.

Missing at this point is an implementation of
g_content_types_get_registered() and g_content_type_guess_for_tree().

https://bugzilla.gnome.org/show_bug.cgi?id=734946
2017-03-13 10:32:02 -04:00
Chun-wei Fan
1f931dbb22 win32/pc_base.py: Update path for GLib master
So that people can load this from the right places in GLib master's
source tree.
2017-03-13 15:36:11 +08:00
Matthias Clasen
626e9e6b6e Add g_content_type_is_mime_type to the docs 2017-03-09 20:35:04 -05:00
Steven McDonald
e305fe971e gio: Always purge kqueue subs from missing list
Previously, _kh_cancel_sub assumed that it only needed to call
_km_remove if sub did not exist in subs_hash_table. This is erroneous
because the complementary operation, _km_add_missing, can be called
from process_kqueue_notifications, in which context sub can *only* have
come from subs_hash_table.

Since _km_remove is implemented using g_slist_remove, which is
documented to be a noop if the list does not contain the element to be
removed, it is safe to call _km_remove unconditionally here.

https://bugzilla.gnome.org/show_bug.cgi?id=778515
2017-03-09 17:38:55 +00:00
Emmanuele Bassi
c68903945d Regenerate the vasnprintf gnulib module imported files
Use gnulibg-tool --lgpl to import the vasnprintf module using the
correct GNU Lesser General Public License, version 2.1 or later, like
the rest of GLib.

https://bugzilla.gnome.org/show_bug.cgi?id=777203
2017-03-09 17:18:55 +00:00
Chun-wei Fan
79ea068975 win32/replace.py: Update documentation comment
Update the location from GLib's source tree on where this file can be
found.
2017-03-09 16:19:54 +08:00
TingPing
fe1a749ca6 Create g_content_type_is_mime_type()
Convenience wrapper around g_content_type_is_a().

https://bugzilla.gnome.org/show_bug.cgi?id=734946
2017-03-08 23:02:10 -05:00
Carlos Sánchez de La Lama
525b33c05f Correct collation key generation on OS X
This ixes bug #673047.
2017-03-08 22:37:29 -05:00
Matthias Clasen
a28429a3c6 Fix a typo 2017-03-08 22:36:05 -05:00
Matthias Clasen
04ad811e50 Add a forgotten g_type_ensure call
One of the types in this function was not wrapped in a
g_type_ensure_call, an obvious oversight.
2017-03-08 22:27:06 -05:00
John Ralls
d1a03bc728 Enable building gcocoanotification only if OS X min version >= 10.9
This changes the configure checks to check for what is actually
required to build this code.

https://bugzilla.gnome.org/show_bug.cgi?id=747146
2017-03-08 22:26:00 -05:00
Fabio Tomat
0c6c39428c Add Friulian translation 2017-03-07 22:27:35 +00:00
Gábor Kelemen
4d8ad0adb7 Update Hungarian translation 2017-03-05 21:23:33 +00:00