Commit Graph

2397 Commits

Author SHA1 Message Date
Colin Walters
19610184c4 gdatainputstream: Add Since: tags and update gio-sections.txt
https://bugzilla.gnome.org/show_bug.cgi?id=652758
2011-06-17 08:52:23 -04:00
Colin Walters
28254a38a7 GDataInputStream: Add _utf8() variants of _read_line
These will validate the resulting line, and throw a conversion error.
In practice these will likely be used by bindings, but it's good
for even C apps too that don't want to explode if that text file
they're reading into Pango actually has invalid UTF-8.

https://bugzilla.gnome.org/show_bug.cgi?id=652758
2011-06-16 20:03:02 -04:00
Colin Walters
ff2f46a7f4 GDataInputStream: Clarify read_line() docs, mark as byte array
g_data_input_stream_read_line() and
g_data_input_stream_read_line_finish() don't do any encoding checks,
so we shouldn't call the returned value a "string" (which I'd like to
mean UTF-8).  Annotate them as byte arrays and add encoding warnings
to the docstrings.

https://bugzilla.gnome.org/show_bug.cgi?id=652758
2011-06-16 20:00:02 -04:00
Matthias Clasen
28008138c3 Silence a compiler warning 2011-06-14 21:06:17 -04:00
Matthias Clasen
b6a829c314 If dup fails don't call close() 2011-06-14 18:51:57 -04:00
Matthias Clasen
ba6e66bff1 Don't compare unsigned numbers with 0
It does not work.
2011-06-14 18:51:57 -04:00
David Zeuthen
a6d33d3a28 GDBusMessage: Optimize serializer and deserializer
... by using a switch instead of if-then-else.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-06-14 18:12:04 -04:00
Matthias Clasen
01e6cf1360 Don't do < 0 on an unsigned value
It won't work. read() returns a signed value, anyway.
2011-06-14 11:40:32 -04:00
Matthias Clasen
83d34f6309 Don't forget to free resources in an early return 2011-06-14 10:07:22 -04:00
Matthias Clasen
3dc34de0ff Avoid a deref-before-NULL-check warning 2011-06-14 10:04:06 -04:00
Matthias Clasen
339cac8fc7 Remove unneeded NULL check
We ensure 10 lines up that parameters is not NULL.
2011-06-14 09:53:26 -04:00
Matthias Clasen
cf7f50b28e Remove an unneeded NULL check
data->proxy cannot be NULL here, or we'd have crashed 10 lines up.
2011-06-14 09:50:55 -04:00
Matthias Clasen
4c63303f9f Silence an uninitialize variable warning 2011-06-14 09:44:45 -04:00
Matthias Clasen
114b9b2504 Fix up symbol lists and docs 2011-06-14 07:17:06 -04:00
Vincent Untz
b87d9405be GDesktopAppInfo: Fix declaration of g_desktop_app_info_get_nodisplay 2011-06-14 09:01:25 +02:00
Vincent Untz
86ffdf5570 GDesktopAppInfo: Add g_desktop_app_info_get_nodisplay
Necessary for rebasing gnome-menus on top of GDesktopAppInfo.

https://bugzilla.gnome.org/show_bug.cgi?id=652385
2011-06-14 08:53:48 +02:00
Colin Walters
5ec6eafb0e gdbus-codegen tests: Fix usage of top_srcddir
Based on a patch from Rico Tzschichholz.
2011-06-13 14:17:44 -04:00
Dan Winship
7412e073d1 update .gitignores 2011-06-12 16:17:30 -04:00
Murray Cumming
4db88bd6e2 gioenums.h: Remove trailing commas 2011-06-09 20:17:52 +02:00
David Zeuthen
7ff248e822 gdbus: Don't pass an unintialized GError pointer
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-06-09 13:29:58 -04:00
David Zeuthen
30dfc35392 gdbus: Add --recurse and --only-properties options
These options are useful when debugging D-Bus services and working
with bug reports.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-06-09 13:22:18 -04:00
David Zeuthen
13b93f0c48 Bug 652197 – Improper handling of double values in GDBusMessage
Matthew Bucknall pointed out

  GDBusMessage does not serialize/deserialize double values correctly
  on platforms with strict alignment constraints (in my particular
  case, ARM926EJ-S).

This was reported in

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-06-09 12:02:30 -04:00
David Zeuthen
f819aa5f17 gdbus-codegen: Fix build
See https://bugzilla.gnome.org/show_bug.cgi?id=651998 for details.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-06-09 11:53:08 -04:00
Matthias Clasen
d6b341c38c Test the previous fix
Just make one of the existing GApplication test cases use
a dash in the id.
2011-06-08 22:38:11 -04:00
Ryan Lortie
f44cd41293 GApplication: allow '-' in application ID
By converting it to _ before trying to shove it into an object path.

https://bugzilla.gnome.org/show_bug.cgi?id=652025
2011-06-08 22:21:15 -04:00
Javier Jardón
20d56289b9 gconverter: Improve cross-references 2011-06-08 16:28:16 +01:00
Dan Winship
adf70f4596 Fix export_symbols variable in gio/Makefile.am
https://bugzilla.gnome.org/show_bug.cgi?id=646608
2011-06-07 17:22:58 -04:00
Dan Winship
686f32fcc2 Fix "Since" tags on g_data_input_stream_read_upto{,_async}
https://bugzilla.gnome.org/show_bug.cgi?id=647930
2011-06-07 17:19:24 -04:00
Colin Walters
ab0e9dbfa7 Generate $module-public-headers.txt file, feed it to gtk-doc
Rather than having the gtk-doc build machinery have a list of header
files to exclude, change the GLib build to dump a list of public
header files generated from the maintained Makefile.am files for
each of glib/, gobject/, gio/.

Also, for glib, always install glib-unix.h, even on non-Unix
platforms, for the same reason we install gwin32.h even on Unix.

