Commit Graph

2912 Commits

Author SHA1 Message Date
Matthias Clasen
69d6987995 Switch to using a mainloop when waiting for connection close
GDBus heavily relies on idles for some of its cleanup operations,
and not running a mainloop leads to things not getting cleaned
up properly, which in turn leads to test failures, since the
session bus singleton does not get removed.
2012-04-04 15:02:48 -04:00
Matthias Clasen
f1d4d3a4a5 Improve GApplication tests
Make GApplication tests manage their dbus connections.
2012-04-04 15:02:48 -04:00
Matthias Clasen
a52c0a06c8 Make basic-application test more robust
This program is only used indirectly from gapplication.c in
tests, but that is no reason to let it segfault when it is
run from the commandline without arguments.
2012-04-04 15:02:48 -04:00
Matthias Clasen
9171894a59 GActionMap: correct critical warnings
These warnings were copied from GSimpleActionGroup, but the function
names were not updated. Correct that.
2012-04-04 15:02:48 -04:00
Matthias Clasen
4259587fec Add tests for action-related gapplication api 2012-04-04 15:02:48 -04:00
Matthias Clasen
8a4744f7fd Add a test for g_application_quit 2012-04-04 15:02:48 -04:00
Dan Winship
47adef84da Fix warnings caused by an ifdeffed-out test case 2012-04-04 10:47:04 -04:00
Rodrigo Moya
118c42e747 Always include G_SOCKET_FAMILY_UNIX value in GSocketFamily
This is needed because glib-mkenums doesn't handle #ifdef values in
enums, and so it needs to have all values always defined in the enum.
When not available, define the missing values to a negative value.
2012-04-04 11:39:03 +02:00
Will Thompson
f2c77ee718 g_input_stream_read[_finish]: document returning 0 on EOF
g_input_stream_read() does state that it returns 0 on end of file, but
not in the Returns: line, so it's easy to miss on a quick skim-read.

g_input_stream_read_async() documents that g_input_stream_read_finish()
returns 0 on end of file, but g_input_stream_read_finish() itself does
not.

https://bugzilla.gnome.org/show_bug.cgi?id=673174
2012-04-02 18:10:35 +01:00
Matthias Clasen
9ea9471d26 Improve GBusObjectManager test coverage 2012-04-02 09:09:10 -04:00
Antoine Jacoutot
1494544958 gresource: libelf, try pkg-config first then fall-back to AC_CHECK_LIB
On some systems gelf.h may not be stored under the top level include
directory in which case we need to add the correct include paths in
cflags by using pkg-config(1).
2012-03-31 20:22:51 +02:00
Robert Ancell
4143842eb4 Add missing allow-none annotations for function parameters.
Found using:
find . -name '*.c' | xargs grep 'or %NULL' | grep ' \* @' | grep -v '@error' | grep -v allow-none
2012-03-31 20:34:28 +11:00
Christian Persch
e3cc48f289 resources: compiler: Respect absolute paths
When a <file> already has an absolute path, use it directly instead of trying to
locate it in the --sourcedir directories.

https://bugzilla.gnome.org/show_bug.cgi?id=672541
2012-03-29 17:43:43 +02:00
Dan Winship
cbb95038cf GFileMonitor: fix docs bug 2012-03-27 12:45:27 -04:00
Bastien Nocera
9b0734a09c all: s/availible/available/ 2012-03-27 11:01:00 +02:00
Alexander Larsson
aed6d01d14 Only build actions test on unix
It depends on gdbus-sessionbus.c which only builds on unix.
2012-03-20 10:18:32 +01:00
Marco Trevisan (Treviño)
322c6e9344 GDBusConnection: Avoid dereferencing vtable for unregistered objects
https://bugzilla.gnome.org/show_bug.cgi?id=671988

Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-03-19 17:12:00 -04:00
Ryan Lortie
2afbc425eb GDBus: set no-reply flag on calls with no callback
If g_dbus_connection_call() or g_dbus_proxy_call() are given a NULL
callback then set the no-reply flag on the outgoing D-Bus message.

