10646 Commits

Author SHA1 Message Date
Simon McVittie
d65b80fb54 GDBusWorker: if a read was cancelled it means we closed the connection
This was a regression caused by my previous work on GDBusWorker thread-safety
(Bug #651268). The symptom is that if you disconnect a GDBusConnection
locally, the default implementation of GDBusConnection::closed
terminates your process, even though it shouldn't do that for
locally-closed connections; this is because GDBusWorker didn't think a
cancelled read was a local close.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=662100
Bug-NB: NB#287088
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: David Zeuthen <davidz@redhat.com>
(cherry picked from commit 5e0492da509aad12b93b732c449dae1a016367c1)
2011-10-19 11:18:11 +01:00
Sjoerd Simons
5043ca30ea GDBusConnection: Fix race in /gdbus/connection/life-cycle
GDBusConnection sets the closed flag in the worker thread, then adds an
idle callback (which refs the Connection) to signal this in the main
thread. The tests session_bus_down doesn't spin the mainloop, so the
"closed" signal will always fire if iterating the mainloop later (and
drops the ref when doing so). But _is_closed can return TRUE even before
signalling this, in which case the "closed" signal isn't fired and the
ref isn't dropped, causing the test to fail.

Instead simply always wait for the closed signal, which is a good thing
to check anyway and ensures the ref is closed.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=661896
Reviewed-by: Matthias Clasen <mclasen@redhat.com>
2011-10-18 12:47:49 +01:00
Simon McVittie
6d57a45234 GDBusConnection: warn that direct access to the stream is a bad idea
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=661679
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: David Zeuthen <davidz@redhat.com>
2011-10-17 12:18:08 +01:00
OKANO Takayoshi
610dd25e87 Updated Japanese translation 2011-10-17 09:25:08 +09:00
Jiro Matsuzawa
36207429bf Updated Japanese translation 2011-10-17 01:54:33 +09:00
Matthias Clasen
7e3e9a01f7 Post-release version bump 2011-10-14 10:17:30 -04:00
Matthias Clasen
4a56a80724 Cosmetics 2.30.1 2011-10-14 09:48:13 -04:00
Matthias Clasen
b9c4e1d310 Bump version 2011-10-14 00:12:46 -04:00
Matthias Clasen
5065781e59 Updates 2011-10-14 00:10:27 -04:00
Dan Winship
7f66b04bfd Simplify checks for CLOCK_MONOTONIC
Remove the complicated configure-time and runtime checks, and just use
CLOCK_MONOTONIC if it's defined.

https://bugzilla.gnome.org/show_bug.cgi?id=661421
2011-10-14 00:03:10 -04:00
Matthias Clasen
00817371a6 USE __COUNTER__ instead of __LINE__ when available
I've seen builds fail with

nm-connection.c:119:691: error: declaration of '_GStaticAssertCompileTimeAssertion_119' shadows a previous local [-Werror=shadow]

because several compile-time assertions ended up on the same
line. __COUNTER__ is meant specifically for the purpose of
constructing identifiers, so use it when available.
2011-10-14 00:01:57 -04:00
Antoine Jacoutot
698b2e9e51 Fix DATADIRNAME on OpenBSD.
On OpenBSD translation files are always installed under PREFIX/share/locale,
there is no such thing as PREFIX/lib/locale; according to that, set
DATADIRNAME to "share".
2011-10-13 23:59:59 -04:00
Ryan Lortie
b20f3d8280 GSettings schemas: allow for zero items in schema
GVDB deals with empty lists by returning NULL for the list instead of a
zero-length (non-NULL) strv.  We can work around that in GSettingsSchema
by checking for the NULL case and treating it like a zero-length list.

https://bugzilla.gnome.org/show_bug.cgi?id=660147
2011-10-13 23:57:00 -04:00
Richard Hughes
c5317a875c Fix the description for g_app_info_get_icon()
It can return NULL when there is no default icon.
2011-10-13 23:50:37 -04:00
Matthias Clasen
b5131ebb16 Keep up with the standards
More choices, always better.
2011-10-13 23:49:37 -04:00
Rudolfs Mazurs
f539959825 Updated Latvian translation. 2011-10-08 21:50:44 +03:00
David Zeuthen
3dcde986bf GDBusConnection: Make pending calls error when the connection is lost
If the connection to the bus is lost while a method call is ongoing,
the method call does not get cancelled. Instead it just sits around
until it times out.

This is visible here on XO laptops when stopping the display manager
during shutdown. imsettings starts sending a sync message to give up
its bus name (via g_bus_unown_name()), then systemd terminates the
session bus at approximately the same time. imsettings then hangs for
about 20 seconds before timing out the message.

 http://lists.freedesktop.org/archives/dbus/2011-September/014717.html

imsettings behaviour could be improved as described in that thread,
but I think this is a glib bug. I've also come up with the attached
patch which fixes it.

Credits for the bug-fix goes to Daniel Drake <dsd@laptop.org>. The test
case was written by David Zeuthen <zeuthen@gmail.com>.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-10-07 14:23:28 -04:00
Colin Walters
aae2f00d5e gmacros: Hide G_STATIC_ASSERT from g-ir-scanner
The C syntax here is twisted and confuses the scanner.  We don't
need to see it, so let's just skip it.
2011-10-05 13:40:13 -04:00
David Zeuthen
dd3e97688e GDBus: Regenerate code when the codegen or options passed to it changes
https://bugzilla.gnome.org/show_bug.cgi?id=660498

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-10-05 12:42:21 -04:00
David Zeuthen
519c148848 GDBusProxy: Correctly handle unknown members when having an expected interface
Since it is valid for a D-Bus interface / service to add new methods,
signals or properties we must NEVER warn about unknown properties or
drop unknown signals or disallow unknown method invocations when we
have an expected interface.

So this means that the expected_interface machinery is only useful for
checking that the service didn't break ABI.

Also update the docs so it is clear exactly what it means to have an
expected interface.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-10-05 10:44:42 -04:00
Bastien Nocera
43e2a7dc48 [gio] Improve doc for g_file_make_directory_with_parents()
g_file_make_directory_with_parents() will fail for already
existing directories, unlike g_mkdir_with_parents(), so mention
this clearly in the docs.

https://bugzilla.gnome.org/show_bug.cgi?id=660791
2011-10-04 17:10:08 +01:00
Ryan Lortie
8592c27467 Make G_ASSERT_STATIC work with clang
A simplified variant of an approach proposed by Behdad.

https://bugzilla.gnome.org/show_bug.cgi?id=660413
2011-10-04 11:56:57 -04:00
Simon McVittie
04da052c1e In the GVariant intro, mention lack of built-in endianness, and rationale
Presumably, the rationale for not storing the endianness is that
GVariant is a recursive type system, and in a sane format, endianness
only needs to be stored once per blob of data (once per D-Bus message,
once per file on disk, etc.).

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=632049
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ryan Lortie <desrt@desrt.ca>
2011-10-04 12:37:28 +01:00
Simon McVittie
ad8457c82f g_variant_get_data: mention what you need to know to deserialise
Also include a shorter version in the docs for g_variant_store, with a
pointer to g_variant_get_data.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=632049
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ryan Lortie <desrt@desrt.ca>
2011-10-04 12:37:27 +01:00
Simon McVittie
340e702a5f g_variant_new_from_data: mention that the caller might need to byteswap
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=632049
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ryan Lortie <desrt@desrt.ca>
2011-10-04 12:37:26 +01:00
Simon McVittie
d2239181a9 Fix a typo in describing g_variant_get_fixed_array
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=632049
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ryan Lortie <desrt@desrt.ca>
2011-10-04 12:37:25 +01:00
Simon McVittie
45189d5559 Escape percent sign in g_variant_new_parsed documentation
Strings matching /%[a-z]/ are special syntax for gtk-doc.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=632049
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ryan Lortie <desrt@desrt.ca>
2011-10-04 12:37:24 +01:00
Simon McVittie
35f1534032 g_variant_get_fixed_array: document which types are appropriate
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=632049
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ryan Lortie <desrt@desrt.ca>
2011-10-04 12:37:23 +01:00
Simon McVittie
82df2070ac GVariant docs: be clear that the serialisation format isn't the same as D-Bus
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=632049
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ryan Lortie <desrt@desrt.ca>
2011-10-04 12:37:20 +01:00
Ryan Lortie
35a9f3a7f2 g_variant_unref: add g_return_if_fail() NULL check
Patch from Rodney Dawes.
2011-10-03 11:12:01 -04:00
Nguyễn Thái Ngọc Duy
add049e1bf Updated Vietnamese translation 2011-10-02 11:21:18 +11:00
Nguyễn Thái Ngọc Duy
90c01fc7e4 po/vi: import from Damned Lies 2011-10-02 11:08:49 +11:00
Ryan Lortie
f02f84e1cc glib 2.30.0 2.30.0 2011-09-26 17:15:41 -04:00
Tiffany Antopolski
d0b2a17338 Update Esperanto translation 2011-09-26 16:59:48 -04:00
Ryan Lortie
d25a6f2486 GDesktopAppInfo: simplify how defaults work
Previously, we took the default application for a particular mimetype
from the system and copied it into the user's configuration as the
default there.

Instead of doing that we leave the user's default unset, and at time of
use, if the user has no explicitly-set default value, we use the system
default.

This avoids complicated situations where inappropriate applications were
being set as the default in the user's configuration.

https://bugzilla.gnome.org/show_bug.cgi?id=658188
2011-09-26 16:55:09 -04:00
Dan Winship
9a7f4baf94 g_simple_async_result_complete_in_idle: add a minor doc clarification 2011-09-26 12:43:40 -04:00
Carles Ferrando
0f460e27a9 [l10n]Updated Catalan (Valencian) translation 2011-09-26 14:40:10 +02:00
Petr Kovar
de5a7de999 Update Czech translation 2011-09-25 23:35:27 +02:00
Gil Forcada
5f1716d65c [l10n]Updated Catalan translation 2011-09-25 23:12:36 +02:00
Kenneth Nielsen
b0f05b807d Updated Danish translation 2011-09-24 14:43:23 +02:00
Aurimas Černius
0a6b6cebab Updated Lithuanian translation 2011-09-24 01:06:06 +03:00
Inaki Larranaga Murgoitio
02d35f6c29 Updated Basque language 2011-09-23 19:05:44 +02:00
Dan Winship
fa82698c53 gio-2.0.pc.in: drop stray reference to libasyncns
gio-2.0.pc's Libs.private was still using @LIBASYNCNS_LIBADD@, which
was no longer being substituted to anything and so broke "pkg-config
--static". Fix it to be @NETWORK_LIBS@ instead.

https://bugzilla.gnome.org/show_bug.cgi?id=659889
2011-09-23 07:50:00 -04:00
Manoj Kumar Giri
14a0e0b6fa Updated Oriya Translation 2011-09-23 16:21:33 +05:30
Chun-wei Fan
21598c7466 Bug 659794: Define S_ISREG when it is not available
Not all compilers define S_ISREG on Windows, so define it in such
situations
2011-09-23 11:43:07 +08:00
Chun-wei Fan
5ecca0e553 Revert "gmappedfile.c: Define S_IFREG on Win32 when it's not available"
This reverts commit 0cccd8d3c82c56285ab55a90aef11d395ba78131.
2011-09-23 11:43:06 +08:00
Chun-wei Fan
10c4ca4db0 gmappedfile.c: Define S_IFREG on Win32 when it's not available
Make a workaround for S_IFREG in gmappedfile.c on Windows as it may not be
available for a given compiler on that platform
2011-09-23 11:43:04 +08:00
Emmanuele Bassi
4b1bf18c04 Fix annotations for source/target in g_object_bind_property_*
We use gpointer for convience of the C API users, but introspection
users will not like it.

https://bugzilla.gnome.org/show_bug.cgi?id=659838
2011-09-22 17:59:12 +01:00
Manoj Kumar Giri
a9b597b6a0 Updated Oriya Translation 2011-09-22 19:50:42 +05:30
Nilamdyuti Goswami
403c352d44 Update Assamese translation 2011-09-22 11:56:39 +02:00