https://bugzilla.gnome.org/show_bug.cgi?id=651745
2011-06-07 14:18:36 -04:00
Colin Walters
003e052442 gdbus-codegen: Clean config.pyc to make distcheck happy 2011-06-07 14:17:11 -04:00
Chun-wei Fan
09c98f18fc Update gsettings utilities in GIO
Avoid C99-style variable declaration
2011-06-07 10:49:29 +08:00
Chun-wei Fan
405b4ff4f4 Update the year in the *.rc.in files
Sorry this change came a bit late...
2011-06-07 08:55:31 +08:00
Colin Walters
62072b2a04 gdbus codegen: Ensure PYTHONPATH is set correctly for srcdir != builddir
We need to pick up the Python files from the source directory, so set
PYTHONPATH.
2011-06-06 17:14:45 -04:00
Dan Winship
1eb7efce8e Fix some socket docs issues, remove unused typedefs
pointed out by Matthias
2011-06-06 10:23:34 -04:00
David Zeuthen
f1e5af4e12 GDBusObject: Remove comment non-existant virtual functions
These were nuked a while ago.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-06-04 21:37:37 -04:00
Matthias Clasen
9a6529442c Fix doc syntax 2011-06-04 19:05:51 -04:00
Matthias Clasen
01f63b19f9 Fix links in gio docs 2011-06-04 18:48:19 -04:00
David Zeuthen
0b41002474 gdbus: Add a way to emit a signal
See https://bugs.freedesktop.org/show_bug.cgi?id=37890#c6 where it was
discovered that dbus-send(1) actually doesn't work (either libdbus-1's
flush implementation or dbus-send(1)'s usage of it is broken) so it's
useful to have here.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-06-04 12:36:38 -04:00
Matthias Clasen
87dc08ee4d Distcheck fixes
Fix VPATH builds.
2011-06-04 10:46:38 -04:00
Matthias Clasen
1aa348c14c Distcheck fixes
Accidentally committed debug leftover.
2011-06-04 10:45:54 -04:00
David Zeuthen
6d54505b2d Fix docs for D-Bus introspection data structures
Mark structs as boxed types and use /*< public >*/ so the struct
members are properly shown.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-06-03 14:39:04 -04:00
David Zeuthen
723adbc2fe Move gdbus-codegen example code and docs into separate directories
This avoids the generated types (e.g. ExampleAnimal, ExampleCat,
ExampleObject and ExampleObjectManagerClient) being referenced in the
core gio docs. This was requested by Matthias.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-06-03 14:18:56 -04:00
Colin Walters
7ed328aaf0 gdbus: Avoid blocking on worker thread in connection initialization
I can't see a reason to spin until the worker thread runs, so don't.
This avoids ugly sched_yield() calls that show up in strace and
annoy me; the code is cleaner now too.

We now grab the types needed for the WebKit workaround in the
thread creation area, but only release them when the thread itself
exits.

https://bugzilla.gnome.org/show_bug.cgi?id=651650
2011-06-01 16:43:34 -04:00
Matthias Clasen
a588974561 Expand content type docs slighly 2011-05-31 19:27:04 -04:00
muralis
a84e6f982f gthreadedresolver: fix hang on g_thread_pool_push() failure
In resolve_sync function in gthreadedresolver.c, if g_thread_pool_push
fails due to thread creation failure, we are just simply appending the
data to the queue of work to do. After the failure, we might wait
indefinitely in g_cond_wait. In case of g_thread_pool_push failure,
propagate the error so that this function does not blocks forever in
case of failure.

https://bugzilla.gnome.org/show_bug.cgi?id=651034
2011-05-31 08:56:50 -04:00
Neil Roberts
2df4750ace gsocket: Fix some cases of returning error without setting *error
g_socket_shutdown and g_socket_close were calling check_socket with a
NULL error parameter so any errors wouldn't get propagated up.

https://bugzilla.gnome.org/show_bug.cgi?id=651327
2011-05-28 19:46:15 -04:00
Neil Roberts
0703dbc21f gsocket: Fix the error message for a failed g_socket_shutdown
The GError message for g_socket_shutdown was reporting that it was
"Unable to create socket" which is presumably a cut-and-paste bug.

https://bugzilla.gnome.org/show_bug.cgi?id=651327
2011-05-28 19:46:14 -04:00
Antoine Jacoutot
56c0d0f384 Fix compile warnings on OpenBSD.
https://bugzilla.gnome.org/show_bug.cgi?id=651223
2011-05-28 18:59:38 -04:00
Matthias Clasen
2fb57ff46f Quiet down the build a bit 2011-05-28 14:29:08 -04:00
Matthias Clasen
7d0eac03e9 glib-compile-schemas: write informational messages to stdout
The fact that we return 0 here makes it clear that this
is not considered an error, so it makes sense to not
write these messages to stderr.
Proposed by Antoine Jacoutot,
https://bugzilla.gnome.org/show_bug.cgi?id=650882
2011-05-27 18:30:45 -04:00
Antoine Jacoutot
77f4f5aa02 Add glib credentials support to OpenBSD.
https://bugzilla.gnome.org/show_bug.cgi?id=650885
2011-05-27 14:22:56 -04:00
David Zeuthen
25440ce014 GDBusProxy: Mention gdbus-codegen in docs
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-05-26 10:18:44 -04:00
David Zeuthen
06f5de77f0 GDBusProxy: Fix incorrect locking
Pointed out by mclasen.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-05-26 10:07:38 -04:00
David Zeuthen
c0f4a63c89 GDBusProxy: Add locking and notes/guarantees about MT safety
This was discussed in

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-05-26 09:56:14 -04:00
David Zeuthen
7e0f890e38 GDBusProxy: Fix race condition when unsubscribing from signals
This was reported in bug 651133.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-05-26 09:26:29 -04:00
Richard Hughes
9936f961ba Correct the annotation for g_file_enumerator_get_container()
We don't ref the returned object, and alex has verified the gvfs implementation.
2011-05-26 12:37:36 +01:00
David Zeuthen
ab18737ead gdbus-codegen: Properly render @param and %TRUE in generated Docbook
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-05-24 00:27:43 -04:00
David Zeuthen
263ce3042c gdbus-codegen: Handle unexpected XML tags
This was reported in bug 650874. Add tests.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-05-23 23:23:10 -04:00
Giovanni Campagna
0aae977ac1 gdbusintrospection: fix introspection of DBus Introspection structures
Correctly mark fields as arrays (requires changing gobject-introspection
to pick those).

https://bugzilla.gnome.org/show_bug.cgi?id=646635
2011-05-23 22:15:56 +02:00
Ray Strode
eabad1923e Revert "gsettings-tool: warn if setting a value fails"
This reverts commit ea57feff96.

It makes the gsettings tool fail any time it tries to set a
key to a value, that the key already has.

https://bugzilla.gnome.org/show_bug.cgi?id=641768
2011-05-23 13:40:02 -04:00
Antoine Jacoutot
ce0f7cafa1 Fix build with gcc-2.*.
https://bugzilla.gnome.org/show_bug.cgi?id=650884
2011-05-23 13:05:49 -04:00
Matthias Clasen
b5056fbaf9 Simply symbols files
The grouping in files/headers is not used anymore, and
the function attributes neither. Adapt abicheck scripts
and .def file generation rules accordingly.
2011-05-23 00:21:06 -04:00
Ryan Lortie
9793919d7b Whitespace fixes 2011-05-18 17:56:50 -04:00
Ryan Lortie
0e63b57eea GApplication: fix remote action states
Fix up remote_action_info_new_from_iter() to do its job better and use
it from all places that it's appropriate.