https://bugzilla.gnome.org/show_bug.cgi?id=672239
2012-03-19 12:41:23 -04:00
Ryan Lortie
c3125ee36d GDBusProxy: report an error instead of leaking it
GDBusProxy sets an error on a GSimpleAsyncResult and then returns
without dispatching the result for completion (and leaks the result in
the process).  Fix that.

Also add a testcase.  Unfortunately, adding the testcase uncovered
bug #672248.  We can work around that by reordering the tests.

https://bugzilla.gnome.org/show_bug.cgi?id=672249
2012-03-19 12:41:18 -04:00
Dieter Verfaillie
e2b47ae9e0 Fix out of tree build for MinGW/MSYS
When building with MinGW/MSYS with srcdir != builddir the build fails:
- to locate the generated .def files
- creating libglib-gdb.py
- creating libgobject-gdb.py

Solved this by explicitly instructing these files to be generated
in $(builddir)/...

https://bugzilla.gnome.org/show_bug.cgi?id=653167
2012-03-17 23:10:01 -04:00
Tomas Bzatek
f3fca56b7e gio: Only show mounts in /run/media/$USER
And reflect the recent changes + sync with gvfs+udisks2 rules.

https://bugzilla.gnome.org/show_bug.cgi?id=669797
2012-03-16 18:54:09 +01:00
David Zeuthen
f025c9c4f4 GDBusConnection: Don't store GCancellable in qdata
Now that we're using g_simple_async_result_set_check_cancellable() we
no longer need this terrible hack of carrying the GCancellable on the
GSimpleAsyncResult using qdata. See bug 672013 for more details.

https://bugzilla.gnome.org/show_bug.cgi?id=672013

Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-03-15 14:04:39 -04:00
Ryan Lortie
e3c7fdd7a4 GDBus: make use of reliable async cancellation
Call g_simple_async_result_set_check_cancellable() after all
GSimpleAsyncResult creation in order to take advantage of the new
reliable cancellation feature.

The guarantee of reliable cancellation fixes a bug in dbusmenu (which
was already assuming that cancellation was reliable).  See this bug:
https://bugs.launchpad.net/ubuntu/+source/libdbusmenu/+bug/953562

https://bugzilla.gnome.org/show_bug.cgi?id=672013

Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-03-15 14:01:35 -04:00
Ryan Lortie
4804094472 GSimpleAsyncResult: support reliable cancellation
Add a function g_simple_async_result_set_check_cancellable() to provide
a GCancellable that is checked for being cancelled during the call to
g_simple_async_result_propagate_error().

This gives asynchronous operation implementations an easy way to
provide reliable cancellation of those operations -- even in the case
that a positive result has occured and is pending dispatch at the time
the operation is cancelled.

https://bugzilla.gnome.org/show_bug.cgi?id=672013
2012-03-14 08:36:11 -04:00
Ryan Lortie
81aaf53567 GSocketMsgFlags: annotate as a flags
This was being incorrectly guessed as an enum.  Fix that.

https://bugzilla.gnome.org/show_bug.cgi?id=671942
2012-03-12 16:44:00 -04:00
Ryan Lortie
3fa7358487 gio-querymodules: unlink instead of writing empty cache
If there are no modules installed then the most appropriate thing is to
have no cachefile instead of an empty one.  This unbreaks the "clean
directory after 'make uninstall'" check that automake does.

