Commit Graph

17698 Commits

Author SHA1 Message Date
Philip Withnall
e34884e364 gsettingsschema: Add a missing (nullable) annotation
Spotted as part of https://bugzilla.gnome.org/show_bug.cgi?id=725014.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-10-11 13:09:53 +01:00
Philip Withnall
5876cdff25 gsettingsschema: Fix some incorrect whitespace
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-10-11 13:09:40 +01:00
Philip Withnall
ee1d38ce64 docs: Fix an incorrect function name in GSettings documentation
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-10-11 13:09:15 +01:00
Evan Nemerson
ca4fe5942a gio: mark the GAsyncResult source_object as nullable
https://bugzilla.gnome.org/show_bug.cgi?id=740223
2017-10-11 13:00:43 +01:00
Руслан Ижбулатов
4a77eb16ce Replace all instances of ssize_t with gssize
ssize_t is supported widely, but not universally, so use gssize instead.
Currently only one piece of code actually *needs* this change to be compilable
with MSVC, the rest are mostly in *nix parts of the code, but these are changed
too, for symmetry.

https://bugzilla.gnome.org/show_bug.cgi?id=788180
2017-10-11 12:56:11 +01:00
Руслан Ижбулатов
6abdc06da6 W32: Bump target NT version to 0x601 (7 or newer)
Also remove now-unnecessary if_nametoindex() implementation
(the HAVE_IF_NAMETOINDEX configure check didn't work correctly, it turned out),
which prevents glib from building. if_nametoindex() is available in lphlpapi since
Vista[1], so we don't need a compatibility function for it anymore, as Windows 7
is the new minimally-required version.

[1] https://msdn.microsoft.com/en-us/library/windows/desktop/bb408409(v=vs.85).aspx

https://bugzilla.gnome.org/show_bug.cgi?id=788180
2017-10-11 12:29:55 +01:00
Nirbheek Chauhan
b444ae0de2 meson: Improve gdbus-codegen custom target dependencies
Ensure that the custom targets that use gdbus-codegen get rebuilt when
any of the gdbus-codegen files are changed.

https://bugzilla.gnome.org/show_bug.cgi?id=752239
2017-10-11 16:55:39 +05:30
Emmanuele Bassi
17e29bebd9 Document how to integrate GTest into your project
We are missing the documentation on how to use GTest inside a project.

While we mention in passing gtester and gtester-report, the reality is
that we don't tell anybody how to use them inside their own build
system. Additionally, gtester and gtester-report are deprecated and kind
of abandoned, in favour of tools native to common build systems, such as
the TAP harness in Autotools, and the test harness in Meson.

See also:

  https://stackoverflow.com/questions/19958861/how-to-properly-set-up-glib-testing-framework-with-autotools

https://bugzilla.gnome.org/show_bug.cgi?id=788561
2017-10-11 12:19:06 +01:00
Philip Withnall
faf9440908 gdbus-tool: Add tab completion support to gdbus emit
Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=788594
2017-10-11 12:18:14 +01:00
Philip Withnall
51e91e35c1 gdbus-tool: Fix some invalid indentation
Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=788594
2017-10-11 12:18:14 +01:00
Philip Withnall
b3acf58779 gdbus-tool: Fix tab-completion for non-message-bus connections
• `gdbus monitor` can’t work at all for non-message-bus connections,
   since it can’t subscribe to signals.
 • Other tab completions for names depend on the connection being a
   message bus connection, but we still need to print `--dest` (etc.)
   when tab completing them, even if we can’t print a list of
   available names.

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

https://bugzilla.gnome.org/show_bug.cgi?id=788594
2017-10-11 12:18:14 +01:00
Andrew Potter
5564ddef12 gdate: add g_date_copy()
This will allow passing invalid GDates through GValues.

https://bugzilla.gnome.org/show_bug.cgi?id=760109
2017-10-11 12:13:20 +01:00
Philip Withnall
652a47d1d1 docs: Fix a typo in the GSlice documentation
And in a few of its variable names. s/adress/address/.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-10-11 11:48:08 +01:00
Philip Withnall
181b58c46d build: Fix build with srcdir ≠ builddir
Broken by commit a71f51dece. My fault for
not reviewing thoroughly enough.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-10-11 10:52:44 +01:00
Jason Conti
bf7fcd2559 gtester-report: Ignore package, version and revision info if missing
https://bugzilla.gnome.org/show_bug.cgi?id=668035
2017-10-11 10:42:20 +01:00
Cor-Paul Bezemer
a71f51dece build: Add gdbus-codegen files as dependencies in generated code rule
So gdbus-daemon-generated.[ch] get regenerated appropriately if any of
them change.

https://bugzilla.gnome.org/show_bug.cgi?id=752239
2017-10-11 10:33:45 +01:00
Maks Naumov
12e32e96a3 Don't skip invalid enum values in schemas
Signed-off-by: Maks Naumov <maksqwe1@ukr.net>

https://bugzilla.gnome.org/show_bug.cgi?id=742997
2017-10-11 10:22:23 +01:00
Jan Alexander Steffens (heftig)
30b25a6fd9 meson: Fix permissions of installed scripts
configure_file preserves the attributes, so the templates need to be
executable for the (installed) outputs to be executable.

https://bugzilla.gnome.org/show_bug.cgi?id=787671
2017-10-11 09:49:26 +01:00
Nirbheek Chauhan
b9f2ea4235 gdbus-codegen: Don't assume bindir and datadir share prefix
This assumption breaks when, for instance:

* Called as /bin/gdbus-codegen
* Installed on Windows in a directory that is not `bin/`

For such cases, we cannot make any assumptions about the directory
structure, and must hard-code the datadir.

https://bugzilla.gnome.org/show_bug.cgi?id=786785
2017-10-11 09:48:38 +01:00
Nirbheek Chauhan
62dedcb099 gmacros: Fix deprecations support with ICC
ICC defines __GNUC__ (to emulate GCC), but has its own method of
disabling deprecations.

https://bugzilla.gnome.org/show_bug.cgi?id=776562
2017-10-11 09:47:02 +01:00
grindhold
5b64522fcb socket: fix typo in get_remote_address docs
fixed the following typo:
"remove address" → "remote address"

https://bugzilla.gnome.org/show_bug.cgi?id=788766
2017-10-10 11:31:49 +01:00
Emmanuele Bassi
dc39232ded Do not build journal integration on older Linux platforms
We need to add more checks for journal_sendv(), as we depend on the
presence of mkostemp() and O_CLOEXEC, which may not be available on
older Linux platforms, like RHEL 5.

https://bugzilla.gnome.org/show_bug.cgi?id=788705
2017-10-09 12:45:59 +01:00
Emmanuele Bassi
f40154e218 build: Look for mkostemp when configuring
We use this function, but it may be missing on older Linux platforms.

https://bugzilla.gnome.org/show_bug.cgi?id=788705
2017-10-09 12:45:59 +01:00
Emmanuele Bassi
7b15f12f0e Remove PERL_PATH from Autotools build
We don't use Perl for glib-mkenums any more.
2017-10-09 12:45:18 +01:00
Chun-wei Fan
2c6c03290f gio: Fix gio-tool-open.c on Windows/Cocoa
Commit 7384e37 broke builds on these platforms as *NIX-only APIs are
being used unconditionally.  Fix the build by building these portions
when not on Windows or Cocoa.

https://bugzilla.gnome.org/show_bug.cgi?id=780296
2017-10-09 09:10:48 +08:00
Justin Kim
7e70dd88c9 gmodule: Use RTLD_DEFAULT if defined __BIONIC__
This is a partial change of the previous work[0].
On 64 bit Android since android-23, 'handle = dlopen(NULL); dlsym(handle)'
doesn't work. Instead, only 'dlsym(RTLD_DEFAULT)' returns a valid pointer.

However, RTLD_DEFAULT is defined as '(void *) 0x0' on 64bit Android which
is usually used for invalid value so this patch allows the specific case.

[0] 0d81bb4e31

https://bugzilla.gnome.org/show_bug.cgi?id=788270
2017-10-06 21:09:47 +03:00
Philip Withnall
860dc949ca tests: Add some assertions on some otherwise-unused variables
Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=751738
2017-10-06 12:57:06 +01:00
SilentFlame
bd2fa54637 glib: Correct typos of ‘character’
https://bugzilla.gnome.org/show_bug.cgi?id=774083
2017-10-06 12:49:12 +01:00
Christian Persch
2bdec0c2f2 gbytes: Fix check in try_steal_and_unref
Need to check if the user data is equal to the data, before
taking the data out of the GBytes!

Bug #670139.
2017-10-06 12:41:35 +01:00
Andrew Borodin
7895706c82 Type accuracy for result of strlen() in string utilities
https://bugzilla.gnome.org/show_bug.cgi?id=630983
2017-10-06 12:32:10 +01:00
Philip Withnall
5040de9fc7 docs: Mention gsize, goffset, etc. are in C99
Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=569375
2017-10-06 12:14:59 +01:00
Philip Withnall
493723b4d9 gmessages: Update advice for G_LOG_DOMAIN
Suggest defining it for all code — for applications as well as for
libraries. This allows G_MESSAGES_DEBUG=my-app to be used to filter out
all messages from libraries which it uses, for example.

https://bugzilla.gnome.org/show_bug.cgi?id=777956
2017-10-06 11:26:47 +01:00
Philip Withnall
8330b09d78 Bug 679467 — Mention translation in g_warning() documentation
Include a line in the documentation for g_warning(), g_error(), g_critical()
and g_debug() mentioning that the messages passed to them typically should not
be translated.

Closes: https://bugzilla.gnome.org/show_bug.cgi?id=679467
2017-10-06 11:23:01 +01:00
Philip Withnall
0a10f7375f glocalfileinfo: Use g_strcmp0() for some comparisons which might be NULL
The return value from g_get_user_special_dir() might be NULL. Safest to
use g_strcmp0() uniformly everywhere.

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

https://bugzilla.gnome.org/show_bug.cgi?id=661442
2017-10-06 11:17:40 +01:00
Philip Withnall
9cbff9f768 gclosure: Fix (transfer) annotations on GClosure constructors
They return floating references. The convention established by GVariant
is to annotate these as (transfer none) so that the caller does a
ref+sink on them, rather than just a ref.

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

https://bugzilla.gnome.org/show_bug.cgi?id=677233
2017-10-06 11:17:33 +01:00
Philip Withnall
121b1e5215 docs: Fix incorrect macro name in GType tutorial
Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=770459
2017-10-05 15:40:14 +01:00
Colomban Wendling
b090a079f7 Fix documentation about stopping signal emission from inside a hook
Stopping signal emission from an emission hook is, and always has been,
actually forbidden.  Update the documentation not to lie to the reader.

https://bugzilla.gnome.org/show_bug.cgi?id=773355
2017-10-05 15:26:08 +01:00
Ondrej Holy
1508db2f66 gio: Add hack to close up dbus-daemon race
If gio open exits before the program it starts fully activates, then
the dbus-daemon may avoid doing the activating method call.

This commit works around the problem by pinging the activated application,
and waiting for a reply.

Same workaround is used in gtk-launch and was used in gvfs-open before
it was replaced by gio open.

https://bugzilla.gnome.org/show_bug.cgi?id=780296
2017-10-05 16:19:31 +02:00
Volker Sobek
c7dc81ce78 docs: Escape some backslashes for markdown
These no longer showed up correctly in the documentation.

https://bugzilla.gnome.org/show_bug.cgi?id=727346
2017-10-05 15:07:09 +01:00
Martin Blanchard
d3745d14e1 gprintf: Add a reminder concerning <glib/gprintf.h>
g_printf(), g_fprintf(), g_sprintf(), g_vprintf(), g_vfprintf(),
() and g_vasprintf() require gprintf.h to be explicitly included
in order to be used. This patch adds a reminder in each function's
documentation abstract.

https://bugzilla.gnome.org/show_bug.cgi?id=760716
2017-10-05 15:02:39 +01:00
Martin Blanchard
c443adeffb gprintf: Fix documentation regarding <glib/gprintf.h>
g_snprintf() and g_vsnprintf() declarations were moved and
don't require gprintf.h to be included anymore but g_vasprintf()
is and requires gprintf.h to be explicitly included.

https://bugzilla.gnome.org/show_bug.cgi?id=760716
2017-10-05 15:01:28 +01:00
Philip Withnall
85680f4a06 docs: Rewrap line to avoid it being interpreted as a list
Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=767215
2017-10-05 14:49:49 +01:00
Jiro Matsuzawa
acea147cbc gsettings: Suppress error messages of completion
https://bugzilla.gnome.org/show_bug.cgi?id=695681
2017-10-05 14:41:24 +01:00
Philip Withnall
55905db86a gfile: Fix typo in documentation for g_file_set_attribute()
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-10-05 13:46:41 +01:00
Aurélien Zanelli
21d2c64660 gfileutils: add some sanity checks
To avoid handling non-null GError or NULL filename.

https://bugzilla.gnome.org/show_bug.cgi?id=754026
2017-10-05 13:42:19 +01:00
Xavi Ivars
eb5120d0df
[l10n] Updated Catalan (Valencian) translation 2017-10-05 13:56:23 +02:00
Simon McVittie
733c7bd9c5 g_test_log: Consistently use GLib whitespace style
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=788467
Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
2017-10-03 17:22:48 +01:00
Simon McVittie
23ba8aec92 testutils: Report fatal errors and warnings as TAP
Lines starting with "Bail out!" are special TAP syntax: they mark
the entire test execution (one binary or script) as failed, and stop
processing. Automake's parallel test harness knows this, and will print
the diagnostic in the test results, leading to clearer output.

Without this change, having changed glib/tests/bytes.c to emit a
spurious g_warning():

ERROR: bytes - too few tests run (expected 15, got 0)
ERROR: bytes - exited with status 133 (terminated by signal 5?)

With this change, it's clearer what has happened:

ERROR: bytes - Bail out! FATAL-WARNING: I broke this as a demonstration

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=788467
Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
2017-10-03 15:16:15 +01:00
Philip Withnall
81d7af312e gmem: Make it more obvious that g_mem_set_vtable() does nothing
Clarify the big deprecation warning in the documentation.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-10-03 09:36:08 +01:00
Jeremy Bicha
2afcf6c393 trivial: tweak Spanish translation header 2017-10-02 22:06:18 -04:00