Commit Graph

4100 Commits

Author SHA1 Message Date
Ryan Lortie
04aee2d920 gsocket: make use of g_source_set_ready_time()
Drop our own hand-rolled version of the same functionality.

https://bugzilla.gnome.org/show_bug.cgi?id=724707
2014-02-22 10:25:42 -05:00
Ryan Lortie
1f7100506a gsocket: don't abuse GPollFD.revents field
We are reusing the GPollFD.revents field of the source to store a
temporary value.  Use a local variable for that instead.

This is a refactor to make the next commit easier to understand.

https://bugzilla.gnome.org/show_bug.cgi?id=724707
2014-02-22 10:24:19 -05:00
Ryan Lortie
ff96f88e17 gsocket: use cancellable child source
Now that GCancellable's GSource is based on _set_ready_time() instead of
an fd, we should use it as a child source, instead of forcing the
creation of the fd and adding it as a poll.

https://bugzilla.gnome.org/show_bug.cgi?id=724707
2014-02-22 10:24:19 -05:00
Ryan Lortie
d8263dd793 gsocket: trivial typo fix
https://bugzilla.gnome.org/show_bug.cgi?id=724707
2014-02-22 10:24:19 -05:00
William Jon McCann
20f4d1820b docs: use "Returns:" consistently
Instead of "Return value:".
2014-02-19 19:41:52 -05:00
Chun-wei Fan
9cb53851be gio/gresolver.c: Fix build on Windows
Windows does not come with inet_aton(), and this check on IPv4 addresses
is actually not needed on Windows as the getaddrinfo() implementation on
Windows already rejects non-standard and non-real IPv4 numbers-and-dots
addresses.

https://bugzilla.gnome.org/show_bug.cgi?id=724609
2014-02-20 08:36:54 +08:00
Ryan Lortie
c37cd19fee Work around test failure in gdbus-names
This is caused by g_test_dbus_down() returning too soon.

Add a sleep for now.

https://bugzilla.gnome.org/show_bug.cgi?id=711807
2014-02-17 18:18:20 -05:00
Ryan Lortie
53d5b17f62 GApplication: disable some more tests
Disable some racy GApplication testcases.  We need some better non-hacky
GApplication tests...

https://bugzilla.gnome.org/show_bug.cgi?id=724126
2014-02-17 17:44:58 -05:00
Dan Winship
4139b26f3e gsocket: fix g_socket_condition_timed_wait() recovery after EINTR
After getting an EINTR, g_socket_condition_timed_wait() has to adjust
its timeout, but it was trying to convert from nanoseconds to
microseconds by multiplying by 1000 rather than dividing... Oops.

https://bugzilla.gnome.org/show_bug.cgi?id=724239
2014-02-17 11:38:11 -05:00
Ross Burton
299ca6dc1e gio/tests: fix race when generating code
There is a race condition in the makefile that can result in build failures like this in parallel builds:

| ./gdbus-test-codegen-generated.h:7:0: error: unterminated #ifndef
|  #ifndef __GDBUS_TEST_CODEGEN_GENERATED_H__

This is because a rule like this:

x.c x.h: prerequisites
	@commands

doesn't consider x.c and x.h together. Instead, it expands to two rules, one to
generate x.c and one to generate x.h, which happen to run the same commands.  In
the worst case they execute in parallel, overwriting each other's output.

Signed-off-by: Ross Burton <ross.burton@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=723616
2014-02-17 10:21:31 +00:00
Olivier Crête
ed017994c9 subprocess: Init and clear the mutex
Fixes the leak of the GMutexImpl allocated inside the first call to g_mutex_lock()
on an uninitialized GMutex.

https://bugzilla.gnome.org/show_bug.cgi?id=724401
2014-02-16 19:59:44 -05:00
Paolo Borelli
a732f2966d Annotate g_application_add_main_option_entries 2014-02-16 22:06:11 +01:00
Dan Winship
8902276101 g_simple_async_result_is_valid: fix for NULL source tag
If a GSimpleAsyncResult has a NULL source tag, allow it to compare
valid to a non-NULL source tag in g_simple_async_result_is_valid(), to
simplify cases where, eg, g_simple_async_result_new() and
g_simple_async_result_report_error_in_idle() are both used.

