Commit Graph

12244 Commits

Author SHA1 Message Date
David Zeuthen
3964e708e9 GDBusObjectManagerClient: Don't leak object proxy when handling D-Bus signal
It's g_object_unref(), not g_object_ref(). Ugh.

Therefore, use g_clear_object().

Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-04-17 17:51:55 -04:00
Piotr Drąg
3b9791cca6 Updated POTFILES.in 2012-04-17 19:48:59 +02:00
Dan Winship
00ee06e6a3 gio: use GPollable* to implement fallback read_async/write_async
If a GInputStream does not provide a read_async() implementation, but
does implement GPollableInputStream, then instead of doing
read-synchronously-in-a-thread, just use
g_pollable_input_stream_read_nonblocking() and
g_pollable_input_stream_create_source() to implement an async read in
the same thread. Similarly for GOutputStream.

Remove a bunch of existing read_async()/write_async() implementations
that are basically equivalent to the new fallback method.

https://bugzilla.gnome.org/show_bug.cgi?id=673997
2012-04-17 12:33:12 -04:00
Dan Winship
82ec4dcaed gio: implement GPollableInput/OutputStream in more stream types
Implement GPollableInputStream in GMemoryInputStream and
GConverterInputStream, and likewise implement GPollableOutputStream in
the corresponding output streams.

https://bugzilla.gnome.org/show_bug.cgi?id=673997
2012-04-17 12:33:12 -04:00
Dan Winship
111ba203c2 gpollableutils: utility functions for pollable stream implementations
Move g_pollable_source_new() here from gpollableinputstream.c, add
g_pollable_source_new_full(), and add some new methods to do either
blocking or nonblocking reads depending on a boolean argument.

https://bugzilla.gnome.org/show_bug.cgi?id=673997
2012-04-17 12:33:12 -04:00
Dan Winship
7e95777a6a gio: minor GPollableInputStream / GPollableOutputStream fixes
Make g_pollable_input_stream_read() and
g_pollable_output_stream_write() look a little bit more like the
non-pollable versions in terms of error handling, etc. Also, use the
read_fn and write_fn virtual methods directly rather than calling
g_input_stream_read()/g_output_stream_write(), to avoid problems with
re-entrancy involving the "pending" flag.

Also belatedly add single-include guards to the header files.

https://bugzilla.gnome.org/show_bug.cgi?id=673997
2012-04-17 12:33:12 -04:00
Dan Winship
adea9fb252 GConverterInputStream: fix an infinite loop when fill_buffer returns an error
The loop was using a GConverterResult variable where it meant to use a
gssize, and since GConverterResult was ending up as an unsigned type,
this meant the (res < 0) check always failed.
2012-04-17 12:33:12 -04:00
Hannes Mueller
2ef1a8ef05 avoid warning in gutils.h when using gcc with -Wconversion
Old solution to avoid warning with gcc flag -Wconversion does not
work with gcc >=4.3 since the behaviour for that flag has been
changed, ref. http://gcc.gnu.org/wiki/NewWconversion. Now cast for
__builtin_clzl is required, which itself is declared to return int.

https://bugzilla.gnome.org/show_bug.cgi?id=619026
2012-04-17 18:24:41 +02:00
Sasi Bhushan
be6955a008 Updated Telugu Translation 2012-04-17 15:45:05 +05:30
Alexander Shopov
bb6807ae25 Updated Bulgarian translation 2012-04-17 06:28:41 +03:00
Fran Diéguez
f93c999706 Updated Galician translations 2012-04-17 01:11:08 +02:00
Christian Persch
8869de3857 gdbus-codegen: Avoid warnings in generated code
Initialising a "gchar *" struct member from a string literal may produce
a warning; add an explicit cast to fix that.

Bug #664275.
2012-04-16 22:39:34 +02:00
Christian Persch
5ef34e5f11 resources: compiler: Fix resources on big endian architectures
Resources are always little endian, so the gvdb is byteswapped. When looking
up the value, it would return a new byteswapped variant, making the data
returned from do_lookup() invalid once that variant is unref'd. Since
byteswapping doesn't matter for the "ay" data anyway, just use
gvdb_table_get_raw_value() instead and only byteswap the length and flag
values.