https://bugzilla.gnome.org/show_bug.cgi?id=671664
2012-03-08 12:07:03 -05:00
Cosimo Cecchi
7cf50ceb85 tests: fix GAction test for headless run 2012-03-06 22:11:22 -05:00
David Zeuthen
6e8caec6d9 GUnix{Input,Output}Stream: Only release cancelable poll-fd if we allocated it
Otherwise we get criticals a'la

 GLib-GIO-CRITICAL **: g_cancellable_release_fd: assertion `cancellable->priv->fd_refcount > 0' failed

when reading/writing to certain kinds of file descriptors.

Patch reviewed by Dan Winship on IRC.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-03-05 13:00:28 -05:00
Matthias Clasen
e9c399a65b Fix distcheck 2012-03-05 06:18:24 -05:00
Michael Biebl
cc2104e87a build: Fix failure on "make distclean"
https://bugzilla.gnome.org/show_bug.cgi?id=671270
2012-03-03 21:39:35 +01:00
Ryan Lortie
a5caa564b7 GApplication: fix name unregister logic
We were attempting to unregister our ownership of our D-Bus name even in
the case that we were non-unique (ie: we didn't actually own the name).
Rework the logic a bit to prevent that: for non-unique, we leave
impl->bus_name as NULL and we only register/unregister if it is
non-NULL.
2012-03-03 11:48:12 -05:00
David Zeuthen
10fbfcf090 Add G_VOLUME_IDENTIFIER_KIND_CLASS identifier
If an application (such as Nautilus) wants to show a sidebar with
devices group into different groups such as "Devices" and "Network",
it's currently up to the application itself to do the classification
(for example by looking at the URI scheme for the activation root,
e.g. smb://).

This patch adds a new identifier G_VOLUME_IDENTIFIER_KIND_CLASS that
can be set by volume monitors and used by applications.

See https://bugzilla.gnome.org/show_bug.cgi?id=668295

Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-03-01 14:06:43 -05:00
Andoni Morales Alastruey
c5b6f774c4 gsocket: fix compilation when ENOTSOCK and WSANOTSOCK are both defined 2012-02-29 11:29:23 +01:00
David Zeuthen
7a4a973cfd GDBusConnection: Don't leak message reply in error path
This was reported in bug 670909.

https://bugzilla.gnome.org/show_bug.cgi?id=670909

Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-02-27 14:53:13 -05:00
Ryan Lortie
eeccd3866a GDBusMenuModel: plug a leak of a GHashTable 2012-02-27 14:01:10 -05:00
David King
3e7f42654f docs: Clarify how to unset a GFileInfo attribute
https://bugzilla.gnome.org/show_bug.cgi?id=592666
2012-02-26 22:22:05 -05:00
Thomas Hindoe Paaboel Andersen
4ce98d3b59 docs: g_file_new_tmp: template was renamed to tmpl 2012-02-26 07:35:12 -05:00
Jonh Wendell
abac7df573 Make some strings translatable 2012-02-25 18:58:09 -02:00
Jonh Wendell
feaf828a92 Fixed a typo 2012-02-25 10:18:40 -02:00
Daiki Ueno
21457abdcc Hide global variable for signal ID in gdbusproxy.c.
Also a similar fix for gdbusserver.c.

https://bugzilla.gnome.org/show_bug.cgi?id=670721
2012-02-23 22:19:00 -05:00
Ryan Lortie
ed51975899 GApplication: add g_application_quit()
A long requested feature; this quits the application immediately,
ignoring the hold count.

https://bugzilla.gnome.org/show_bug.cgi?id=670485
2012-02-21 01:20:39 +01:00
David King
c5f8f6f8f4 docs: Fix GTlsBackend typo GTyep → GType 2012-02-21 01:10:54 +01:00
David King
a290fff9a2 docs: Fix GTlsDatabase typos 2012-02-21 01:10:54 +01:00
David King
c490a75a18 docs: Fix GApplicationCommandLine typo 2012-02-21 01:10:54 +01:00
David King
69ecc4b496 docs: Fix define typos in GApplication 2012-02-21 01:10:54 +01:00
David King
fba11825a3 docs: Fix typo in GActionGroup 2012-02-21 01:10:54 +01:00
David King
6129a1c2d5 docs: Fix GActionGroup exporter typo 2012-02-21 01:10:54 +01:00
David King
87c76bdbb6 docs: Remove some old GMenu documentation 2012-02-21 01:10:54 +01:00
David King
83392caa72 docs: Fix typo GAsyncReady → GAsyncResult
Also GSimpleAsyncReady → GSimpleAsyncResult.
2012-02-21 01:10:54 +01:00
David King
37fd4d86ab docs: Remove mention of GFileAttributeValue
Instead mention GFileAttributeInfo.
2012-02-21 01:10:54 +01:00