https://bugzilla.gnome.org/show_bug.cgi?id=721458
2014-02-16 09:24:04 -05:00
Koop Mast
9c135707cb Fix the build on FreeBSD by replacing EAI_NODATA with EAI_NONAME.
https://bugzilla.gnome.org/show_bug.cgi?id=724434
2014-02-15 18:35:57 -05:00
Ryan Lortie
7cbff954b9 win32: fixup lib.exe invocation
We have a configure.ac check for lib.exe that attempts to enable
creation of .lib files for our 5 public libraries.  That has been broken
for a long time for two reasons:

 1) the Makefiles hardcode 'lib' instead of 'lib.exe'

 2) we dropped generation of .def files quite some time ago (except for
    in gthread where we have the two-symbol file under version control)

Add new rules for creating .def files from dumpbin.exe (which you should
have if you have lib.exe) and fix the .lib rules to use lib.exe.

Add a bit of $(AM_V_GEN) all around, as well.

https://bugzilla.gnome.org/show_bug.cgi?id=722033
2014-02-15 16:55:25 -05:00
Dan Winship
5575a3e9cb gio: don't accept nonstandard IPv4 "numbers-and-dots" addresses
In addition to the standard "192.168.1.1" format, there are numerous
legacy IPv4 address formats (such as "192.168.257",
"0xc0.0xa8.0x01.0x01", "0300.0250.0001.0001", "3232235777", and
"0xc0a80101"). However, none of these forms are ever used any more
except in phishing attempts. GLib wasn't supposed to be accepting
these addresses (neither g_hostname_is_ip_address() nor
g_inet_address_new_from_string() recognizes them), but getaddrinfo()
accepts them, and so the parts of gio that use getaddrinfo()
accidentally did accept those formats.

Fix GNetworkAddress and GResolver to reject these address formats.

https://bugzilla.gnome.org/show_bug.cgi?id=679957
2014-02-15 10:22:24 -05:00
Dan Winship
074df39681 Fix g_socket_get_available() with TCP on Windows
Windows needs a special inefficient hack to implement
g_socket_get_available() correctly for UDP sockets, but that hack
isn't needed for TCP, and in fact, might give the wrong answer in that
case. Fix it to only use the hack with UDP.

Also, fix that case to handle non-blocking sockets as well.

And add a test case for g_socket_get_available() with TCP.

https://bugzilla.gnome.org/show_bug.cgi?id=723422
2014-02-15 10:06:04 -05:00
Matthias Clasen
bc6ee788b4 docs: let go of &ast;
Since we are no longer using sgml mode, using /&ast; &ast;/ to
escape block comments inside examples does not work anymore.
Switch to using line comments with //
2014-02-14 21:33:36 -05:00
Ryan Lortie
450e7b1036 configure.ac: tweak inotify check
Our check for inotify_init1() being defined is broken.  We happily
declare that inotify is supported, even if the check fails.

This was originally intended to check for inotify_init1 in the libc so
that we could fall back to inotify_init if it was not yet defined.

FreeBSD has a libinotify that emulates the inotify API via kqueue.  It
installs a <sys/inotify.h> header and requires linking to -linotify.  We
don't want to falsely detect working inotify in this case.

Treat the lack of inotify_init1() in the libc as a lack of inotify
support.  This requires only a new libc -- we still support old kernels:
in the case that inotify1_init() fails, we fall back to inotify_init().

https://bugzilla.gnome.org/show_bug.cgi?id=724330
2014-02-14 10:42:40 -05:00
Dan Winship
db83b8ac4c gtask: fix trivial doc typo 2014-02-13 12:59:29 -05:00
Philip Withnall
169846c5ab gsocketconnection: Document closing connections with g_io_stream_close()
It’s not enough to close a connection by calling g_input_stream_close()
and g_output_stream_close() on its two substreams: to close the
underlying socket, one must use g_io_stream_close(). Document that.

https://bugzilla.gnome.org/show_bug.cgi?id=724278
2014-02-13 14:09:48 +00:00
Dan Winship
0017728c8c gsocketservice: Clarify g_socket_service_stop() documentation
https://bugzilla.gnome.org/show_bug.cgi?id=724233
2014-02-13 08:30:59 -05:00
Philip Withnall
d173d97c9b gsubprocess: Fix ‘Since’ lines in documentation to read 2.40
GSubprocess was introduced in GLib 2.40, not 2.36.

https://bugzilla.gnome.org/show_bug.cgi?id=724001
2014-02-10 08:50:36 +00:00
Philip Withnall
24536dd030 gsubprocess: Fix a broken link in the documentation
https://bugzilla.gnome.org/show_bug.cgi?id=724001
2014-02-10 08:22:30 +00:00
Matthias Clasen
35066ed6c6 Docs: Drop entities, switch away from sgml mode
Since all element markup is now gone from the doc comments,
we can turn off the gtk-doc sgml mode, which means that from
now on, docbook markup is no longer allowed in doc comments.

