Ryan Lortie
123699465d
GSettings: add g_settings_list_keys()
...
Second half of bug #622554 .
2010-06-24 02:17:34 -04:00
Matthias Clasen
13ac216ca3
GIO doc cleanups
2010-06-23 09:25:30 -04:00
Matthias Clasen
2c5e1d5193
Fix a typo
2010-06-17 15:08:37 -04:00
Ryan Lortie
6c3ae976e6
Bug 621266 - GSettings "context" clarification
...
Remove the concept of "context" in favour of dealing with
GSettingsBackend directly.
2010-06-17 14:05:40 -04:00
Ryan Lortie
e7cd94a481
More GSettings doc fixups
2010-06-17 08:57:19 -04:00
Ryan Lortie
92375a8c8e
<alias> takes mandatory target='' arg
2010-06-17 08:08:28 -04:00
Ryan Lortie
d405ad8a09
GSettings: Fix comment formatting, whitespace.
2010-06-17 08:06:52 -04:00
Matthias Clasen
61af83c5b6
Add some schema examples
2010-06-17 01:38:14 -04:00
Matthias Clasen
fbf93c371a
Typo fix
2010-06-17 00:45:43 -04:00
Matthias Clasen
345a1ee31c
Update the dtd to match the schema parser
...
The aliases element was not mentioned here.
2010-06-17 00:37:49 -04:00
Ryan Lortie
f0d30e0c0c
Bug 621319 - more leaked GVariants in GSettings
...
Caught by Felix Riemann.
2010-06-16 18:36:24 -04:00
Ryan Lortie
597290d5c8
GSettings: major refactor. Add enums, range.
2010-06-16 18:17:53 -04:00
Felix Riemann
0fc60514fc
Close memory leak in GSettings
...
Fixes bug #621252 .
2010-06-11 20:38:48 +02:00
Ryan Lortie
a8b5353b14
Add g_settings_sync() and use it
2010-06-10 22:30:44 -04:00
Ryan Lortie
3a062d2e33
GSettings: store (default, options) in gvdb
...
gvdb just dropped the ability to have a separate "options" field. We
now store the options into a GVariant along with the default value.
For now, we use a small shim in GSettingsSchema in order not to touch
too much code. A more complete rewrite will follow.
This represents a change to the schema file format with another likely
to follow. glib-compile-schemas needs to be re-run after installing
this change.
2010-06-10 13:49:57 -04:00
Milan Bouchet-Valat
3682666140
Annotate GVariant and GSettings _strv() functions
...
Add GObject introspection annotations so that the length parameter is
correctly detected for g_variant_new_strv(), g_variant_get_strv() and
g_variant_dup_strv(). Also specify that it can be a NULL pointer in
g_variant_get_strv() and g_variant_dup_strv().
For g_settings_set_strv(), detect that a NULL value is allowed, meaning
empty array.
Closes bug #620384 .
Signed-off-by: Ryan Lortie <desrt@desrt.ca>
2010-06-02 19:37:30 +02:00
Ryan Lortie
b5c8496b4c
Support NULL value for g_settings_set_strv()
...
Allow easy setting of the empty array that we lost with the last patch.
2010-06-02 04:00:58 +02:00
Milan Bouchet-Valat
bf9edb5cd5
Remove length parameter for g_settings_[gs]et_strv
...
Length of the array is redundant since it's NULL-terminated. This is not
consistent with many GLib and GTK+ functions, and adds complexity with
no real gain, while these convenience functions should be kept simple.
Closes bug #620312
2010-06-02 03:54:23 +02:00
Christian Persch
41b3f6885d
Add g_dc[p]gettext, and use it in gsettings
...
Avoid using LC_MESSAGES, and just call g_d[c]gettext directly.
Bug #617004 .
2010-05-20 21:16:29 +02:00
Ryan Lortie
799e0242ae
improve thread safety in GDelayedSettingsBackend
...
- hold a lock while accessing the tree of delayed values
- use weak reference counts with the owner object to avoid doing
g_object_notify on a dead object
- dispatch the "has-unapplied" notify to the proper main context
2010-05-17 07:16:37 -04:00
Ryan Lortie
61219e2640
GSettingsBackend: make signal dispatch threadsafe
...
This commit fixes up a few race conditions in the GSettingsBackend, mostly with
respect to change notifications occuring at the same time as the last reference
count on a GSettings is dropped. With GDBus feeding us our incoming signals in
a separate thread, this is something that could easily happen.
2010-05-17 07:16:37 -04:00
Ryan Lortie
984258c662
GSettings: support emitting signals in threads
...
The thread-default context that was in effect at the time that the
GSettings was created will be used for emitting signals on that
GSettings.
2010-05-17 07:16:37 -04:00
Ryan Lortie
8e060adb2c
intern a key name instead of using strdup()
2010-05-17 07:16:37 -04:00
Matthias Clasen
e8bc8c6cbf
Document length parameter of g_settings_get/set_strv
...
This parameter was not mentioned in the doc comment, as pointed
out in bug 617767.
2010-05-08 20:14:41 -04:00
Vincent Untz
5b4189fc42
Fix binding between writability of key and sensitivity of a widget
...
We were not setting the key correctly, result in usage of invalid keys.
Bug 617788.
2010-05-06 11:15:24 -05:00
Ryan Lortie
8dddf6499e
GSettingsBackend API/ABI change
...
- add list() virtual method
- add 'default_value' flag to read() call
2010-04-28 14:41:42 -05:00
Ryan Lortie
22ce6ed82d
Add range restriction to gschema-compiler
...
Patch from Christian Persch, with minor modifications.
Bug #616102
2010-04-25 20:06:13 -05:00
Matthias Clasen
ec664445a9
Rename gschema-compile to glib-compile-schemas
...
And clean up the autofoo a bit: use an uppercase variable,
check for pkg-config, check for presence of glib-compile-schemas.
2010-04-23 17:27:26 -04:00
Javier Jardón
0fa791b29d
[gsettings] Add g_return_*_if_fail() guards
...
Reported by Christian Persch here:
https://bugzilla.gnome.org/show_bug.cgi?id=616405
2010-04-22 03:10:42 +02:00
Matthias Clasen
585a37f374
Handle NULL string properties in bindings
...
Admittely, we just handle them by failing the conversion...
2010-04-21 14:49:05 -04:00
Matthias Clasen
ccf9361490
Handle non-readable/-writable properties when binding
...
And document readability/writability requirements for binding flags.
2010-04-21 12:33:55 -04:00
Ryan Lortie
8b6d2c1fc1
remove empty initialisers { } for MSVC's sake
2010-04-20 20:14:50 -04:00
Matthias Clasen
1b61680abb
Flesh out the porting guide some more
2010-04-20 19:40:26 -04:00
Matthias Clasen
3277b77769
Document g_settings_bind_writable
2010-04-20 19:40:26 -04:00
Ryan Lortie
f5990c1aef
GSettings: bind to writablity of a key
2010-04-20 12:30:40 -04:00
Richard Hughes
890a842b26
Fix up the gtk-doc comment for the GSettings::changed signal
2010-04-20 16:14:11 +01:00
Matthias Clasen
32477d4fbf
Another shadowed variable fix
...
See bug 616154.
2010-04-19 11:49:12 -04:00
Christian Persch
dd98785e85
Rename shadowed variables
...
Bug #616154 .
2010-04-19 09:46:32 -04:00
Ryan Lortie
265ca3db9d
let binding functions return a floating GVariant
2010-04-17 01:27:00 -04:00
Ryan Lortie
a187634b29
merge GSettings
2010-04-16 23:23:40 -04:00