Commit Graph

12780 Commits

Author SHA1 Message Date
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
Matthias Clasen
867ad1cebc Add some GPermission tests 2012-08-19 02:22:33 -04:00
Matthias Clasen
2687d921e1 Cosmetic change
gtk-doc doesn't need <!-- --> anymore to recognize plural
forms of links.
2012-08-19 02:21:02 -04:00
Matthias Clasen
4dbcd27eee Make GPermission more forgiving
It is not great if calling g_permission_acquire on a simple
permission object just segfaults. This commit arranges for
this to return a G_IO_ERROR_NOT_SUPPORTED error.
2012-08-19 02:19:27 -04:00
Matthias Clasen
4a8740d0d2 It is 'registered', not 'registred' 2012-08-18 23:17:47 -04:00
Matthias Clasen
e27367f341 Exterminate 'the the' 2012-08-18 23:15:58 -04:00
Matthias Clasen
96ed9e41f4 Improve utils test coverage 2012-08-18 14:42:10 -04:00
Matthias Clasen
cb8f88ca9f Improve uri test coverage 2012-08-18 14:41:48 -04:00
Matthias Clasen
2c338e21d6 Improve strfuncs tests coverage 2012-08-18 14:41:35 -04:00
Matthias Clasen
58c7747c50 Improve GRegex test coverage 2012-08-18 14:41:23 -04:00
Matthias Clasen
a7e10fa0b6 Improve GPrivate test coverage 2012-08-18 14:41:07 -04:00
Matthias Clasen
aad40b89fe Improve file utils test coverage 2012-08-18 14:40:33 -04:00
Matthias Clasen
6e1d205ad3 Improve GError test coverage 2012-08-18 14:40:15 -04:00
Matthias Clasen
e181234fe5 Improve atomic ops test coverage 2012-08-18 14:39:52 -04:00
Matthias Clasen
06d837b6a3 Improve array test coverage 2012-08-18 14:39:28 -04:00
Matthias Clasen
373dcaea56 Improve threadpool test coverage 2012-08-18 14:38:53 -04:00
Fran Diéguez
a946892b1e Updated Galician translations 2012-08-17 23:17:51 +02:00