To make this possible, we have to replace all remaining
entities in doc comments by their replacement text, &amp; -> &
and so on.
2014-02-09 02:07:26 -05:00
Matthias Clasen
a03cee3b27 Convert remaining examples to links 2014-02-08 17:52:21 -05:00
Matthias Clasen
623b58eeac REmove another table 2014-02-08 15:59:24 -05:00
Matthias Clasen
d5e5244c30 Another stray litreal 2014-02-08 15:28:34 -05:00
Matthias Clasen
cd5cd874f0 Convert another table to a list 2014-02-08 15:18:37 -05:00
Matthias Clasen
3d0e55dfd5 Convert more xincluded examples to external links 2014-02-08 15:18:06 -05:00
Matthias Clasen
f04dbac47d Remove a new literal tag that has crept in 2014-02-08 13:28:11 -05:00
Matthias Clasen
c43e0c34b0 Remove a few leftover <simplelist>s 2014-02-08 13:25:04 -05:00
Matthias Clasen
3ad5aadb40 Remove a stray <em> tag 2014-02-08 13:22:58 -05:00
Matthias Clasen
e16f053aa7 Remove tables from GFileAttribute docs 2014-02-08 13:22:38 -05:00
Matthias Clasen
e7fd3de86d Eradicate links and xrefs
These are all replaced by markdown ref links.
2014-02-08 12:26:56 -05:00
Matthias Clasen
63777d0c63 Remove a few overlooked literals 2014-02-06 16:59:49 -05:00
Matthias Clasen
df990914cf Stop using replaceable tags 2014-02-06 16:49:29 -05:00
Matthias Clasen
5baa0f2af5 Stop using <para> for ids
Instead, use the id support in markdown headings.
2014-02-06 16:48:49 -05:00
Matthias Clasen
3232425785 Docs: replace <literal> by ` 2014-02-06 08:07:16 -05:00
Matthias Clasen
a35d8a4c77 Docs: use quotes instead of firstterm 2014-02-06 08:07:16 -05:00
Matthias Clasen
4569b8ac2d Stop using starttag elements 2014-02-06 08:07:15 -05:00
Matthias Clasen
73c23d9143 Use markdown for images 2014-02-06 08:07:15 -05:00
Ryan Lortie
0e671286fc GApplication: parse command line options
Add support for parsing command line options with GApplication.

You can add GOptionGroup and GOptionEntry using two new APIs:
g_application_add_option_group() and
g_application_add_main_option_entries().

Also add a "handle-local-options" signal that allows handling of
commandline arguments in the local process without having to override
local_command_line.

As a special feature, you can have a %NULL @arg_data in a GOptionEntry
which will cause the argument to be stored in a GVariantDict.  This
dictionary is available for inspection and modification by the
"handle-local-options" signal and can be forwarded to the primary
instance in cases of command line invocation (where it can be fetched
using g_application_command_line_get_options()).

https://bugzilla.gnome.org/show_bug.cgi?id=721977
2014-02-06 12:02:53 +00:00
Matthias Clasen
cb588d4532 Convert external links to markdown syntax 2014-02-05 21:23:28 -05:00
Matthias Clasen
0cc20b7e0b Don't use <filename> in docs
Switch to simpler markdown, `foo`.
2014-02-05 20:17:46 -05:00
Matthias Clasen
111803030d Don't use <envar> in docs
Switch to simpler markdown, `foo`.
2014-02-05 19:32:41 -05:00
Antoine Jacoutot
7cf221aadb gio: extend the system_internal lists with BSD paths 2014-02-02 10:08:05 +01:00
Matthias Clasen
ce87d6420c Don't use the quote tag
It was only used in two places, and we can easily do without.
2014-02-01 21:19:00 -05:00
Matthias Clasen
6566f746f6 Drop use of xinclude in GTestDBus docs 2014-02-01 20:41:47 -05:00
Matthias Clasen
95aba90d09 Docs: Remove another use of xinclude 2014-02-01 20:41:12 -05:00
Matthias Clasen
306dfb3292 Drop use of the command tag
It is more useful to link to the included man page, anyway.
2014-02-01 15:26:38 -05:00
Matthias Clasen
8bdc089ca4 Docs: Drop use of indexterm tags
These have not been making it into the index, anyway.
2014-02-01 15:25:43 -05:00
Matthias Clasen
adf892e96a Annotate all examples with their language
The C ones, at least.
2014-02-01 15:11:49 -05:00
Matthias Clasen
701f00f125 GApplicationCommandline: Shorten embedded examples
Just show relevant fragments of the three examples inline,
and link to the full sources. This lets us get rid of
xinclude markup.
2014-02-01 15:11:00 -05:00
Matthias Clasen
77c4ff80dc docs: Stop using the function tag 2014-02-01 12:19:04 -05:00
Matthias Clasen
42cf80780b Docs: Big entity cleanup
Strip lots of entity use from |[ ]| examples (which are now
implicit CDATA). Also remove many redundant uses of <!-- -->.
2014-02-01 12:00:30 -05:00
Matthias Clasen
4ab94a2683 gtestdbus: Use markdown for sections 2014-02-01 10:48:36 -05:00
Matthias Clasen
eb69bc6aa4 GSettings: use markdown for sections 2014-02-01 10:48:02 -05:00
Matthias Clasen
07506f6c57 kqueue: Don't use doc comments
This is not public API, so no need to confuse gtk-doc by
documentation that it needs to ignore. Also, no need for
markup in here.
2014-02-01 10:22:43 -05:00
Matthias Clasen
77a6014753 GApplication: Convert docs to markdown 2014-02-01 10:22:43 -05:00
Matthias Clasen
01be287689 gdbusnameowning: Convert docs to markdown 2014-02-01 10:22:43 -05:00
Matthias Clasen
3247d11704 GDBusConnection: Convert docs to markdown
And straighten out capitalization across the file.
2014-02-01 10:22:42 -05:00
Matthias Clasen
fee9194ade GIcon: Convert docs to markdown 2014-02-01 10:22:42 -05:00
Matthias Clasen
192ddc0792 GDBusProxy: Convert docs to markdown 2014-02-01 10:22:42 -05:00
Matthias Clasen
54578e4c34 GMenuModel: Convert docs to markdown 2014-02-01 10:22:42 -05:00
Matthias Clasen
4a1710862d GSimpleProxyResolver: convert docs to markdown 2014-02-01 10:22:42 -05:00
Matthias Clasen
d7b9f20990 GSocketClient: convert docs to markdown 2014-02-01 10:22:42 -05:00
Matthias Clasen
ba307a0c52 GTask: convert long desc to markdown
Use markdown sections and lists here.
2014-02-01 10:22:42 -05:00
Dan Winship
ed2bb95330 gio/tests/network-address: fix for systems with large ifindexes
In some virtualization setups, ifindexes can end up becoming very
large, and so the existing code that assumes that *some* interface
must have an index less than 255 fails.

Fix this by explicitly looking for "lo" first. And then if that fails
(on Windows, or other systems where the loopback interface is not
called "lo"), try indexes up to 1024 rather than 255.

https://bugzilla.gnome.org/show_bug.cgi?id=723048
2014-02-01 13:37:07 +01:00
Dan Winship
243b264fca gnetworkmonitornetlink: filter out IPv6 LL MC changes
For some reason, IPv6 link-local multicast routing changes all the
time. GNetworkMonitorBase was already ignoring them for purposes of
emitting network-changed, but GNetworkMonitorNetlink would still
trigger a re-dump after getting one, so network-changed would end up
getting emitted anyway.
2014-02-01 13:16:28 +01:00
Matthias Clasen
cade4d6f19 Fix the docs build 2014-01-31 22:14:01 -05:00
Matthias Clasen
a4c33c6f8b Docs: Don't use the code tag 2014-01-31 22:05:04 -05:00
Matthias Clasen
17f51583a8 Docs: Convert examples to |[ ]| 2014-01-31 21:56:33 -05:00
Matthias Clasen
4d12e0d66f Docs: Don't use the emphasis tag
Most of the time, the text read just as well without the extra
boldness.
2014-01-31 20:34:33 -05:00
Matthias Clasen
64eface479 Docs: don't use the warning tag
More markup removal
2014-01-31 18:20:06 -05:00
Matthias Clasen
c575d24dfb Docs: Don't use the note tag
More markup avoidance.
2014-01-31 18:20:06 -05:00
Colin Walters
4cbee6a35b Restore executability for other files 2014-01-31 09:36:52 -05:00
Colin Walters
a7435d2e69 Restore executability on data-to-c.pl 2014-01-31 09:23:45 -05:00
Daniel Mustieles
078dbda148 Updated FSF's address 2014-01-31 14:31:55 +01:00
Matthias Clasen
fc04275a00 Docs: don't use the type tag
Just avoid explicit docbook markup.
2014-01-31 05:58:17 -05:00
Matthias Clasen
3d42934b71 Docs: don't use the structname tag
Just avoid explicit docbook markup.
2014-01-31 00:29:14 -05:00
Matthias Clasen
acfb76afe2 Docs: don't use <footnote>
It basically does not work in the HTML output.
2014-01-30 23:52:58 -05:00
Matthias Clasen
8548d16add Drop a no-longer-existing example from the docs
gapplication-example-menu.c was dropped in
0c094d6607, two years ago.
Time to remove its inclusion in the docs too.

https://bugzilla.gnome.org/show_bug.cgi?id=722973
2014-01-25 18:19:58 -05:00
Rico Tzschichholz
46e13e5d49 gio: Add missing transfer annotation to g_simple_proxy_resolver_new 2014-01-23 17:21:32 +01:00
Rico Tzschichholz
5ca9bee524 gio: Fix some header/source parameter-naming mismatches 2014-01-22 14:21:41 +01:00
Rico Tzschichholz
cd86c0243c gsubprocess: Add missing transfer annotations to get_*_pipe() 2014-01-22 14:06:10 +01:00
Ryan Lortie
829464a3c7 test default GSimpleAction activation
Test the default handling of the "activate" signal on GSimpleAction.

https://bugzilla.gnome.org/show_bug.cgi?id=722503
2014-01-21 15:15:38 -05:00
Jasper St. Pierre
ea22300620 gsettings: Fix annotations 2014-01-21 12:00:41 -05:00
Matthias Clasen
fc6d6b6e10 GAction: remove a lie
Not only was the link to GtkAction broken, it is not true.

https://bugzilla.gnome.org/show_bug.cgi?id=722591
2014-01-20 07:37:42 -05:00
Matthias Clasen
d102cf2b0f Fix the build
The thumbnail-verification test (indirectly) includes individual
headers, so define GIO_COMPILATION to make it work.
2014-01-19 08:58:28 -05:00
Marc-André Lureau
38a6ab3e0e win32: silence build warning
glocalfile.c: In function 'g_local_file_measure_size_of_file':
glocalfile.c:2654:3: warning: passing argument 2 of 'g_lstat' from
incompatible pointer type [enabled by default]
   if (g_lstat (name->data, &buf) != 0)
   ^
In file included from glocalfile.c:68:0:
../glib/gstdio.h:135:5: note: expected 'struct GStatBuf *' but argument
is of type 'struct _stati64 *'

https://bugzilla.gnome.org/show_bug.cgi?id=711547
2014-01-19 08:28:31 -05:00
Marc-André Lureau
a8f58fcfec win32: silence build warning
gdbusauthmechanismexternal.c: In function 'mechanism_client_initiate':
gdbusauthmechanismexternal.c:355:3: warning: 'initial_response' may be
used uninitialized in this function [-Wmaybe-uninitialized]
   return initial_response;
   ^
gdbusauthmechanismexternal.c:332:10: note: 'initial_response' was
declared here

https://bugzilla.gnome.org/show_bug.cgi?id=711547
2014-01-19 08:26:47 -05:00
Marc-André Lureau
2873b3c20c win32: silence build warning
glocalfileinfo.c: In function '_g_local_file_info_get':
glocalfileinfo.c:1955:11: warning: passing argument 3 of
'get_thumbnail_attributes' from incompatible pointer type [enabled by
default]
           get_thumbnail_attributes (path, info, &statbuf);
           ^
glocalfileinfo.c:1285:1: note: expected 'const struct GStatBuf *' but
argument is of type 'struct _stati64 *'
 get_thumbnail_attributes (const char     *path,

https://bugzilla.gnome.org/show_bug.cgi?id=711547
2014-01-19 08:25:33 -05:00
Ryan Lortie
9e81c07ad6 GSimpleAction: fix mistake in last commit
Some bad copy-paste happening here...
2014-01-18 14:27:26 -05:00
Ryan Lortie
1ec71144fb GSimpleAction: add default activate handler
If the action is stateful and the user doesn't have their own activate handler
then do some reasonable things for ourselves.

After a lot of experience using stateful GSimpleAction it turns out that
people almost always end up using it in the same ways:

A boolean-typed stateful action with no parameter is most likely going
to want to be toggled.  Any other type of action that has the parameter
type equal to the state type probably intends for activation to
represent a request to change the state.

This patch implements those two cases.  This will let people stop
writing their own trivial handlers over and over.

https://bugzilla.gnome.org/show_bug.cgi?id=722503
2014-01-18 14:19:37 -05:00
Ryan Lortie
e5f91951a1 GApplication: change commandline encoding policy
Clarify in the documentation that the commandline arguments passed
around by GApplication (to local_command_line and returned via
g_application_command_line_get_arguments()) are in the GLib filename
encoding (ie: UTF-8) on Windows, not the system code page.

Fix the mismatch that would result from having argv passed to
g_application_run() in main() on Windows (where it is in the system
code page) by ignoring argc/argv on Windows and calling
g_win32_get_command_line() for ourselves.  Document this.

This might be a slight API break on Windows: we documented that it was
possible to call g_application_run() with arguments other than argc/argv
and now doing that will result in those arguments being ignored.  It has
always been recommended practice to only call g_application_run() from
main() directly, however, and all of our code examples have shown only
this.  We will see if this causes any issues and consider reevaluating
the situation if so.

https://bugzilla.gnome.org/show_bug.cgi?id=722025
2014-01-17 20:06:37 -05:00
Ryan Lortie
643f2b348d g_file_new_for_commandline_arg: clarify encoding
Add a note to the documentation for g_file_new_for_commandline_arg()
that this function is intended to operate on strings already in the GLib
filename encoding on Windows.

This has been the case for a long time, but this documents the
requirement.

https://bugzilla.gnome.org/show_bug.cgi?id=722025
2014-01-17 20:05:41 -05:00
Marc-André Lureau
d3c729bf0e gio: fix small memory leak on local xattr
g_strconcat() allocates memory, it needs to be freed.

==10653== 1,400 bytes in 50 blocks are definitely lost in loss record
1,838 of 1,851
==10653==    at 0x4A0645D: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==10653==    by 0x54ACB22: g_malloc (gmem.c:102)
==10653==    by 0x54ACE4D: g_malloc_n (gmem.c:343)
==10653==    by 0x54C8463: g_strconcat (gstrfuncs.c:589)
==10653==    by 0x4D6ED38: get_xattrs_from_fd (glocalfileinfo.c:660)
==10653==    by 0x4D71622:
_g_local_file_info_get_from_fd (glocalfileinfo.c:2028)
==10653==    by 0x4D731A0:
g_local_file_input_stream_query_info (glocalfileinputstream.c:356)
==10653==    by 0x4C996D8:
g_file_input_stream_query_info (gfileinputstream.c:148)
==10653==    by 0x4C863F6: file_copy_fallback (gfile.c:3120)
==10653==    by 0x4C86DD2: g_file_copy (gfile.c:3398)

https://bugzilla.gnome.org/show_bug.cgi?id=722357
2014-01-16 20:27:26 -05:00
Jasper St. Pierre
c4934c9358 Update .gitignore 2014-01-15 10:37:59 -05:00
Ryan Lortie
bcd276c2b4 more distcheck fixes 2014-01-13 17:23:22 -05:00
Ryan Lortie
4130118a72 giomodule test: fix again
The compiled modules will be in the G_TEST_BUILT directory, not _DIST.
2014-01-13 16:12:31 -05:00
Ryan Lortie
186965fc9b giomodule test: force shared library build
http://lists.gnu.org/archive/html/bug-libtool/2013-05/msg00009.html hit
us again.  libtool only builds .so files if we install the library, so
force it to build for our testcase, even if we don't install it.
2014-01-13 15:31:38 -05:00
Rico Tzschichholz
60cca82c9d gdesktopinfo: Fix typo in "Since" annotation of has_key 2014-01-13 12:33:35 +01:00
Ryan Lortie
d3017967d8 GApplication: allow handles_commandline and service
The default local_command_line handler has a fast return path for the
case that we handle the commandline by forwarding it to the primary
instance, but this doesn't account for the fact that we may want to
become a service.

Allow for this by making sure we don't take the fast path of the service
flag is set.
2014-01-10 11:17:44 -05:00
Ryan Lortie
e8b7dd32fc GApplication: add --gapplication-service switch
Add a --gapplication-service switch to the default implementation of
local_command_line.  This name is unlikely to clash with any option used
by an existing application.

When a normal application (neither service nor launcher) is launched with
exactly this one argument, G_APPLICATION_IS_SERVICE will be set.

The idea is that people will write their D-Bus service file with
--gapplication-service on the Exec line.  This provides a nice
compromise for people who want the benefits of DBusActivatable
applications but without losing the ability to easily run them directly
(under the debugger or inside jhbuild, etc.)

https://bugzilla.gnome.org/show_bug.cgi?id=710965
2014-01-09 16:15:53 -05:00
Ryan Lortie
8bc63b0ef0 gdbus-introspection test: test escaping attributes
Make sure attribute values are properly escaped in generated XML.

https://bugzilla.gnome.org/show_bug.cgi?id=721796
2014-01-08 22:58:06 -05:00
Ryan Lortie
04ee782486 gdbus: properly escape introspection annotations
Make sure we escape any special characters that are found in annotation
names or values to avoid emitting a malformed XML document in response
to an Introspect call.

https://bugzilla.gnome.org/show_bug.cgi?id=721796
2014-01-08 22:58:06 -05:00
Matthias Clasen
3872049445 Add includes to all gio docs 2014-01-07 22:55:43 -05:00
Chun-wei Fan
589aed9383 gio/tests/giomodule.c: Use G_MODULE_SUFFIX
The file extension of the GIO module could be something other than .so,
depending on platform.  Use G_MODULE_SUFFIX so that the test will run
correctly on non-*nix platforms, such as Windows.

https://bugzilla.gnome.org/show_bug.cgi?id=719344
2014-01-04 10:44:17 +08:00
Matthias Clasen
2b289cc565 Fix make install with --disable-installed-tests
If installed tests are not enabled, installed_testdir is not
defined, so we end up trying to create /modules and to chmod
things in /x-content/, which is not right.
2014-01-02 13:36:37 -05:00
Ryan Lortie
c09cfc1c8a GFile: fix uninitialised variable
clang cause the fact that some of our 'goto out;' cases cause use to try
and free an uninitialised GString.  Fix that up.
2014-01-02 12:54:12 -05:00
Ryan Lortie
51b3dd7332 GDBusConnection: don't write to stdout
When losing the D-Bus connection, we would write to stdout about it just
before killing ourselves with SIGTERM.  We're a library, so we should
probably use stderr instead.

https://bugzilla.gnome.org/show_bug.cgi?id=721324
2014-01-02 10:08:55 -05:00
Ryan Lortie
8976175ba9 gsettings: tweak test for last commit
The last commit changed the behaviour of child objects of delayed
GSettings.  Adjust the testcase accordingly.
2014-01-02 01:55:07 -05:00
Ryan Lortie
c7636ce64b g_settings_get_child(): inherit backend
Part of the purpose of g_settings_get_child() was that it could be used
after you delay() a GSettings object, and then apply() all of the
settings together.  In order for that to work, we need to share the
backend.

https://bugzilla.gnome.org/show_bug.cgi?id=720891
2014-01-02 01:50:40 -05:00
Matthias Clasen
11ddb843b9 Make /contenttype/tree test work installed
The x-content/win32-software type is only recognized if
the autorun.exe file is executable. Since the file is installed
as data, we need to fix up its permissions in an
install-data-hook.
2014-01-01 22:30:24 -05:00
Matthias Clasen
dba1ae12a8 Avoid a compiler warning 2014-01-01 22:01:15 -05:00
Colin Walters
97d9138f6c gio/tests: Fix usage of BUILT_SOURCES 2014-01-01 19:05:34 -05:00
Matthias Clasen
680c348bb4 Add missing includes
config.h needs to be included in every source file, first.
2014-01-01 17:59:21 -05:00
Matthias Clasen
2299bcd88d Improve GResourceFile test coverage 2014-01-01 17:59:21 -05:00
Matthias Clasen
3eeeb7aaa7 Improve gsettings test coverage 2014-01-01 17:59:21 -05:00
Matthias Clasen
1041fc2190 Improve gdbus test coverage 2014-01-01 17:59:21 -05:00
Matthias Clasen
df3ac947ac Improve converter test coverage 2014-01-01 17:59:21 -05:00
Matthias Clasen
354ae1d61c Add tests for remote actions
This improves the GApplication test coverage.
2014-01-01 17:59:21 -05:00
Matthias Clasen
8aeb391a77 Improve GIOModule test coverage
Add a dedicated test for GIOModule.
2014-01-01 17:59:21 -05:00
Matthias Clasen
7bea4bd89a Correct a doc comment 2014-01-01 17:59:21 -05:00
Matthias Clasen
5bcbb98f45 GIOModule: Add some more details to the docs 2014-01-01 17:59:21 -05:00
Matthias Clasen
0356d7f4c3 Fix a typo in a comment
The D-Bus interface is org.freedesktop.DBus.Peer, not
org.freedesktop.DBus.
2014-01-01 17:59:21 -05:00
Matthias Clasen
b5ba22f163 Add a generic property test
This test is inspired by its namesake in GTK+. We instantiate
all types, and check the default values of their properties,
with some exceptions for types that are known not to work.
2014-01-01 17:59:21 -05:00
Matthias Clasen
290b46cd24 GTlsPassword: Make declared defaults match
String properties typically start out with a value of NULL.
No reason to deviate from that convention here.
2014-01-01 17:59:20 -05:00
Matthias Clasen
3a37e403e6 Make GFileIcon more robust
No reason not to survive g_object_unref (g_object_new (...))
2014-01-01 17:59:20 -05:00
Matthias Clasen
34de9189f6 Make GEmblem more robust
No reason not to survive g_object_unref (g_object_new (...)).
2014-01-01 17:59:20 -05:00
Matthias Clasen
62b28546af Trivial formatting fixes 2014-01-01 17:59:20 -05:00
Matthias Clasen
6c75ba2b90 Add tests for x-content type sniffing
This test exercises the tree matching parts of gcontenttype.c
2014-01-01 17:59:20 -05:00
Matthias Clasen
159459bc2d Simplify fileattributematcher tests a bit
Just use assertions instead of pretty-printed error messages.
2014-01-01 17:59:20 -05:00
Matthias Clasen
3bbfd90880 Improve GApplicationCommandline test coverage
Add tests for many GApplicationCommandline apis to the
existing application tests.
2014-01-01 17:59:20 -05:00
Matthias Clasen
7846d6154a Improve GSubprocess test coverage
Test the synchronous communicate functions.
2014-01-01 17:59:20 -05:00
Matthias Clasen
e021bb9101 Improve GInitable test coverage
This just adds a bit more variety to the uses of GInitiable
in other tests.
2014-01-01 17:59:20 -05:00
Jasper St. Pierre
0c87f71521 codegen: direction defaults to "in" 2013-12-31 15:39:02 -05:00
Antoine Jacoutot
fb21c8eaab kqueue: fix a potential deadlock
In case an object is already monitored, we lock then return without
unlocking it which can then result in a self deadlock. So properly
unlock before returning.

https://bugzilla.gnome.org/show_bug.cgi?id=721074
2013-12-26 19:57:44 +01:00
Morten Welinder
c26c557908 gsubprocesslauncher: Use "env" instead of "environ"
The latter may come from system headers.

https://bugzilla.gnome.org/show_bug.cgi?id=721059
2013-12-26 07:37:17 -05:00
Matthias Scheler
091e466095 gio: Fix return of value from void function
https://bugzilla.gnome.org/show_bug.cgi?id=721034
2013-12-25 13:57:56 -05:00
Ryan Lortie
ee5dab6bb5 gdbus tool: print GVariant errors in context
Use g_variant_parse_error_print_context() to format the error message
from the GVariant parser.

There is a slightly dubious interaction with the "parse me harder"
functionality here.  We're probably going to have to deal with that
separately.

https://bugzilla.gnome.org/show_bug.cgi?id=715028
2013-12-22 11:41:45 -05:00
Ryan Lortie
94a89f6c2f gapplication(1): print GVariant errors in context
Use g_variant_parse_error_print_context() to format the error message
from the GVariant parser.

https://bugzilla.gnome.org/show_bug.cgi?id=715028
2013-12-22 11:41:44 -05:00
Ryan Lortie
420f90d849 gsettings tool: print GVariant errors in context
Use g_variant_parse_error_print_context() to format the error message
from the GVariant parser.

https://bugzilla.gnome.org/show_bug.cgi?id=715028
2013-12-22 11:41:43 -05:00
Ryan Lortie
3f41e49285 Use POSIX-specified <poll.h> over <sys/poll.h>
POSIX specifies that <poll.h> is the correct header to include for
poll(), so let's do that instead.

https://bugzilla.gnome.org/show_bug.cgi?id=141251
2013-12-22 11:33:07 -05:00
Matthias Clasen
864d960d75 More settings backend tests
This adds some more test coverage around writability changes
in the keyfile and delayed settings backends.
2013-12-22 00:44:56 -05:00
Matthias Clasen
41a8296e11 GKeyfileSettingsBackend: Use a directory monitor
GKeyfileSettingsBackend was using a file monitor to monitor
the parent directory of its keyfile.
2013-12-22 00:43:44 -05:00
Matthias Clasen
3c873e7617 More test coverage for settings backends 2013-12-21 16:49:52 -05:00
Matthias Clasen
dac1ad66eb Improve gsettings test coverage
Deal with corner cases around delay.
2013-12-21 13:22:00 -05:00
Matthias Clasen
fc828c4de8 contenttype tests: better assertions
I recently had to track down why these tests failed. Turned
out that some rogue package on my system had installed mime
types that declared all files with 3 letter names to be
'chemical/x-turbomole-vibrational'.
This change will make it more obvious what is going on by
mentioning the mime types in the assertion message.
2013-12-21 13:22:00 -05:00