Closes #650236.
2011-05-18 17:53:07 -04:00
Ryan Lortie
0e10116b3b Add debug output to GApplication actions example
Enough to clearly demonstrate bug #650236.
2011-05-18 16:13:03 -04:00
Ryan Lortie
8148a3c396 Fix gsettings tool string handling
There are some bugs caused by the way that gsettings-tool currently
attempts to help the user when they leave the quotes off of a string
value that they are setting.

Simplify the code to make it more robust and add some comments about why
it should be done this way.

https://bugzilla.gnome.org/show_bug.cgi?id=649915
2011-05-17 11:58:46 -04:00
Emmanuele Bassi
b5934de456 Add gdbus autogenerated xml files to the ignore file 2011-05-16 16:10:06 +01:00
David Zeuthen
11e01802ab gdbus-codegen: Ensure that generated skeletons are MT-safe
For example, if setting a property on a skeleton from another thread
than where it was constructed, the idle handler responsible for
emitting the PropertiesChanged() signal could run immediately and
clear skeleton->priv->changed_properties_idle_source causing
g_source_unref() to be called with a NULL pointer. This race was
easily be fixed by adding a lock to the skeleton object.

In addition to fixing this race, also move the code for setting up the
idle handler to a class handler for the GObject::notify signal. This
change allows use of g_object_freeze_notify() and g_object_thaw_notify()
to perform atomic property changes from another thread than the one
that the skeleton was created in.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-05-15 12:38:24 -04:00
David Zeuthen
ae10eca116 gdbus-codegen: Use (skip) annotation on return values
This was discussed in bug 649657.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-05-13 14:24:22 -04:00
David Zeuthen
b9e3e03767 GDBusConnection: Document that sockets are frobbed into non-blocking mode
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-05-12 15:36:34 -04:00
David Zeuthen
ce77614142 gdbus-codegen: Mark members in generated class instance structs as private
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-05-11 21:16:41 -04:00
David Zeuthen
5a811135f7 Add g_dbus_method_invocation_take_error() convenience method
Similar in spirit to g_simple_async_result_take_error().

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-05-11 20:57:54 -04:00
Colin Walters
d39731724a gdbus-codegen: Fix annotation parsing
It takes 3 options.
2011-05-11 17:13:57 -04:00
Maarten Bosmans
97cd6fa2e3 gdbus-codegen: Quote substitution variables
Avoids failure if they contain spaces.

Commit message written by Colin Walters <walters@verbum.org>

https://bugzilla.gnome.org/show_bug.cgi?id=649775
2011-05-11 15:47:00 -04:00
Colin Walters
61295f87c9 gdbus-codegen: Drop dependency on argparse
This is only in Python 2.7 or as a separate module.  Use optparse
which exists since 2.3.

https://bugzilla.gnome.org/show_bug.cgi?id=649988
2011-05-11 15:39:34 -04:00
Ryan Lortie
c2a2350cc1 GSettings: fix example in the docs 2011-05-10 15:25:54 +02:00
Giovanni Campagna
53dc341b0d GDBusMethodInvocation: fix introspection annotations
In particular (transfer full), to avoid a refcounting bug and a
segmentation fault.

