GNOME Bugzilla – Bug 558619
PolicyKit helper: make it possible to set a specific value with a dbus API
Last modified: 2009-05-06 03:39:51 UTC
Right now, the PK helper is only able to copy some keys from a user gconf db to the system gconf db. That's nice, but there are cases (like bug 512494) where we might want to set a system value without changing the user value. It turns out we can reuse some serialization functions done for ORBit2 to achieve that easily. Here's a patch. Note that it moves gconf_value_encode/decode to public headers, so it's now public API.
Created attachment 121703 [details] [review] Patch I couldn't test the patch so far, though (I wanted to test it with gconf-editor, but something else in gconf-editor is not working at the moment)
Created attachment 121732 [details] [review] Updated patch There was a typo in the patch (it was always setting mandatory settings). Seems to work okay after some really basic testing. Any opinion?
I'm not a GConf maintainer, but the patch seems pretty straightforward to me, as most of the code is similar to the already existing do_copy (). Just two nitpicks: - you seem to mix spaces and tabs; GConf uses 8-spaces tabs for indentation. - the "/* check privileges for each include */" comment in do_set_value () is probably a c/p leftover from do_copy (), because you don't have any includes but only one path.
Looks good to me, with the minor fixes pointed out by Cosimo. Unfortunately, we are already in api freeze, so I guess we should hold off until we are unfrozen.