Commit Graph

12746 Commits

Author SHA1 Message Date
Colin Walters
ac7c050d37 docs: Ensure CLEANFILES is set before we use +=
We need to be defensive about this in the case where gtk-doc.make is
empty.
2012-08-25 17:13:43 -04:00
William Jon McCann
dbad8304ff Don't crash if set_app_info is called before adding metadata
set_mime_type, set_is_private, add_group, set_groups, set_icon, etc
all added metadata before using it. If set_app_info was called before
any of those it would crash when trying to access the metadata.
2012-08-24 13:36:26 -04:00
OKANO Takayoshi
dbf9f7a288 [l10n] Update Japanese translation 2012-08-23 19:15:09 +09:00
A S Alam
462c48acad update Punjabi Translation 2012-08-23 07:57:51 +05:30
Piotr Drąg
12494f697f Updated Polish translation 2012-08-22 22:36:15 +02:00
Colin Walters
0b6fdff05c Fix regression when TMPDIR/TMP are unset
We should just be returning /tmp as a default, not calling g_getenv
("/tmp") which makes no sense.

https://bugzilla.gnome.org/show_bug.cgi?id=672329
2012-08-22 14:48:41 -04:00
Kjartan Maraas
ad20e074c4 Updated Norwegian bokmål translation 2012-08-22 10:29:16 +02:00
Nguyễn Thái Ngọc Duy
e77f3ea0d8 Updated Vietnamese translation 2012-08-22 09:15:00 +07:00
Nguyễn Thái Ngọc Duy
eab38232de po/vi: imported from Damned Lies 2012-08-22 08:51:44 +07:00
Duarte Loreto
4a89e2ee7d Updated Portuguese translation 2012-08-22 00:54:09 +01:00
Ryan Lortie
221bbd8d76 *bump*
thanks rico :)
2012-08-21 16:32:17 -04:00
Dieter Verfaillie
a3655be211 win32: fix tests/sources.c
"make check" was failing on sys/resource.h not being available on
win32. Seeing that this test just spews some numbers on stdout
whithout really testing anything we can safely replace them with
similar enough numbers by relying on g_get_monotonic_time ().

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=682386
2012-08-21 21:15:45 +02:00
Stef Walter
7518f7a674 Revert "gtlscertificate: Add certificate-bytes and private-key-bytes props"
* In order to add contstruct properties to an abstract base
   calls, and retain ABI stability, the base class must add a
   default implementation of those properties.
 * We cannot add a default implementation of certificate-bytes
   or private-key-bytes since certificate and private-key properties
   are writable on construct-only.

This reverts commit 541c985869.

https://bugzilla.gnome.org/show_bug.cgi?id=682081
2012-08-21 13:30:02 +02:00
Stef Walter
a8c784df58 gdbus: Fix double free and use after free of object path
* This occurs when the 'g-object-path' property is read
   on a GDBusObjectSkeleton

https://bugzilla.gnome.org/show_bug.cgi?id=682075
2012-08-21 13:21:26 +02:00
Chao-Hsiung Liao
2222b657de Updated Traditional Chinese translation(Hong Kong and Taiwan) 2012-08-21 19:16:27 +08:00
Cosimo Cecchi
0d8a81b722 mount-op: use gint64 instead of guint64 for time_left and bytes_left
Since those can be -1, they need to be signed.

https://bugzilla.gnome.org/show_bug.cgi?id=682284
2012-08-21 10:55:28 +02:00
Andika Triwidada
ac8c13d25c Updated Indonesian translation 2012-08-21 13:53:46 +07:00
Ryan Lortie
ed40bf6715 NEWS, versions, etc. 2012-08-20 18:36:51 -04:00
Ryan Lortie
59394b3e1e Revert the GMarkup attribute collect changes
We need to have some more discussion on this topic.

This reverts commits 86329ba44f and
8d40389d15.

