The previous patch to simplify the GSettings commandline tool by making
more use of global variables went a bit too far and broke 'gsettings
monitor' when used without a specific key.
Fix that up again.
Stop using the recently-deprecated GSettings APIs.
Use the GSettingsSchema-based APIs instead.
This fixes a number of bugs and also a net reduction of code. In
particular, list-schemas will now work in context of a given --schemadir
argument.
https://bugzilla.gnome.org/show_bug.cgi?id=695558
The number of arguments passed to each function is about to increase, so
just use global variables instead.
This is a commandline tool, after all...
https://bugzilla.gnome.org/show_bug.cgi?id=695558
Rather than using "extern" declarations of these win32 functions
everywhere they're needed, just prototype them in glib-private.h.
(Which also fixes the fact that they weren't prototyped in the files
where they're defined.)
https://bugzilla.gnome.org/show_bug.cgi?id=688109
Very many testcases, some GLib tools (resource compiler, etc) and
GApplication were calling g_type_init().
Remove those uses, as they are no longer required.
https://bugzilla.gnome.org/show_bug.cgi?id=686161
It happens that one wants to customize settings for plugins or
shell extensions, that installing schemas in nonstandard locations.
This patch adds the --schemadir option to gsettings, and ensure
that the appropriate schema is found.
https://bugzilla.gnome.org/show_bug.cgi?id=666415
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
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'
This is similar to gconftool-2 -R, which is very handy
for collecting information for bug reports, etc. It is now
possible to say gsettings list-recursively org.foo.bar, and
this will produce a list of schemas, keys and values for
org.foo.bar and all its child and grandchild schemata,
recursively.
https://bugzilla.gnome.org/show_bug.cgi?id=632571
Provides access to the g_settings_get_range() functionality, converting
its return value to something that's reasonable for printing at the
console and potentially parseable. The format may change.
Bug #631264.
Prevent assertion messages from spewing forth and also ensure that we
exit with an error status in the event that the value was out of range.
Bug #631264.
Rewrite the GSettings tool.
Improvements/changes:
- simplify the code by performing common actions (like creating a
schema) in only one place instead of one per-command
- new features (list schemas, list keys, monitor multiple, etc)
- factor-out bash completion and implement in shellscript
- input validation: should never abort due to invalid inputs
Still to do:
- proper error checking for ranges/choices
- support for querying range/choice information
- bash completion support for enums
Closes bug #629289, possibly among others.
Fix a bug where the type from g_variant_get_type() was used after
freeing the variant. This works for base types (since they are cached
and live forever) but not for arrays (where the bug was first seen).
When no path is provided for the schema, we have call
g_settings_new() instead of g_settings_new_with_path()
passing a NULL path.
This was crashing the tool on start since an assertion was
recently added to g_settings_new_with_path() to refuse NULL.
This allows the caller to specify the reply type that they are expecting
for this call. If the reply comes back with the wrong type, GDBus will
generate an appropriate error internally.
- add a GVariantType * argument to g_dbus_connection_call() and
_call_sync().
- move the internal API for computing message types from introspection
data to be based on GVariantType instead of strings. Update users
of this code.
- have GDBusProxy pass this calculated GVariantType into
g_dbus_connection_call(). Remove the checks done in GDBusProxy.
- Update other users of the code (test cases, gdbus-tool, GSettings
tool, etc). In some cases, remove redundant checks; in some other
cases, we are fixing bugs because no checking was done where it
should have been.
Closes bug #619391.
There is currently no way (near as I can tell) to ensure that a message
has been sent when using GDBus. If we exit() before we are sure, then
it is very possible that the message isn't sent at all. This behaviour
was observed when using the GSettings commandline tool with dconf.
A quick and dirty workaround for now.