Commit Graph

3187 Commits

Author SHA1 Message Date
William Jon McCann
40b4fae42e Add ability to get symbolic icon for content type
https://bugzilla.gnome.org/show_bug.cgi?id=682101
2012-08-30 11:04:43 -04:00
William Jon McCann
a15a071f35 Add symbolic icon support to gfileinfo
https://bugzilla.gnome.org/show_bug.cgi?id=682101
2012-08-30 11:04:43 -04:00
William Jon McCann
a2dca48bf7 Add symbolic icon support to drive, volume, and mount
We need symbolic icon support for display in Nautilus.

https://bugzilla.gnome.org/show_bug.cgi?id=682101
2012-08-30 11:04:43 -04:00
Rui Matos
88d181ef18 gdbus-tool: Check return value of strrchr()
Fixes a crash when invoking gdbus like:

$ gdbus emit --session -o / -s Foo

https://bugzilla.gnome.org/show_bug.cgi?id=682965
2012-08-30 11:51:49 +02:00
Cosimo Cecchi
9bca5bb49f appinfo: fix annotations for g_app_info_launch and g_app_info_launch_uris
The files/uris parameters for these functions can be NULL, so we need an
allow-none annotation here.
2012-08-29 14:46:11 -04:00
Colin Walters
6e64ba58b9 Switch all open() calls to use g_open()
Because it now handles EINTR.  And we should do so.  While most people
use Linux, which tries very hard to avoid propagating EINTR back up
into userspace, it can still happen.

https://bugzilla.gnome.org/show_bug.cgi?id=682833
2012-08-28 13:56:59 -04:00
Colin Walters
2542b6f604 xdgmime: Handle EINTR in open()
https://bugzilla.gnome.org/show_bug.cgi?id=682833
2012-08-28 13:56:58 -04:00
Cosimo Cecchi
62570a52b1 gio: don't quote quark names for G_DEFINE_QUARK 2012-08-28 13:16:25 -04:00
Matthias Clasen
60d2cb665e Use G_DEFINE_QUARK for quarks in GIO 2012-08-28 00:08:08 -04:00
Daiki Ueno
030ebfb93b gsettings-tool: make list-recursively really recurse
https://bugzilla.gnome.org/show_bug.cgi?id=682586
2012-08-28 00:08:06 -04:00
Matthias Clasen
a552989410 GFile: Cosmetic doc changes 2012-08-28 00:08:05 -04:00
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
Mike Gorse
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
Dan Winship
b901aaf673 Update .gitignores 2012-08-26 14:40:22 -04: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
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
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
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
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
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
Chun-wei Fan
2954f70d39 Fix build on Visual C++
-glib/gmarkup.c: Use G_VA_COPY() instead of va_copy() as va_copy() may not
 be universally available.
-gio/gtestdbus.c: Include io.h on Windows for close()
2012-08-17 19:22:43 +08:00
Matthias Clasen
b13a79aeb4 Adapt schema tests to changed error messages 2012-08-17 01:15:08 -04:00
Matthias Clasen
86329ba44f gdbus: Use g_markup_collect_known_attributes() in GDBus introspection
In order to be able to cope with the introspection XML
from the Telepathy specification, which uses attributes
like tp:type and tp:name-for-bindings, we need to ignore
unknown attributes when parsing.
Closes: https://bugzilla.gnome.org/show_bug.cgi?id=665634
2012-08-16 23:41:19 -04:00
Matthias Clasen
21aff13d22 Fix 'make report'
Turns out this doesn't work unless every Makefile.am includes
Makefile.decl.
2012-08-16 23:23:16 -04:00
Matthias Clasen
6bee6dbce5 Miscellaneous string fixes
Typo and punctuation fixes, and some rewording, based
on a patch by Philip Withnall, bug
https://bugzilla.gnome.org/review?bug=628193
2012-08-16 23:02:41 -04:00
Matthias Clasen
e4dc223e9d Make capitalisation of "UNIX" consistent in translatable strings
Based on a patch by Philip Withnall, bug
https://bugzilla.gnome.org/review?bug=628193
2012-08-16 22:47:43 -04:00