Commit Graph

16932 Commits

Author SHA1 Message Date
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
Matthias Clasen
b56a95026c Add some more cases to the app-id unit tests
These came up on irc today.
2017-03-05 13:11:52 -05:00
Mario Blättermann
4a163a3301 Update German translation 2017-03-05 17:57:32 +00:00
Philip Withnall
424ec6022f gtestutils: Fix a typo in a documentation comment
Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>
2017-03-05 12:24:37 +00:00
Simon McVittie
8686e43058 glib-mkenums: Sort input files for more deterministic output
This should be helpful for reproducible builds
<https://reproducible-builds.org/>.

Perl's sorting is not locale-sensitive unless the lexical scope has
'use locale', which this one does not, so we do not need to force
locale-agnostic sorting.

Signed-off-by: Simon McVittie <smcv@debian.org>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=769983
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=809152
2017-03-04 22:05:44 +00:00
Paolo Borelli
935cd72bdd utf8: add unit test for g_utf8_make_valid 2017-03-04 19:59:37 +01:00
Aurimas Černius
c3ac56def7 Updated Lithuanian translation 2017-03-04 17:55:40 +02:00
Simon McVittie
e3f59e482b Install gdb Python helpers as data, not as executable scripts
They do not start with the #!/usr/bin/python that would be necessary
to make them run with Python rather than a shell, and they would
not be useful to run anyway: they are libraries to be imported,
not scripts to be run.

Signed-off-by: Simon McVittie <smcv@debian.org>
2017-03-03 20:08:42 +00:00
Changwoo Ryu
e89513e829 Update Korean translation 2017-03-03 15:42:43 +00:00
Ask Hjorth Larsen
72fad44a64 Updated Danish translation 2017-03-02 13:11:23 +01:00
Paolo Borelli
f559bc01dc Make g_utf8_make_valid optionally take a length
g_utf8_make_valid was turned into a public API this cycle. However
now that it is public we should make the API more generic, allowing
the caller to specify the length. This is especially useful if
the function is called with a string that has \0 in the middle
or for chunks of a strings that are not nul terminated.
This is also consistent with most of the other utf8 utils.

Callers inside glib are updated to the new signature.

https://bugzilla.gnome.org/show_bug.cgi?id=779456
2017-03-02 10:46:51 +01:00
Chun-wei Fan
9aaf7588fc glib/gmessages.c: Fix build when targeting Windows Vista+
In my previous attempt to improve colored console output on Windows, we
called GetFileInformationByHandleEx() directly if we target Vista or
later, but the check macro for doing so via LoadLibrary() had a typo.  Fix
this by correcting the check macro.

Pointed out by Ignacio Casal Quinteiro.
2017-03-02 08:22:49 +08:00
Matthias Clasen
376e12e5a4 2.51.4 2017-03-01 15:14:14 -05:00