Commit Graph

14455 Commits

Author SHA1 Message Date
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
Kalev Lember
b82ace52e0 Trivial typo fix 2013-09-09 23:35:25 +02:00
Matej Urbančič
322f687f5f Updated Slovenian translation 2013-09-09 20:35:43 +02:00
Daniel Mustieles
83d55492d4 Updated Spanish translation 2013-09-09 16:46:32 +02:00
Ryan Lortie
a61c9f489a tests/: add gio-du
This is basically a minimally-featured 'du' equivalent to manually test
g_file_measure_disk_usage().

https://bugzilla.gnome.org/show_bug.cgi?id=704893
2013-09-09 10:41:17 -04:00
Ryan Lortie
6ec2bb17c3 GFile: add new g_file_measure_disk_usage() API
This is essentially the equivalent of 'du'.

This is currently only supported on local files.  gvfs will add support for the
interface later.

https://bugzilla.gnome.org/show_bug.cgi?id=704893
2013-09-06 13:16:17 -04:00
Мирослав Николић
242a735fe0 Updated Serbian translation 2013-09-05 08:05:45 +02:00
Chun-wei Fan
52251a5237 Visual C++ Builds: Fix "install" Projects
Due to the split up of the property sheets, the install projects did not
have info on the Intermediate and Output Paths, which caused confusing
messages from Visual Studio to show up upon completing build+"install" and
closing Visual Studio on whether to reload the install project, at least on
Visual Studio 2008.

Include the property sheet which defines these properties to fix this.
2013-09-05 13:59:02 +08:00
Changwoo Ryu
268f3ce0ff Updated Korean translation 2013-09-04 00:29:58 +09:00
Matthias Clasen
801a5c8bb2 bump version 2013-09-02 12:12:58 -04:00
Matthias Clasen
b6a52f0a91 2.37.7 2013-09-02 11:25:57 -04:00
Martin Pitt
ed1e3816ad gobject-2.0: Annotate another GSignal function taking instances
As a followup to commit a72983a, annotate g_signal_handlers_destroy() as well.
2013-09-02 12:04:43 +02:00
Emmanuele Bassi
a72983a5db gobject-2.0: Annotate GSignal functions taking instances
Unbreak the GSignal API at least for GObject sub-classes.

https://bugzilla.gnome.org/show_bug.cgi?id=685387
2013-09-02 08:25:56 +02:00
Matthias Clasen
c81773da9c Add Since tag for g_close
The lack of this information in the docs was pointed out in

https://bugzilla.gnome.org/show_bug.cgi?id=707092
2013-09-01 14:56:23 -04:00
Gil Forcada
8c50dfcc5a [l10n] Update Catalan translation 2013-08-31 22:45:44 +02:00
Dan Winship
f8bb08305c gmessages: fix g_test_expect_message() with NULL domains
Allow passing a NULL domain to g_test_expect_message(), and more
importantly, don't crash if a message with a NULL domain gets logged
while there is an expected message.
2013-08-31 11:51:07 -04:00
Dan Winship
cde9f4598b gio/tests/socket: fix warning building on win32
setsockopt() has a broken prototype on win32. Fix this by just using
g_socket_set_option() instead.
2013-08-31 11:40:44 -04:00
Sebastian Dröge
02393e6faf gio/tests/socket: add test for g_socket_get_available_bytes()
https://bugzilla.gnome.org/show_bug.cgi?id=686786
2013-08-31 11:40:44 -04:00
Dan Winship
9fd0927e58 gsocket: Fix g_socket_get_available_bytes() on Windows and OS X
On Windows and OS X, FIONREAD on a UDP socket gets the total number of
bytes available, not the number of bytes available in the next packet,
which is the more useful number (and how the function always behaved
on Linux).

On OS X, fix this by using SO_NREAD. On Windows, fix this by doing a
MSG_PEEK recv() into a giant buffer, since there is apparently no
other way to get the information.

https://bugzilla.gnome.org/show_bug.cgi?id=686786
2013-08-31 11:40:44 -04:00
Kalev Lember
8d62c2495a Add tests for new '%z' g_date_time_format extensions
https://bugzilla.gnome.org/show_bug.cgi?id=707151
2013-08-31 13:34:41 +02:00
Kalev Lember
8fd7f58aee gdatetime: Extend the '%z' timezone format
Implement gnulib strftime extensions for the '%z' numeric timezone
format. These are also supported and documented by GNU date(1):

%z     +hhmm numeric time zone (e.g., -0400)

%:z    +hh:mm numeric time zone (e.g., -04:00)

%::z   +hh:mm:ss numeric time zone (e.g., -04:00:00)

%:::z  numeric time zone with : to necessary precision (e.g., -04, +05:30)

https://bugzilla.gnome.org/show_bug.cgi?id=707151
2013-08-31 13:34:41 +02:00
Shantha kumar
dac5e5e755 Tamil Translations Updated 2013-08-30 15:36:22 +05:30
Dan Winship
11254b3c7d gsocket: make GSocketSource trigger on G_IO_NVAL
Getting G_IO_NVAL probably indicates bugs/race conditions in the
calling code, but if GSocket just ignores it, it will get stuck in an
infinite loop.
2013-08-29 09:25:42 -04:00