Commit Graph

12759 Commits

Author SHA1 Message Date
Matthias Clasen
0149f44f4a Fix the GDBusProxy async test
Patch by Mike Gorse, bug
https://bugzilla.gnome.org/show_bug.cgi?id=674805
2012-08-28 00:08:05 -04:00
Matthias Clasen
7e07ea8189 Make async permission tests work 2012-08-28 00:08:05 -04:00
375943ea21 Fix the gdbus-proxy async test
The async test had several problems:
- It created a proxy and did not launch a main loop, meaning that its
  callback would usually not get called, or, if it did get called, the
test harness would have taken down the connection already, causing an
assertion failure when the proxy had an error.
- It was dependent on the proxy test to set up the server and would fail
  because some properties were modified by that test.

https://bugzilla.gnome.org/show_bug.cgi?id=674805
2012-08-28 00:08:04 -04:00
Colin Walters
ce976bcac7 gstdio: Harden g_open() against EINTR
Noticed by code inspection, when auditing some of my code for EINTR
handling.

https://bugzilla.gnome.org/show_bug.cgi?id=682819
2012-08-27 18:10:12 -04:00
Colin Walters
d54e10632a gvariant: Add tests for exact SHA256 checksums
I'd like to use GVariant as a data format in my userspace filesystem,
and having the actual bits be stable means I can reliably compute
cryptographic checksums.

This updated patch removes vardict checks, because Ryan wants the
flexibility to change them in the future.

https://bugzilla.gnome.org/show_bug.cgi?id=673012
2012-08-27 17:02:00 -04:00
Ryan Lortie
7936af6934 GVariantType: gut g_variant_type_check()
This function is causing an insane amount of wasted time on some
real-world profiles and it's pretty useless since we already have
GVariantType (as a type different from a string) for the purpose of
static type safety.

Disable it for now.  We can possibly turn this back on again if we solve
bug #544026.

https://bugzilla.gnome.org/show_bug.cgi?id=679835
2012-08-27 16:12:30 -04:00
Nilamdyuti Goswami
b53e95f3eb Implemented FUEL entries to Assamese translation 2012-08-27 23:40:28 +05:30
Dan Winship
1a2c5e155d glib/tests: fix leaks
https://bugzilla.gnome.org/show_bug.cgi?id=682560
2012-08-27 07:38:27 -04:00
Dan Winship
0c0cdfd9c4 gtestutils: add g_test_add_data_func_full()
Like g_test_add_data_func(), but includes a GDestroyNotify for the
test data.

https://bugzilla.gnome.org/show_bug.cgi?id=682560
2012-08-27 07:31:13 -04:00
Dan Winship
2427378223 gmain: remove unix signal watch if its GSourceFunc returns FALSE
g_unix_signal_watch_dispatch() was ignore the callback's return value.
Fix that.

https://bugzilla.gnome.org/show_bug.cgi?id=682560
2012-08-27 07:24:15 -04:00
Dan Winship
99c7c951d9 gmain: don't leak child sources that are destroyed before their parents
A parent source holds refs on its children, so if the child source is
destroyed, we need to drop that ref. Fix, and reorganize to make this
all more obvious.

https://bugzilla.gnome.org/show_bug.cgi?id=682560
2012-08-27 07:24:07 -04:00
Dan Winship
48a9887eae gmain: free source_lists when freeing GMainContext
If a context was freed with sources still attached, those sources
correctly got destroyed, but the corresponding GSourceList structs
were being leaked.

https://bugzilla.gnome.org/show_bug.cgi?id=682560
2012-08-27 07:23:59 -04:00
Dan Winship
b901aaf673 Update .gitignores 2012-08-26 14:40:22 -04:00
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