Commit Graph

14277 Commits

Author SHA1 Message Date
Svante Signell
1d4bb3f5d0 gio/gsocket.c: Fix error code checks when SOCK_CLOEXEC is defined but
not supported on GNU/Hurd.

https://bugzilla.gnome.org/show_bug.cgi?id=708266
2013-09-24 08:59:38 -04:00
Chao-Hsiung Liao
04e784e0c2 Updated Traditional Chinese translation(Hong Kong and Taiwan) 2013-09-24 19:01:24 +08:00
Ryan Lortie
d974d2ec8f Bump version to 2.39.0 2013-09-23 17:47:49 -04:00
Ryan Lortie
fbe3ce89a8 Introduce version macros for 2.40 2013-09-23 17:46:58 -04:00
Ryan Lortie
c8de2b11bb GLib 2.38.0 2013-09-23 17:07:33 -04:00
Ryan Lortie
9da87f597c fix up refcount/properties test case
Recent changes to the properties testcase made invalid use of the GArray
free function.  This free function takes a pointer to the item to be
freed, not the item itself.  Since that item was a pointer to a GObject,
g_object_unref() was getting a GObject**, rather than a GObject*.

The use of GArray in this testcase is pretty questionable in the first
place, so just use C arrays instead.
2013-09-23 17:07:33 -04:00
Ryan Lortie
748c86e45f gio docs: add some missing functions 2013-09-23 17:07:33 -04:00
Ryan Lortie
abf505fd0e More gio-du win32 fixes
Don't free the utf8 filename before the async function completes.

also, gitignore
2013-09-23 16:31:40 -04:00
Ryan Lortie
6d08d1191b Revert "gcancellable: allow g_cancellable_disconnect from "cancelled" handler on same thread"
This reverts commits 83605e2d0a and
140fa7ee46.
2013-09-23 16:15:52 -04:00
Alexander Larsson
140fa7ee46 cancellable: Minor fix to docs
The code uses "my_data", not "data" everywhere else.
2013-09-23 09:11:04 +02:00
Ray Strode
83605e2d0a gcancellable: allow g_cancellable_disconnect from "cancelled" handler on same thread
g_cancellable_disconnect will wait until any pending "cancelled"
handlers finish.  This is useful because disconnecting a handler can have the
side-effect of freeing data that the cancelled handler may rely on.
Unfortunately, the code used to enforce this synchronization between
"cancelled" handlers and g_cancellable_disconnect will also cause
deadlock if the cancelled handler itself calls g_cancellable_disconect.

Obviously, if g_cancellable_disconnect is explicitly called by a "cancelled"
handler, then the "cancelled" handler is shouldering the responsibility
of not using any data that may be freed by disconnection.

Also, g_cancellable_disconnect can be called in unexpected places by
lower layers in the code (for instance as a result of g_source_destroy).
In practice, this means it's easy for deadlocks to inadvertently crop
up when using "cancelled" handlers.

For these reasons, it would be good to fix the deadlock.

This commit prevents the deadlock by allowing foregoing synchronization,
if a pending "cancelled" handler is in the same thread as the
g_cancellabale_disconnnect call.

https://bugzilla.gnome.org/show_bug.cgi?id=705395
2013-09-23 09:09:48 +02:00
Duarte Loreto
795a36142d Updated Portuguese translation 2013-09-23 00:16:05 +01:00
Claude Paroz
bbd8102ee5 Updated French translation 2013-09-22 20:01:57 +02:00
Ray Strode
29ef821766 tests: add signal disconnection test
This commit adds a test to ensure that during a signal emission, if
a signal handler gets disconnected, it won't be run, even if it would
have run before the disconnection.
2013-09-20 16:06:02 -04:00
Ray Strode
cb7059e17f tests: free properties test object from main thread instead of helper thread
The test objects are used from the main thread after the helper threads
are destroyed, so we need to keep them alive until we're done using them.
2013-09-20 16:06:02 -04:00
Dieter Verfaillie
d5c72b334b docs: fix GSourceFuncs docs
"returns" at the start of a description continuation
line seems to confuse GTK-Doc's parser. Rearrange
the text a bit to work around this...