https://bugzilla.gnome.org/show_bug.cgi?id=673409
2012-04-16 22:39:34 +02:00
Wolfgang Stöggl
cf619cffb7 [l10n] Updated German translation 2012-04-16 22:37:30 +02:00
Matej Urbančič
8da60fa91a Updated Slovenian translation 2012-04-16 22:24:41 +02:00
Piotr Drąg
4553caa37a Updated Polish translation 2012-04-16 21:19:48 +02:00
Colin Walters
3ac2930e1a tests: Fix race conditions in mainloop/invoke test
1) The test was using GCond incorrectly (it always needs a
   state variable)
2) The state assertion was racing with the thread; just delete it.
   All we're really trying to test here is that the invoke runs by the
   time the thread is gone, and the function has an assertion that
   it runs in the correct thread.

https://bugzilla.gnome.org/show_bug.cgi?id=674213
2012-04-16 14:14:29 -04:00
Colin Walters
3054ecf109 tests/mainloop: Add a test for recursive child sources
https://bugzilla.gnome.org/show_bug.cgi?id=669260
2012-04-16 13:47:27 -04:00
Dan Winship
bdbb531340 tests/mainloop: add a test for child sources
https://bugzilla.gnome.org/show_bug.cgi?id=669260
2012-04-16 13:47:27 -04:00
Dan Winship
a49568cecc gmain: block child sources when blocking the parent
When blocking a source that has child sources, we need to consider the
children blocked as well. Otherwise they will still trigger repeatedly
in an inner loop started from the parent source's callback.

https://bugzilla.gnome.org/show_bug.cgi?id=669260
2012-04-16 13:47:27 -04:00
Kalev Lember
b3b32be1e1 Only build gmenumodel test on unix
It depends on gdbus-sessionbus.c which only builds on unix.
2012-04-16 18:46:12 +03:00
Kalev Lember
aacd3469a5 tests/fileutils: Fix Windows build 2012-04-16 18:46:12 +03:00
Chandan Kumar (ciypro)
6bbfa4ee14 Updated HINDI translation 2012-04-16 20:52:20 +05:30
Cosimo Cecchi
0f57e5c70c tests/date: force English locale running the GDateTime tests
The parsing test needs to make some assumption about the locale
representation of the string to be parsed, so we need to explicitly
override the locale here.
2012-04-16 10:53:43 -04:00
Daniel Mustieles
01c5cdb50d Updated Spanish translation 2012-04-16 16:31:29 +02:00
Petr Kovar
db4a635963 Update Czech translation 2012-04-16 15:57:21 +02:00
Stef Walter
666374c16f Add support for MX, TXT, NS and SOA records to GResolver
* Add resolver functions for looking up DNS records of
   various types. Currently implemented: MX, TXT, SOA, SRV, NS
 * Return records as GVariant tuples.
 * Make the GSrvTarget lookups a wrapper over this new
   functionality.
 * Rework the resolver test so that it has support for
   looking up MX, NS, SOA, TXT records, and uses GOptionContext

https://bugzilla.gnome.org/show_bug.cgi?id=672944
2012-04-16 15:51:39 +02:00
Petr Kovar
cec17df598 Update Czech translation 2012-04-16 15:21:17 +02:00
Yinghua Wang
b17085dcb9 update Simplified Chinese (zh_CN) translation 2012-04-16 14:06:56 +08:00
Rafał Mużyło
6d19f11c89 configure: Fix typo in ELF check
Signed-off-by: Colin Walters <walters@verbum.org>
2012-04-15 11:17:28 -04:00
Colin Walters
4b98c512df build: When cross compiling, don't require host binaries if tests are not enabled
These binaries are now only used by the test suite.  glib-genmarshal
*used* to be required to generate marshallers, but isn't anymore now
that we use libffi (via g_cclosure_marshal_generic).

https://bugzilla.gnome.org/show_bug.cgi?id=667806
2012-04-15 11:15:54 -04:00
Colin Walters
f084b60377 build: Add --disable-modular-tests build option
This patch solves two problems:

First, it allows builders to optionally cut the circular dependency
between dbus and glib by disabling the modular tests (just like how
the tests can be disabled in dbus).

Second, the tests are entirely pointless to build if cross-compiling.

It also moves us slightly closer to the long term future we want where
the tests are a separate ./configure invocation and run against the
INSTALLED glib, not the one in the source tree. This would allow us to
run the tests constantly, not just when glib is built.

https://bugzilla.gnome.org/show_bug.cgi?id=667806
2012-04-15 11:15:54 -04:00
Yuri Myasoedov
366c39b642 Updated Russian translation 2012-04-15 00:27:04 +04:00
Cosimo Cecchi
1e2ca76464 fileinfo: document the correct type for trash::orig-path
The correct type for this attribute, as set by GVfs, is
G_FILE_ATTRIBUTE_TYPE_BYTE_STRING (which is the correct type for file
paths anyway).

https://bugzilla.gnome.org/show_bug.cgi?id=674074
2012-04-14 13:09:33 -04:00
David Zeuthen
6a9341d851 GDBusAuth: Handle when no there is no auth observer present
I obviously fucked up when adding the ::allow-mechanism signal, sorry.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-04-14 12:40:57 -04:00
David Zeuthen
b9d1fe7db2 Check that auth methods work and interoperate with libdbus-1
See https://bugzilla.gnome.org/show_bug.cgi?id=673943

Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-04-14 12:33:14 -04:00
David Zeuthen
9496565a4c GSocketControlMessage: Don't warn about unknown messages
If we do this, the tests added in bug 673943 will cause warnings.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-04-14 12:32:23 -04:00
David Zeuthen
ce81bd87c5 GDBusAuthObserver: Add a way to control what authentication mechanisms to use
This is related to https://bugzilla.gnome.org/show_bug.cgi?id=673943
but also useful in a lot of other contexts.
2012-04-14 11:52:20 -04:00
Giovanni Campagna
bb7f3e0cbd GDesktopAppInfo: add an accessor for StartupWMClass
Components using GIO to do window to application matching can
use that field to retrieve potential candidates.

https://bugzilla.gnome.org/show_bug.cgi?id=673659
2012-04-14 02:44:25 +02:00
Giovanni Campagna
79013634ab Add version macros for 2.34
This marks the start of the new development cycle, and opens the
window for API additions.

https://bugzilla.gnome.org/show_bug.cgi?id=673659
2012-04-14 02:22:36 +02:00
Matthias Clasen
55bbb9fc69 Bump version 2012-04-13 19:54:42 -04:00
Matthias Clasen
2b6cf583d2 2.32.1 2012-04-13 19:53:42 -04:00
Matthias Clasen
c1a83a4ac8 Fix distcheck
I forgot to dist a test script, and forgot to look for it
in srcdir instead of builddir.
2012-04-13 19:53:07 -04:00
Christian Kirbach
9375212311 [l10n] Updated German translation 2012-04-13 19:39:19 +02:00
Dan Winship
baf0ebf7b2 tests/mainloop: fix a race condition
Rather than depending on the machine's speed/load, just interlock
between the two threads properly.
2012-04-13 12:15:15 -04:00
Dan Winship
e0aa0ae8a2 tests/mainloop: use g_assert_cmpint(), for better error messages 2012-04-13 12:15:11 -04:00
Matthias Clasen
50aed1cc8f Make the markup-parse test independent of the locale
I added a setlocale call, because we need it for Unicode to
come out right; but I forgot to fix the locale, so we now
fail when comparing error messages to the expected (English)
result. Correct this by setting LANG explicitly to en_US.utf-8.

https://bugzilla.gnome.org/show_bug.cgi?id=669285
2012-04-13 09:39:48 -04:00
Bruce Cowan
5e0be9e9e2 Updated British English translation 2012-04-13 13:27:39 +01:00
Kalev Lember
e13fc58535 GResource docs: fix typo 2012-04-13 13:22:46 +03:00
Ryan Lortie
192892b52c GSettings docs: clarify what is a good path
Add an explicit note to the docs about choosing paths based on domain
names, not ones like "/apps/", "/desktop/" or "/system/".
2012-04-12 20:04:32 -04:00