https://bugzilla.gnome.org/show_bug.cgi?id=665634
2012-08-20 18:34:13 -04:00
Ryan Lortie
850680d751 gmarkup test: fix use of message expect API 2012-08-20 17:57:13 -04:00
Dan Winship
56210220a2 tests/protocol: update the messages to reflect G_LOG_DOMAIN being set now 2012-08-20 17:26:45 -04:00
Ryan Lortie
d06c7a911e g_test_expect_message: add some g_return_if_fail
NULL domain is not supported and some might expect this to work, so make
sure they don't get the wrong idea...
2012-08-20 16:26:25 -04:00
Lars Uebernickel
07fadc7932 GMenuModel: add test for the new GMenuItem API 2012-08-20 16:26:25 -04:00
Ryan Lortie
6798fcdd0f GMenuItem: add constructor to copy from model
Add g_menu_item_new_from_model() for constructing a GMenuItem that is a
copy of a menu item that's in a GMenuModel.
2012-08-20 16:26:25 -04:00
Ryan Lortie
99478dd893 GMenuItem: add getter APIs
GMenuItem has been write-only up to this point.  Add some APIs for
reading back values as well.
2012-08-20 16:26:25 -04:00
Ryan Lortie
ad79b0f8ef GMenuModel: remove a type safety bug
There was a /* XXX */ in the code here to do proper typechecking of the
GVariant in the menu model when using g_menu_model_get_item_attribute().
We have g_variant_check_format_string() now, so use it.
2012-08-20 16:26:25 -04:00
Ryan Lortie
34653169e5 GVariant: add g_variant_check_format_string()
For some time now people have been asking for a way to check for type
compatibility between GVariant instances and format strings.  There are
several APIs inside of GLib itself that would benefit from this.

This patch introduces a way to do that.
2012-08-20 16:26:25 -04:00
Aurimas Černius
6a6b64ef4d Updated Lithuanian translation 2012-08-20 23:10:25 +03:00
Dan Winship
cc24dac3c8 glib/tests: use g_test_expect_message()
Replace some tests that used to use g_test_trap_fork() with
g_test_expect_message() instead.

https://bugzilla.gnome.org/show_bug.cgi?id=679556
2012-08-20 13:54:52 -04:00
Dan Winship
25ac137c0a gtestutils: add g_text_expect_message()
Add g_test_expect_message() and g_test_assert_expected_messages(), to
allow tests of warnings, error messages, return-if-fails, etc.

https://bugzilla.gnome.org/show_bug.cgi?id=679556
2012-08-20 13:54:52 -04:00
Dan Winship
78a8aecbb3 g_logv: only expand the message once
Hoist the g_strdup_printf()'ing out of the loop, since the message is
the same for every handler that gets called.

https://bugzilla.gnome.org/show_bug.cgi?id=679556
2012-08-20 13:49:06 -04:00
Dan Winship
f78931c4ab glib/tests/testing, logging: don't use g_test_undefined()
We are verifying the behavior of the test/logging functions here; this
is not undefined behavior.

https://bugzilla.gnome.org/show_bug.cgi?id=679556
2012-08-20 13:49:06 -04:00
Marc-André Lureau
d9f6314f57 win32: add pipe-io-cancel-test
Test that win32 streams can be cancelled.
It can even be tested with wine on Linux!

https://bugzilla.gnome.org/show_bug.cgi?id=679288
2012-08-20 17:10:31 +02:00
Marc-André Lureau
b9b2cf6a66 win32: add pipe-io-concurrent
Implement test case suggested by Ryan Lortie on bug:
https://bugzilla.gnome.org/show_bug.cgi?id=679288