https://bugzilla.gnome.org/show_bug.cgi?id=708445
2013-09-20 21:08:20 +02:00
Murray Cumming
e31ce1cfe3 gsettings: Correct a GLIB_AVAILABLE_IN_* 2013-09-20 09:27:53 +02:00
Misty De Meo
54e79d7dcb gobject: Fix compilation on OS X/ppc64
Apple's GCC compilers cannot deal well with 64-bit pointers in
transparent unions on ppc64, so compilation of
_G_DEFINE_BOXED_TYPE_BEGIN was failing. Fortunately glib already
provides a fallback for compilers that can't deal with it; this adds
this specific case to the check.

https://bugzilla.gnome.org/show_bug.cgi?id=647145
2013-09-19 08:39:18 -04:00
A S Alam
85be7acb95 Punjabi Translation updated by Aman 2013-09-18 08:54:02 -05:00
Ask H. Larsen
0ff1a89f54 Updated Danish translation 2013-09-17 18:28:19 +02:00
Ryan Lortie
c0ecae37f6 GLib 2.37.93 2013-09-17 11:39:56 -04:00
Ryan Lortie
b72c466653 measure_disk_usage: properly report results
In the async case, make sure we copy all of the out parameters from the
results structure, not just 'disk_usage'.
2013-09-17 09:53:18 -04:00
Ryan Lortie
dbf95a5ae9 measure_disk_usage: skip progress on NULL callback
In the real_..._async wrapper for GFile.measure_disk_usage, skip the
wrapping of the progress callback in the case that the user gave a NULL
callback to the async function.  This is a performance improvement
because the sync version won't have to do continuous sampling of the
clock to issue a call to the wrapper which will then do nothing.

Unfortunately, I made this simplifying assumption when writing the
wrapper, but forgot to actually implement it when making the sync call.
As a result, the wrapper is still called, and invokes the NULL callback,
causing a segfault.

Make sure we pass NULL if the user's callback was NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=707787
2013-09-17 09:44:23 -04:00
Chao-Hsiung Liao
1a9b739c31 Updated Traditional Chinese translation(Hong Kong and Taiwan) 2013-09-17 19:35:13 +08:00
Ryan Lortie
373980f545 bump 2013-09-16 14:14:07 -04:00
Ryan Lortie
f4c3e56f19 GLib 2.37.92 2013-09-16 13:47:04 -04:00
Ryan Lortie
348764269d gio-du: show the correct filename in progress
We were showing argv[1] in the progress output before, which is not
always the filename.
2013-09-16 13:42:02 -04:00
Chun-wei Fan
2684dec447 gio-du: Improve test program on Windows
Make use of __wgetmainargs() on Windows so that we can get wide char
versions of the argv's that are passed in when this test program is being
invoked.  This is necessary as one might enter non-ASCII, such as
CJK characters filenames and/or directories to run the test program
against, so that we can process the name(s) and pass the proper
UTF-8-encoded name(s) of the files/directories that is being tested.

https://bugzilla.gnome.org/show_bug.cgi?id=707787
2013-09-16 13:40:14 -04:00
Ryan Lortie
084e5b0122 GLocalFile: use GDir for g_file_measure_disk_usage
It turns out that although dirent is available on mingw32 (where the
code was originally tested), it is not usable from MSVC.

Avoid portability problems by just using GDir.

Also, be careful about ensuring that we utf8-format filenames in our
error messages, and leave out the "file://" component since the strings
we're displaying are not URIs (and we don't want to make them URIs since
the extra escaping would reduce legibility).

Thanks to Chun-wei Fan <fanchunwei@src.gnome.org> for portions of this
patch and for reviews.

