10630 Commits

Author SHA1 Message Date
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
Ryan Lortie
39738f481a gunixmounts: exempt entries with "none" mountpoint
We ignore entries with mountpoint of "swap" and "ignore".  Add "none" to
that list, since Debian uses it.

Probably we should move to using our already-existing internal list of
things to ignore, but this patch is more minimally intrusive for now.

https://bugzilla.gnome.org/show_bug.cgi?id=654563
2011-09-21 12:09:17 -04:00
Antoine Jacoutot
7166d26918 gunixmounts: Fix compilation on BSD
Commit afa82ae805f9c8bb875a3f863a7b4669953f159f introduced a compilation
regression on BSD systems that use the sysctl(3) interface; we need to
declare the buffer len in _g_get_unix_mount_points()
BZ #659528
2011-09-21 11:03:06 -04:00
David Zeuthen
b1ba69ccee GDBusObject{Proxy,Skeleton}: Prefix properties with g- to avoid collisions
Otherwise we might collide with an interface called Connection.

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

This is for the same reason that GDBusProxy has its properties
prefixed with g-.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-09-21 10:51:41 -04:00
Xavier Claessens
590fc289b3 gdbus-codegen: prepend arg_ to method/signal arg names
This is to avoid shadow declaration warning in the case an arg name
is "time" for example.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-09-21 07:52:16 -04:00
David Zeuthen
630886f84d gdbus-codegen: Clarify how naming and Ugly_Case handling works
Basically, move some paragraphs around.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-09-21 07:21:16 -04:00
David Zeuthen
4f5f8bc28a gdbus-codegen: Update man page to reflect how --annotate actually works
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-09-21 07:21:03 -04:00
Xavier Claessens
b13bf5dd74 gdbus-codegen: Fix build errors in generated code
https://bugzilla.gnome.org/show_bug.cgi?id=659646
2011-09-21 07:20:47 -04:00
Matej Urbančič
403453a4a3 Updated Slovenian translation 2011-09-20 20:34:12 +02:00
Matej Urbančič
1225b10e5c Updated Slovenian translation 2011-09-20 20:29:33 +02:00
Cosimo Cecchi
24dc57e0f9 timeval: add introspection annotations to g_time_val_from_iso8601()
The GTimeVal argument is missing an (out) annotations.

https://bugzilla.gnome.org/show_bug.cgi?id=658692
2011-09-20 13:05:37 -04:00
Sweta Kothari
8d4cc264fa Updated Gujarati Translations 2011-09-20 14:12:38 +05:30
David Zeuthen
0d04b3449e GDBusObjectManagerServer: Add test for export_uniquely() method
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-09-19 17:34:06 -04:00
Matthew Barnes
39ae9ee5e8 GDBusObjectManagerServer: Use correct object path in export_uniquely() method
In registration_data_export_interface(), the object_path is obtained using:

object_path = g_dbus_object_get_object_path (G_DBUS_OBJECT (data->object));

But when exporting an object uniquely, the object_path is not assigned
to the GDBusObject until after all the interfaces are exported.
Therefore, registration_data_export_interface() is trying to export
the interface on the non-unique object path, which can lead to
run-time errors if an object already exists on that path.

Instead, registration_data_export_interface() should be passed the
object_path explicitly, as is done in
g_dbus_object_manager_server_export_unlocked().

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-09-19 17:33:58 -04:00
Philip Withnall
7b812c4343 Don't close stream twice when splicing
Ensure that the output/target stream in a g_output_stream_splice_async()
operation is marked as closed if G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET is
passed to g_output_stream_splice_async(). This removes the possibility of
local FDs being closed twice because the stream's not marked as closed.

This is implemented by calling g_output_stream_close() from within
g_output_stream_splice_async() instead of calling the stream's close_fn()
directly.

Closes: bgo#659324
(cherry picked from commit fe27bf003764e453cd15cab67e8a99fcda84db1d)
2011-09-19 10:15:25 +02:00
Мирослав Николић
c6df60f912 Updated Serbian translation 2011-09-19 03:01:58 +02:00
Mario Blättermann
649fcd10f1 [l10n] Updated German translation 2011-09-18 22:15:11 +02:00