"There is a potential race here that's really unlikely to happen, but
here we go: We are trying to read from the same socket in two threads.
Some data comes. That causes the poll() in both threads (above) to
finish running. Then the cancellable is checked above. We now find
ourselves here. Only one thread will read the data. The other will
block on this function. Then the user may cancel the cancellable while
we are blocked here, but we will stay blocked...."
2012-08-20 17:10:31 +02:00
Marc-André Lureau
1c1ba8b512 win32: add pipe-io-overlap-test 2012-08-20 17:10:31 +02:00
Marc-André Lureau
b9d7b80897 win32: make gio stream cancellable
v2:
 - fix cancellation of concurrent readers
 - replace g_assert() usage with g_warn_if_fail()
v3:
 - fix indentation
 - fix loop code to not leak (silly me)

https://bugzilla.gnome.org/show_bug.cgi?id=679288
2012-08-20 17:10:31 +02:00
Marc-André Lureau
4b5d762d5d win32: handle ERROR_MORE_DATA
If a named pipe is being read in message mode and the next message is
longer than the nNumberOfBytesToRead parameter specifies, ReadFile
returns FALSE and GetLastError returns ERROR_MORE_DATA.

Since the API doesn't allow to return both a GError and the number of
bytes read so far, it makes more sense to return nread, and let the
client call GetLastError() himself to check if ERROR_MORE_DATA.

The current alternative loses the nread information.

https://bugzilla.gnome.org/show_bug.cgi?id=679288
2012-08-20 17:10:31 +02:00
Marc-André Lureau
23d80a04da win32: use overlapped events for streams
Any file handle created with FLAG_OVERLAPPED must have
ReadFile()/WriteFile() called with an OVERLAPPED structure.
Failing to do so will give unspecified results, invalid read/write or
corruption.

Without FLAG_OVERLAPPED, it is not possible to read and write
concurrently, even with two seperate threads, created by 2 input and
output gio streams. Also, only with FLAG_OVERLAPPED may an IO
operation be asynchronous and thus be cancellable.

We may want to call ReOpenFile() to make sure the FLAG is set, but
this API is only available since Vista+.

According to MSDN doc, adding the OVERLAPPED argument for IO operation
on handles without FLAG_OVERLAPPED is allowed, and indeed the existing
test still passes.

v2:
- update GetLastError() after _g_win32_overlap_wait_result ()
- split the unrelated ERROR_MORE_DATA handling

https://bugzilla.gnome.org/show_bug.cgi?id=679288
2012-08-20 17:10:31 +02:00
Thomas Hindoe Paaboel Andersen
96a0c589ee gmem.c: array is only paritally filled by memcpy
The size of the local_data arrray is too large. It should not be
multiplied by the sizeof guint.

The memcpy of profile_data to local_data later will only fill a part of the
array.

Spotted with the PVS-Studio static analyzer

https://bugzilla.gnome.org/show_bug.cgi?id=681501
2012-08-20 16:41:42 +02:00
Daniel Mustieles
248cc2c885 Updated Spanish translation 2012-08-20 14:15:39 +02:00
Matthias Clasen
cbf346ce53 Remove some more 'the the' 2012-08-19 02:27:04 -04:00
Matthias Clasen
efd822bb07 Improve test coverage for GSocketConnection 2012-08-19 02:26:42 -04:00
Matthias Clasen
cc5d7ccdba Improve test coverage for unix socket addresses 2012-08-19 02:26:05 -04:00
Matthias Clasen
63eaeb223b Improve test coverage for resources 2012-08-19 02:25:37 -04:00
Matthias Clasen
beea8c5c84 Improve test coverage for filter streams 2012-08-19 02:25:21 -04:00
Matthias Clasen
b22f4a2dd2 Improve test coverage for unix streams 2012-08-19 02:25:02 -04:00
Matthias Clasen
3afec2b872 Improve test coverage for pollable streams 2012-08-19 02:24:44 -04:00
Matthias Clasen
eeb4951c47 Improve GSettings test coverage 2012-08-19 02:24:04 -04:00
Matthias Clasen
f89e9deaec Improve GAppInfo test coverage 2012-08-19 02:23:32 -04:00
Matthias Clasen
35bf77445b Add some GInetAddress tests 2012-08-19 02:22:59 -04:00