https://bugzilla.gnome.org/show_bug.cgi?id=707787
2013-09-16 13:38:40 -04:00
Ryan Lortie
725125aba3 GDir: add some glib-private APIs
Add a simple UNIX-only API that is used to create a GDir object from a
DIR* that is aquired using opendir() or fdopendir().

This makes it possible to use GDir with openat(), which in turn will
allow use of GDir in the existing GLocalFile implementation of
g_file_measure_disk_usage(), avoiding the current MSVC compatibility
problems there.

Also add an API similar to g_dir_open(), but without the GError handling
(since we want to create a better error message from inside of
glocalfile.c).

Thanks to Chun-wei Fan <fanchunwei@src.gnome.org> for portions of this
patch and for reviews.

https://bugzilla.gnome.org/show_bug.cgi?id=707787
2013-09-16 13:38:40 -04:00
Benjamin Steinwender
0e71110d17 Updated German translation 2013-09-16 19:05:54 +02:00
Gabor Kelemen
67dd31e60f Updated Hungarian translation 2013-09-16 13:07:12 +02:00
Changwoo Ryu
799af7a0d9 Updated Korean translation 2013-09-14 22:46:15 +09:00
Andika Triwidada
89800d0ad4 Updated Indonesian translation 2013-09-14 15:42:05 +07:00
Gil Forcada
90b32fcc47 [l10n] Update Catalan translation 2013-09-14 00:07:12 +02:00
Rico Tzschichholz
35d5b60b09 gmodule: Two minor g-i annotations fixes 2013-09-13 21:16:14 +02:00
Nilamdyuti Goswami
b671cc96b1 Assamese Translation Updated 2013-09-13 18:25:03 +05:30
Chun-wei Fan
7a91a6c9a5 gio/tests/gio-du.c: Avoid Using Unintialized Variable
https://bugzilla.gnome.org/show_bug.cgi?id=707787
2013-09-13 11:31:05 +08:00
Aurimas Černius
054270e4eb Updated Lithuanian translation 2013-09-12 23:19:04 +03:00
Ryan Lortie
5a11019034 tests: remove assertion for '!uncertain' on .txt
Virtaal installs a mime package for various .po-like file formats, one
of which has the extension .txt.  This causes GLib to report ".txt"
files still as "text/plain" but no longer with complete certainty.

The result is that asserting !uncertain during the testsuite causes the
test to fail if Virtaal happens to be installed.

Remove this assertion.
2013-09-12 14:40:24 -04:00
Ryan Lortie
ac8b7ba925 tests: properly set locale to C
We're testing for particular error messages, so we need to set to a C
locale to make sure we get the untranslated version.

Previously, this test set the LANG environment variable, but that's not
good enough if LANGUAGE is also set.  The only way to ensure that
LANGUAGE is ignored is to disable l10n with LC_ALL=C.
2013-09-12 14:40:24 -04:00
Ihar Hrachyshka
8ab1b58ffd Updated Belarusian translation. 2013-09-12 19:20:01 +03:00
Rūdolfs Mazurs
49a0cf08f7 Updated Latvian translation 2013-09-11 22:36:52 +03:00
Marek Černocký
5f6290e4f9 Updated Czech translation 2013-09-10 21:01:15 +02:00
Marek Černocký
0acb99c933 Updated Czech translation 2013-09-10 21:00:16 +02:00
Fran Diéguez
f4e4c1bbbd Updated Galician translations 2013-09-10 15:53:23 +02:00
Milo Casagrande
b301828b15 [l10n] Updated Italian translation. 2013-09-10 10:03:24 +02:00
Enrico Nicoletto
df5a70057f Updated Brazilian Portuguese translation 2013-09-09 20:31:50 -03:00
Piotr Drąg
c0299d32ea Updated Polish translation 2013-09-10 00:56:17 +02:00
Dieter Verfaillie
49bbebc0b9 gio/tests/network-address: fix SCOPE_ID_TEST_INDEX fallback 2013-09-09 23:57:30 +02:00