Commit Graph

2102 Commits

Author SHA1 Message Date
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