https://bugzilla.gnome.org/show_bug.cgi?id=646635
2011-05-09 19:04:25 +02:00
Martin Pitt
21c2291496 [gi] Add missing allow-none annotations to GDBusConnection 2011-05-08 23:07:40 +02:00
Ryan Lortie
1361ec78cd GSettings: keep resets on loss of writability
Don't drop resets from a GDelayedSettingsBackend when the writability
changes.  Resets will always succeed, even against non-writable keys and
some people (gnome-screensaver) are using them in a way that they would
want them not to be forgotten.
2011-05-07 11:45:44 +02:00
Ryan Lortie
a38c97af51 Allow NULL to be stored into GSettings trees
This is used for resets (in theory) and currently it crashes when
freeing the tree.
2011-05-07 11:45:44 +02:00
David Zeuthen
720d6ec8e4 gdbus: Add a --timeout option
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-05-06 15:27:52 -04:00
David Zeuthen
f773bd8b76 gdbus-codegen: gracefully handle property get on proxy with no cached property
This can easily happen if the owner of the remote object vanishes. Of
course, when that happens, user code is already notified (by e.g. the
notify::g-name-owner signal) so it can avoid using the proxy but
requiring that is a bit harsh. IOW, before this patch this critical
error was printed

 GLib-GIO-CRITICAL **: g_dbus_gvariant_to_gvalue: assertion `value != NULL' failed

when that happened. With this patch, we just avoid setting the GValue
so the user will get the default value for its type instead. So, for
example, if the user code is getting a GVariant property on such a
defunct proxy, then he gets a NULL back. So unless said user code
checks the return value, criticals will still be printed if the NULL
GVariant is used for anything interesting.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-05-06 10:32:42 -04:00
Dan Winship
914d10055c Add two annotations for g-i 2011-05-05 15:18:22 -04:00
Colin Walters
8932a1a7a3 GSocket: Use MSG_CMSG_CLOEXEC
This ensures received file descriptors don't leak to child processes.

https://bugzilla.gnome.org/show_bug.cgi?id=649480
2011-05-05 14:09:11 -04:00
Chun-wei Fan
9f90408e97 Update gcancellable.c for Win32
errno.h is still required for Windows in this file...
2011-05-05 13:40:38 +08:00
Matthias Clasen
5b4da74bc7 More distcheck fixes 2011-05-04 20:45:46 -04:00
Matthias Clasen
d5d4659a60 Try to fix distcheck 2011-05-04 19:44:05 -04:00
Ray Strode
c062350159 gdbus-codegen: don't assert non-negativity for unsigned values
The code generator sprinkles a few asserts in its output of the form:

g_assert (prop_id - 1 >= 0 && prop_id - 1 < %d);\n

prop_id is unsigned, though, so this generates a compiler warning for
me.

This commit changes the code to merely check for prop_id != 0 instead of
prop_id - 1 >= 0
2011-05-04 12:45:22 -04:00
Alexander Larsson
d97cbc6731 gdbus-codegen: Make sure we pass -Werror
_g_value_equal might not always be used, so mark it G_GNUC_UNUSED
to make sure we're -Werror clean.
2011-05-04 13:54:34 +02:00
David Zeuthen
1ab29b6c4a GDBusObjectManagerServer: Allow setting :connection property
.. and add a C setter to do this. Also make the C getter return a
reference since the property may be set from another thread. Also
change the constructor to _not_ take a GDBusConnection since this is
something you almost always want to do _after_ creating it. The
API/ABI break is fine as there has never been a GLib release with this
type.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-05-04 03:43:52 -04:00
Colin Walters
542215b78a Rename g_unix_pipe_flags to g_unix_open_pipe
From IRC discussion, people liked this name more.

https://bugzilla.gnome.org/show_bug.cgi?id=649322
2011-05-03 23:34:17 -04:00
Colin Walters
c078223b38 GCancellable: Use g_unix_pipe_flags with FD_CLOEXEC
The old code was creating a pipe and setting FD_CLOEXEC
non-atomically.

https://bugzilla.gnome.org/show_bug.cgi?id=649225
2011-05-03 10:14:48 -04:00
Colin Walters
ed37970a04 g_unix_set_fd_nonblocking: New API to control file descriptor blocking state
And use it in relevant places in GLib.

https://bugzilla.gnome.org/show_bug.cgi?id=649225
2011-05-03 10:14:48 -04:00
Dan Winship
e56498ee0b Fix usage of _GNU_SOURCE
_GNU_SOURCE must be defined before including any other (system)
header, so defining it in glib-unix.h (and hoping no one has included
anything else before that) is wrong. And the "#define _USE_GNU"
workaround for this problem in gnetworkingprivate.h is even wronger
(and still prone to failure anyway due to single-include guards).

Fix this by defining _GNU_SOURCE in config.h when building against
glibc. In theory this is bad because new releases of glibc may include
symbols that conflict with glib symbols, which could then cause
compile failures. However, most people only see new releases of glibc
when they upgrade their distro, at which point they also generally get
new releases of gcc, which have new warnings/errors to clean up
anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=649201
2011-05-03 07:07:41 -04:00
Colin Walters
e71fdf6b5a Drop translated g_warning/g_error
http://mail.gnome.org/archives/desktop-devel-list/2011-March/msg00069.html
2011-05-02 14:44:25 -04:00
Dan Winship
181763438a Update .gitignores 2011-05-02 09:54:15 -04:00
Matthias Clasen
f4cff2b923 Some documentation additions 2011-05-01 23:02:53 -04:00
Ryan Lortie
426e1b6159 Remove duplicate GDBusInterface declaration
It was in gdbusinterface.h but also in giotypes.h.  Remove it from the
former.
2011-04-29 17:07:28 -04:00
David Zeuthen
92aed13eb8 Update docs to take comments/suggestions from Matthias into account
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-29 13:11:22 -04:00
David Zeuthen
0e352fdb18 Merge branch 'master' into gdbus-codegen 2011-04-29 12:01:35 -04:00
Alexander Larsson
9eba49a982 GFilterInputStream: close-base-stream should not be construct-only
This is a runtime changable property (by the methods for it), must
be a cut and paste error.
2011-04-29 16:14:17 +02:00
Colin Walters
27246c615d Update gio.symbols for previous two commits 2011-04-27 13:29:07 -04:00
Colin Walters
4098ddcb06 GDesktopAppInfo: Add g_desktop_app_info_get_generic_name
Necessary for rebasing gnome-menus on top of GDesktopAppInfo.

https://bugzilla.gnome.org/show_bug.cgi?id=647967
2011-04-27 11:34:43 -04:00
Colin Walters
276e6a7be8 GDesktopAppInfo: Add g_desktop_app_info_get_categories()
This is needed to rebase gnome-menus on top of GDesktopAppInfo.

https://bugzilla.gnome.org/show_bug.cgi?id=647903
2011-04-27 11:24:37 -04:00
Murray Cumming
6dcf505346 GDBusServer: Documentation: Improvements.
Provide a fuller description and lead people away if they arrived
here just looking for a way to provide a regular D-Bus service.

https://bugzilla.gnome.org/show_bug.cgi?id=646425
2011-04-26 23:21:02 -04:00
Christian Persch
71c7e49058 Use G_SIGNAL_MUST_COLLECT for VARIANT signals
Bug #643624.
2011-04-26 22:58:02 -04:00
Matthias Clasen
122a53a9bc Fix up some harmless FALSE <> NULL confusions
Reported in bug 643134.
2011-04-26 22:51:54 -04:00
Colin Walters
2a3f7f49b4 GDesktopAppInfo: Add "filename" property for bindings
GDesktopAppInfo violates the GObject rule that your C constructors
should just be thin wrappers around g_object_new().  While GKeyFile
isn't introspctable, this patch allows from JavaScript:

var app = new Gio.DesktopAppInfo({ filename: '/path/to/foo.desktop' });

https://bugzilla.gnome.org/show_bug.cgi?id=648425
2011-04-26 15:08:54 -04:00
Colin Walters
1056f2240c Squash some uninitialized variable compiler warnings
From GCC 4.6.
2011-04-26 13:29:05 -04:00
Dan Winship
df45856bba GSimpleAsyncResult: push thread context around callback
When an old pre-thread-default-context API that takes an explicit
GMainContext wants to call a gio API, it must call
g_main_context_push_thread_default() before, and
g_main_context_pop_thread_default() after the gio call, so that the
gio method will return its result to the desired GMainContext.

But this fails for methods like g_socket_client_connect_async() that
make a chain of multiple async calls, since the pushed/popped context
will only affect the initial call.

Fix this by having GSimpleAsyncResult itself push/pop the context
around the callback invocation, so that if the callback queues another
async request, it will stay in the same context as the original one.

https://bugzilla.gnome.org/show_bug.cgi?id=646957
2011-04-26 11:32:11 -04:00
David Zeuthen
0377fe7005 gdbus-codegen: Fix typo in generated docs
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-25 10:42:50 -04:00
David Zeuthen
bbe945183b gdbus-codegen: Generate GDBusObject{,Proxy,Skeleton} subtypes
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-25 09:29:18 -04:00
Michael Terry
a330c2f19f Don't ignore SUPPORTS_STARTUP_NOTIFICATION for commandline GAppInfos
https://bugzilla.gnome.org/show_bug.cgi?id=648416
2011-04-25 08:34:13 -04:00
David Zeuthen
58eb4da5c5 Fix build broken by previous commit
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-23 19:26:56 -04:00
David Zeuthen
b5b34fa2f2 gdbus-codegen: Include docs for generated code in the GIO docs
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-23 17:43:03 -04:00
Thomas Hindoe Paaboel Andersen
f42d97b88b docs: fix typos in networking classes 2011-04-20 21:08:15 +02:00
David Zeuthen
f0eeadf306 GDBusObjectManagerServer: make export() return whether the object was removed
This is useful in conjunction with g_warn_if_fail().

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-20 11:54:24 -04:00
Dan Winship
c2f670ef49 GSocketService: clarify transfer semantics of incoming connections
The @connection parameter to the ::incoming signal is (transfer none),
so you need to ref it if you want to keep it.

https://bugzilla.gnome.org/show_bug.cgi?id=647746
2011-04-20 11:24:46 -04:00
David Zeuthen
35b6c76244 gdbus-codegen: Document the generated FOO_PEEK_BAR() and FOO_GET_BAR() macros
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-20 09:00:16 -04:00
David Zeuthen
bd5da131a2 gdbus-codegen: Generate gtk-doc section docs
This is nice to have if using gtk-doc on the generated code. We could
also generate -sections.txt and .types files but we don't do that
right now...

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-19 14:40:34 -04:00
David Zeuthen
7a1d420889 gdbus-codegen: Set nick+blurb for properties to shut up gtk-doc
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-19 13:42:28 -04:00
David Zeuthen
271af675eb gdbus-codegen: It's GDBusProxyTypeFunc, not GDBusProxyFunc
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-19 13:39:12 -04:00
David Zeuthen
1ea370a1b1 gdbus-codegen: Document the generated ObjectManagerClient structs
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-19 13:16:10 -04:00
David Zeuthen
3238a6ffe7 gdbus-codegen: Add "Returns:" blurb for generated get_proxy_type()
This was forgotten.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-19 13:10:25 -04:00
David Zeuthen
68ba1bf074 gdbus-codegen: Generate docs when generating C code
This is handy for both gtk-doc and gobject-introspection.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-18 14:23:19 -04:00
David Zeuthen
affc6f7475 GDBusObjectManagerClient: Add a GDestroyNotify to the user_data
For bindings, obviously.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-16 15:24:42 -04:00
David Zeuthen
ea742e88e3 GDBus: Add some gobject-introspection annotations for new code
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-16 14:42:21 -04:00
David Zeuthen
3cef28a2f0 gdbus-codegen: Make generated code introspectable
Specific changes

 - Use get_type(), not get_gtype() for the GType function
   - so we need to use the lower-case name type_ for properties called type
 - Don't return a function pointer, just make the function returned
   available instead
 - Add (type) annotations in constructors so g-ir-scanner detects them as such
 - Add (transfer none) annotations to property getters
 - Add (out) annotations to D-Bus method call functions

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-16 14:08:47 -04:00
David Zeuthen
2e358e12f9 gdbus-codegen: Nuke debug spew
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-15 16:36:54 -04:00
David Zeuthen
a3fa748e54 gdbus-codegen: Never emit empty PropertiesChanged signals
It's not that it's actually a bug to do so per se, strictly speaking,
it's just pointless and wasteful.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-15 16:11:43 -04:00
David Zeuthen
6bccc46d15 gdbus-codegen: Don't send out PropertiesChanged if value ends up not changing
A fairly typical pattern is to have code that does

 foo_set_bar (object, "");
 if (some_condition)
   {
     foo_set_bar (object, "yes");
   }

where some_condition is often true every time @object is updated.

With this code, bar is essentially always "yes" but because of how
gdbus-codegen works, useless PropertiesChanged events got scheduled
and sent out. With this patch, we avoid that by always keeping the
original value around and comparing it only when we deem it's time to
send out the ::PropertiesChanged signal (typically in an idle but can
be forced by the user via flush()).

Also add a test case for this.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-15 15:53:28 -04:00
Colin Walters
01602e1695 Fix some compiler warnings from gcc 4.6 2011-04-15 15:51:25 -04:00
Colin Walters
78203f3699 gapplication: Fix typo in property 2011-04-15 14:58:30 -04:00
David Zeuthen
cade3cb1da gdbus-codegen: Fix obvious bug in _g_variant_equal0() implementation
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-15 13:51:10 -04:00
David Zeuthen
e19734d6c3 gdbus-codegen: Add support for the org.freedesktop.DBus.Deprecated annotation
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-15 12:56:07 -04:00
Ryan Lortie
0f9b83dd36 GApplication: #include "gsettings.h"
Since we call g_settings_sync() from there now...
2011-04-15 09:30:24 -04:00
Ryan Lortie
631d0c3534 Merge remote-tracking branch 'gvdb/master' 2011-04-15 09:29:47 -04:00
David Zeuthen
98e6d4b0a9 gdbus-codegen: Include a blurb about the license of the generated code
More precisely, include this line

 The license of this code is the same as for the source it was derived from.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-15 08:48:21 -04:00
David Zeuthen
5f31671da0 gdbus-codegen: Use the right program name in introductory comment (again)
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-15 08:44:05 -04:00
David Zeuthen
c76a1f9905 gdbus-codegen: Use the right program name in introductory comment
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-15 08:40:52 -04:00
David Zeuthen
9e9535b45c gdbus-codegen: Add copyright / license headers
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-15 08:33:30 -04:00
David Zeuthen
febfc45fbe GDBus: Support Ugly_Case and use org.gtk.GDBus.C.Name since it's C-only
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-15 08:24:40 -04:00
Michael Kuhn
2553511f4e Bug 637561 - Crash when using G_DBUS_SERVER_FLAGS_RUN_IN_THREAD
https://bugzilla.gnome.org/show_bug.cgi?id=637561

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-15 06:05:24 -04:00
Simon McVittie
c2387ddff1 /gdbus/message-serialize-invalid test: be compatible with D-Bus 1.4.8
Older versions of libdbus would let you construct an invalid
DBusMessage, but that's a bug, which will be fixed in 1.4.8/1.5.0.
Instead, construct a valid message of the same length, then replace
substrings in the serialized blob with their invalid counterparts.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-15 06:00:16 -04:00
Kean Johnston
8b50e2f547 GLocalFile: Use _fstati64 rather than stat on Win32
We want this to get 64bit timestamps and file lenghts.
2011-04-15 10:15:04 +02:00
Matthias Clasen
a3722d0408 Slight docs rewording
Proposed by Thomas Andersen,
https://bugzilla.gnome.org/show_bug.cgi?id=647700
2011-04-14 20:41:54 -04:00
David Zeuthen
4da1824759 GResolver: Don't return duplicate addresses
... this was causing a GDBus test-case to fail so now that it is
fixed, also reenable the test case.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-14 12:46:54 -04:00
David Zeuthen
33515d4eb4 GInetAddress: add equal() method
This is needed in the fix for

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-14 12:46:46 -04:00
David Zeuthen
e38ef14e8b GDBus: If an authentication method fail, don't give up, just try the next one
This problem was reported in bug 647602.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-13 18:40:47 -04:00
David Zeuthen
3b997d92c1 GDBus: Add test case for the ANONYMOUS authentication method
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-13 18:21:16 -04:00
David Zeuthen
befb60d826 GDBus: Nuke debug spew from the ANONYMOUS authentication method
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-13 18:20:34 -04:00
David Zeuthen
25c57d31c5 GDBus: Allow tcp: and nonce-tcp: addresses without any arguments
This was broken in this commit

 http://git.gnome.org/browse/glib/commit/?id=0729260141bb585943ad1c6efa8ab7ee9058b0aa

The test case for catching this is unfortunately commented out (so it
didn't catch it) due to this bug

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

still being unresolved.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-13 17:49:19 -04:00
David Zeuthen
8826ad046d GDBusInterfaceStub: Clarify ::g-authorize-method docs
As suggested by Simon in https://bugzilla.gnome.org/show_bug.cgi?id=647577#c11

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-13 16:39:50 -04:00
David Zeuthen
6ccca55752 GDBus: Use Skeleton instead of Stub
After some brainstorming with Simon, see

 https://bugzilla.gnome.org/show_bug.cgi?id=647577#c8

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-13 16:33:51 -04:00
Colin Walters
68b16deb1f gdbusconnection: Avoid tripping assertion if we fail to authenticate twice
If g_bus_get_sync() fails in authentication (because e.g. the process
uid, doesn't match the expected in EXTERNAL), a secondary call to
g_bus_get_sync() would notice we aren't initialized, and try
to initialize.

The assertion here is just wrong; we now explicitly and clearly handle
both cases where we already have an error, or we already succeeded.

https://bugzilla.gnome.org/show_bug.cgi?id=635694
2011-04-13 15:01:28 -04:00
David Zeuthen
683943b40e GDBusInterfaceStub: Use G_VARIANT_TYPE_VARDICT when referring to type a{sv}
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-13 11:35:06 -04:00
Matthias Clasen
c1a7599568 Fix a typo in the GSettings docs
Pointed out by Thomas Andersen
https://bugzilla.gnome.org/show_bug.cgi?id=647600
2011-04-13 00:39:01 -04:00
David Zeuthen
6a4ab7c5d3 GDBus: Minor renames and doc fixes
As requested by Simon in https://bugzilla.gnome.org/show_bug.cgi?id=647577

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-12 20:15:48 -04:00
David Zeuthen
34a28f2f06 Add support for org.gtk.GDBus.Since annotation
And use this for a) documentation purposes; and b) to preserve C ABI
when an interface is extended. See

 https://bugzilla.gnome.org/show_bug.cgi?id=647577#c5

for more details. Also add test cases for this.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-12 16:17:28 -04:00
Colin Walters
bf087aabbf gsettings-tool fixes: Add missing _apply(), add unset-recursively to man page 2011-04-12 12:56:33 -04:00
Colin Walters
3fd9f2e8f9 gsettings: Implement reset-recursively
Motivation was the ability to:
$ gsettings reset-recursively org.gnome.gnome-panel

https://bugzilla.gnome.org/show_bug.cgi?id=647579
2011-04-12 12:13:43 -04:00
David Zeuthen
76d3653721 gdbus-codegen: Add --c-generate-object-manager option + doc improvements
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-12 11:50:34 -04:00
Matthias Clasen
3f7912f142 GLocalDirectoryMonitor: Improve struct packing 2011-04-12 10:02:31 -04:00
Matthias Clasen
a2094d5e56 GIOSchedulerJob: Improve struct packing 2011-04-12 10:02:12 -04:00
Matthias Clasen
bfe7548fe1 GFilenameCompleter: Improve struct packing 2011-04-12 10:01:37 -04:00
Matthias Clasen
3e4f3673d8 GFileAttributeMatcher: Improve struct packing 2011-04-12 10:01:05 -04:00
Matthias Clasen
8903ec808b GDBusProxy: Improve struct packing 2011-04-12 10:00:37 -04:00
Matthias Clasen
53e3e111fd GDBusWorker: Improve struct packing 2011-04-12 10:00:03 -04:00
David Zeuthen
8276d0e557 Spiff up the "Migrating to GDBus" docs a bit
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-12 09:28:09 -04:00
David Zeuthen
fc59b9d843 Update "Migrating to GDBus" chapter to take gdbus-codegen(1) into account
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-11 18:32:11 -04:00
David Zeuthen
e5525f1010 GDBus: Add ObjectManager example
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-11 16:35:14 -04:00
David Zeuthen
24533f2619 Also use interface_ instead of interface in C files
This is because gtk-doc scans the function in the H file but reads the
docs from the C file. Annoying.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-11 15:34:38 -04:00
David Zeuthen
6cc4dc5b9b GDBusInterfaceStub: Rename stub parameter to interface
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-11 15:25:37 -04:00
David Zeuthen
4809028736 GDBus: Avoid using the word interface in public C headers
Same deal as with e.g. index since some libraries may do crazy stuff
such as "#define interface xyz".

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-11 15:24:52 -04:00
David Zeuthen
4dffec8906 Dist test-codegen.xml
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-11 14:59:19 -04:00
Matthias Clasen
3c94299b0f Don't include unistd.h unconditionally
It doesn't exist on all platforms. Partial fix for bug 647341.
2011-04-11 12:57:19 -04:00
David Zeuthen
9c1941c07f GDBus: Add test-suite for new ObjectManager and gdbus-codegen(1) code
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-11 10:54:52 -04:00
David Zeuthen
982195b61c GDBus: Use thread-default GMainContext in _g_assert_property_notify + friends
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-11 10:51:37 -04:00
Ryan Lortie
ff57ed5d6a GApplication: g_settings_sync() on exit
Call g_settings_sync() just before g_applcation_run() returns.  This is
really the correct thing to do in every case that you're using GSettings
and it prevents every single application from having to do it for
themselves.

Closes bug #647419.
2011-04-11 03:41:10 -04:00
Ryan Lortie
68aef33404 GSettings: make _sync() a no-op if uninitialised
If GSettings is uninitialised then g_settings_sync() should very
obviously just return right away (rather than attempting to initialise
GSettings first).
2011-04-11 03:39:27 -04:00
David Zeuthen
6a45180c95 Clarify docs for g_dbus_gvalue_to_gvariant() and g_dbus_gvariant_to_gvalue()
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-10 11:19:45 -04:00
Ryan Lortie
45377252db Add test case for G_APPLICATION_NON_UNIQUE 2011-04-10 07:56:06 -04:00
Ryan Lortie
9d204338f3 GApplication: add G_APPLICATION_NON_UNIQUE
Add a flag to essentially short-circuit g_application_register().  The
application makes no attempt to acquire the bus name or check for
existing instances with that name.  The application is never considered
as being 'remote' and all requests are handled locally.

Closes #646985.
2011-04-10 07:55:33 -04:00
Ryan Lortie
53389d963d GApplication: fix leaked object path
In the case that we fail to become the primary instance we should
unregister *both* object paths that we registered during our attempt.
2011-04-10 07:50:26 -04:00
David Zeuthen
01a5f19e04 Improve g_dbus_gvalue_to_gvariant() docs
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-09 17:51:59 -04:00
Dan Winship
61704dbca5 GSocket: clarify g_socket_receive documentation
g_socket_receive* return 0 if the connection is closed.

https://bugzilla.gnome.org/show_bug.cgi?id=643074
2011-04-09 12:54:15 -04:00
Dan Winship
ea57feff96 gsettings-tool: warn if setting a value fails
eg, if the dconf backend cannot connect to dbus

https://bugzilla.gnome.org/show_bug.cgi?id=641768
2011-04-09 12:45:16 -04:00
David Zeuthen
1d781ba3be GDBus: Document GVariant/GValue conversion routines and move to them to utils
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-09 11:47:34 -04:00
David Zeuthen
88ab35f3cb Add a generic libffi based marshaller to libgobject
This code is from https://bugzilla.gnome.org/show_bug.cgi?id=567087
and was adapted by myself to also support the GVariant fundamental
type.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-08 17:34:44 -04:00
David Zeuthen
0b9229beca Add gdbus-codegen(1) command
It doesn't work yet without the user manually adding ffi bits. That's
the topic of the next commit.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-08 17:11:38 -04:00
Matthias Clasen
1a0424b7ff Fix another faulty GApplicationCommandline example
Several flaws were pointed out by Shaun McCance. We were
leaking handled arguments, and we were mishandling the last
argument, and we were actually skipping arguments too.

https://bugzilla.gnome.org/show_bug.cgi?id=647031
2011-04-08 17:02:01 -04:00
David Zeuthen
ac93a6af88 Add "Since: 2.30" for new D-Bus routines
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-08 16:29:48 -04:00
David Zeuthen
1e2e58705c GDBusProxy: Store GDBusObject in private struct instead of qdata
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-08 16:12:33 -04:00
David Zeuthen
b41cf76350 GDBusProxy: Update description to match GDBusInterface
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-08 16:12:09 -04:00
David Zeuthen
94b9071344 Start merging gdbus-codegen code
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-08 15:48:28 -04:00
David Zeuthen
0729260141 Silence a bunch of -Wunused-but-set-variable warnings
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-08 15:44:25 -04:00
Ryan Lortie
23818d1e61 GSettings: remove more asserts
Same logic as the last commit on this topic, applied to the other
functions too.
2011-04-08 09:15:19 -04:00
Matthias Clasen
edaf99be86 Avoid an interaction between GApplication and GOption
When using GOption to handle commandlines, we need to disable
the builtin help handling, since it calls exit(). Also mention
this particular pitfall in the docs.
2011-04-08 07:19:38 -04:00
Ryan Lortie
3498d58289 glib-compile-schemas: check for undefined refs
For child schemas, verify that the named schema actually exists and
issue a warning if not.  This error in schema files will cause runtime
errors when iterating over the list of child schemas and attempting to
instantiate each one.

This will move from being merely a warning to a hard error in the
future.

Bug #646039.
2011-04-08 01:47:52 -04:00
Ryan Lortie
4ece333afe Don't assert on backend == settings->priv->backend
They could be different if a notification is queued for delivery and
someone calls g_settings_delay().

Bug #646843.
2011-04-07 21:25:01 -04:00
Matthias Clasen
a2e3a4d150 Add a warning to the g_dbus_connection_set_exit_on_close docs
Tell people to not leak their apps out of the session.
2011-04-07 17:15:41 -04:00
Dan Winship
784619bc3a Fix two leaks seen when using TLS connections
g_tls_certificate_list_new_from_file() was leaking the file contents,
and GSource was leaking the GSourcePrivate structure that got
created when using child sources.
2011-04-07 08:32:06 -04:00
Murray Cumming
3ac7e0a7fe Docs: Change DBus to D-Bus 2011-04-04 09:22:06 +02:00
Murray Cumming
32e26cf179 GDBusMethodInvocation: Improve get_parameters() documentation.
Note that the returned GVariant is always a tuple.
See bug #646420.
2011-04-03 09:13:15 +02:00
Ryan Lortie
131b9f98ea gio.symbols updates 2011-03-31 15:55:21 +05:30
Ryan Lortie
7a752e0817 Improve .gitignore 2011-03-31 15:51:01 +05:30
Ryan Lortie
d95b750a1d compile schemas test: open ranges for all types
We need to make sure that every value in the table actually parses with
GVariant.
2011-03-31 15:15:09 +05:30
Ryan Lortie
d2af82e820 gschema-test: invert expectation for min/max omit
It is now completely valid.

Fix up what is now a legitimate range error in the schema used in one of
the tests.
2011-03-31 15:15:09 +05:30
Ryan Lortie
cde83c8ccd glib-compile-schemas: min and max are now optional
Will be taken to be the minimum and maximum value for the type of the
key if they are left out.

Bug #646310.
2011-03-31 15:14:46 +05:30
Ryan Lortie
49fa69e05e Add 'uint' convenience functions for GSettings
Without getting into a debate about the reasons why you may or may not
want to use unsigned integers, it's sufficient to note that people have
been using them and requesting this functionality.

Bug #641755.
2011-03-31 12:47:03 +05:30
Ryan Lortie
e9ce8f2374 Add GTimeZoneMonitor
Monitors /etc/localtime for changes and instructs GTimeZone to drop its
cache.  Also has a signal for interested 3rd parties.
2011-03-31 12:47:03 +05:30
Martin Pitt
04969571bb [gi] Add missing allow-none annotations to Gio 2011-03-30 19:52:31 +02:00
Jonathan Matthew
95e7aa0e07 introspection: add annotations for g_file_load_contents and friends
https://bugzilla.gnome.org/show_bug.cgi?id=645789
2011-03-29 19:40:26 +10:00
David Zeuthen
f516ebc57b GDBusProxy: Also check signature when checking if signal is expected
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-03-28 13:04:34 -04:00
David Zeuthen
caf993df6f GDBusProxy: Drop unexpected signals
If we have an expected interface and receive a signal not mentioned in
the interface, simply drop it. This way, the application won't have to
check for the signal itself.

This was pointed out in

 https://bugzilla.gnome.org/show_bug.cgi?id=642724#c5

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-03-28 12:10:25 -04:00
Olivier Crête
aa59fb9dd1 GDBusProxy: Validate properties received from service if possible
If the proxy has an GInterfaceInfo set, validate properties against it
so the application doesn't have to do it.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-03-28 11:59:47 -04:00
David Zeuthen
b845c62c7f GDBusProxy: Make interface lookups O(1)
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-03-28 11:39:22 -04:00
David Zeuthen
91f97ebbaa GDBusConnection: Make interface lookups O(1)
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-03-28 11:39:22 -04:00
David Zeuthen
5bcf54b29c GDBus: Add mechanism to make lookup on interfaces constant-time
This is used both on the service- and client-side and is currently
O(n).

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-03-28 11:39:22 -04:00
David Zeuthen
1618ca572f Fix test suite breakage caused by Murray's commit
See https://bugzilla.gnome.org/show_bug.cgi?id=645682

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-03-25 17:56:59 -04:00
Tristan Van Berkom
a8bc1436f1 GDBusServer: move business logic from _new() function to initable_init()
https://bugzilla.gnome.org/show_bug.cgi?id=639478

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-03-24 10:08:18 -04:00
Murray Cumming
30fdc1a799 Docs: Changed can not to cannot. 2011-03-24 09:33:55 +01:00
Matthias Clasen
098aa5639c Document which files glib-compile-schemas looks at
Otherwise, your vendor override files are silently ignored...
2011-03-15 11:30:38 -04:00
Olivier Crête
c95ff4de04 GDBusProxy: Check if connection is NULL before unreffing
If no connection can be established with the bus, it is possible that
the GDBusPRoxy will be finalized without having a connection object.
2011-03-14 15:49:02 -04:00
Murray Cumming
c1a75ca783 g_file_info_get/set_attribute_string*(): Document the UTF-8ness.
* gio/gfileattribute.c: (_g_file_attribute_value_get_string,
_g_file_attribute_value_set_string): These use
G_FILE_ATTRIBUTE_TYPE_STRING, which is documented as UTF-8, so
document these private functions as using UTF-8.
* gio/gfileinfo.c: (g_file_info_get_attribute_string,
g_file_info_set_attribute_string, and stringv versions):
Document that the strings are UTF-8 because the implementation uses
those private functions, that use UTF-8.

This helps language bindings (such as glibmm) whose API
distinguishes between known and unknown encodings.
2011-03-11 09:59:09 +01:00
Matthias Clasen
fc75b2597d Improve preconditions in action-related GApplication api
https://bugzilla.gnome.org/show_bug.cgi?id=643780
2011-03-06 23:08:46 -05:00
Matthias Clasen
d377367b2c Forgotten file 2011-03-06 22:38:17 -05:00
Murray Cumming
90ad3c9962 g_application_run(): Add (allow-none) introspection annotation. 2011-03-05 14:51:55 +01:00
Matthias Clasen
3aac417fef Some more details about GApplicationFlags 2011-03-04 12:10:06 -05:00
Matthias Clasen
34ac69e688 Add more GApplication docs
Add more details about ::command-line to the g_application_run docs.
2011-03-04 12:03:15 -05:00
Murray Cumming
91614bb5fe GApplication: Check more before warning about a missing signal handler.
* gio/application.c (g_application_real_command_line): Check that the
default signal handler is not the current one before complaining, because
it is not unusual for overloads to call the base class implementation as
a matter of habit.
g_application_real_open() and g_application_real_activate() already do this
extra check.
2011-03-04 15:16:39 +01:00
Matthias Clasen
1485871ed5 GApplication: More documentation tweaks 2011-03-04 01:55:19 -05:00
Matthias Clasen
54e474931e Fix a typo 2011-03-04 01:55:18 -05:00
Matthias Clasen
6dd692d858 Small doc correction
We don't actually pass @argc to local_command_line().
2011-03-04 00:27:23 -05:00
Matthias Clasen
3c7203cf1a GApplication: Clarify docs for @argv
Clearly state that @argv may be NULL.
https://bugzilla.gnome.org/show_bug.cgi?id=643649
2011-03-04 00:12:34 -05:00
Matthias Clasen
1a6455b785 GApplication: Beef up the local_command_line() docs
This adds some details, such as the meaning of @argc, @argv and @status,
even though gtk-doc does not make it easy to document vfunc arguments.
Requested in
https://bugzilla.gnome.org/show_bug.cgi?id=643478
2011-03-04 00:03:13 -05:00
Matthias Clasen
f05bce027e GApplication: Improve documentation
This commit adds some details regarding platform data.
2011-03-03 23:34:49 -05:00
Matthias Clasen
321682871b Try harder to explain GApplicationCommandline
Trying to answer some of the questions in
https://bugzilla.gnome.org/show_bug.cgi?id=643468
2011-03-03 22:40:48 -05:00
Matthias Clasen
e3cff93408 GApplications: Tighten up application-id validity checks
Also add tests for these conditions.
https://bugzilla.gnome.org/show_bug.cgi?id=643197
2011-02-25 11:13:55 -05:00
Matthias Clasen
766d70729b Allow to list keys in all schemas
Make the schema argument to gsettings list-recursively optional.
This allows to search for not exactly known keys by going

gsettings list-recursively | grep 'font'
2011-02-23 00:18:37 -05:00
Cosimo Cecchi
51dd7c5e4a application: fix a typo in the docs annotation 2011-02-22 22:02:05 -05:00
Chun-wei Fan
7b118b0c41 Visual C++ 2010 Project Files: autotools files
These are the updates to the autotools files to
ensure the expansion of the GIO, GLib and GObject
project files (*.vcxproj, *.vcxproj.filters) and to
enable the distribution of the VS2010 project files

The actual VS2010 project files will follow shortly
2011-02-22 19:58:18 +08:00
Vincent Untz
f909469e31 appinfo: Do not override system default handler with less specific one
We were considering explicitly configured defaults for parent types
after we already got results for the specific type we're interested in.

This resulted in the explicit default for text/plain to override all
system defaults for subtypes of text/plain, for example. The explicit
default should not apply to subtypes that have a system default.

https://bugzilla.gnome.org/show_bug.cgi?id=642797
2011-02-20 16:06:40 +01:00
Tor Lillqvist
1158f9c171 Export _glib_get_locale_dir() as it is now used in gio, too 2011-02-20 01:30:51 +02:00
Matthias Clasen
73af5ab4cf Be more forgiving when parsing introspection xml
Accept (and silently ignore) version attributes on <interface>
and <method> elements - these occur in the wild, and ignoring
them does not cost us anything.
2011-02-19 16:27:51 -05:00
Lin Ma
237df47c5f Fixed bugster 7007407. Do not clear stat info until a node is really
deleted.
2011-02-17 15:07:52 +08:00
Colin Walters
a7faf0b16e gdesktopappinfo: Handle g_get_prgname() being NULL
Reported-By: Sebastien Bacher <seb128@ubuntu.com>

https://bugzilla.gnome.org/show_bug.cgi?id=642490
2011-02-16 13:49:20 -05:00
Matthias Clasen
5df049706f Don't report standard interfaces more than once
If they have a custom implementation, don't add the canned
introspection XML, just rely on the generated XML. Fixes
https://bugzilla.gnome.org/show_bug.cgi?id=642042
2011-02-15 19:50:55 -05:00
Matthias Clasen
6f87ecc14e Add a (currently failing) testcase
This testcase check that we don't report the standard interfaces
more than one in the introspection XML, see
https://bugzilla.gnome.org/show_bug.cgi?id=642042
2011-02-15 19:49:24 -05:00
Matthias Clasen
f9ad7baf31 Fix memory leaks in the gdbus introspection parser
We were getting our length zero, yet NULL-terminated arrays in
a twist in some places. Stop passing around ignored length arguments
at the same time.
https://bugzilla.gnome.org/show_bug.cgi?id=635099
2011-02-15 02:29:15 -05:00