summaryrefslogtreecommitdiff
path: root/bin/dconf.vala
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2011-09-11 12:44:36 -0400
committerRyan Lortie <desrt@desrt.ca>2011-09-11 12:44:36 -0400
commit83e61fdbe0b71bc20c82789b56c48e6dcd44981a (patch)
tree1493eeb8cf53739d4ea657a52308d80776b62be9 /bin/dconf.vala
parent8f9f2b5ebd55164985c8330d33d0f8269da4a1c8 (diff)
downloaddconf-83e61fdbe0b71bc20c82789b56c48e6dcd44981a.tar.gz
Remove 'set lock' support from dconf
The dconf service can not presently be run at the system level and it doesn't make sense to support locks on user-level databases. It also became clear that most distributors and sysadmins would rather work directly with text files anyway, so we supported that directly instead. For this reason, 'set lock' support has never been properly implemented. All the plumbing was added for it though, which means we have it appearing on the API of the client library and documented in the help of the commandline tool. This is misleading, since these functions do nothing at all (and actually contain bugs anyway since their do-nothingness was never actually tested). For now, we rip out these functions. We can add them back later if we decide to support this properly.
Diffstat (limited to 'bin/dconf.vala')
-rw-r--r--bin/dconf.vala32
1 files changed, 0 insertions, 32 deletions
diff --git a/bin/dconf.vala b/bin/dconf.vala
index 6c63bd1..a25b489 100644
--- a/bin/dconf.vala
+++ b/bin/dconf.vala
@@ -59,16 +59,6 @@ void show_help (bool requested, string? command) {
synopsis = "";
break;
- case "lock":
- description = "Set a lock on a path";
- synopsis = "PATH";
- break;
-
- case "unlock":
- description = "Clear a lock on a path";
- synopsis = "PATH";
- break;
-
case "watch":
description = "Watch a path for key changes";
synopsis = "PATH";
@@ -102,8 +92,6 @@ Commands:
write Change the value of a key
reset Reset the value of a key or dir
update Update the system databases
- lock Set a lock on a path
- unlock Clear a lock on a path
watch Watch a path for changes
Use 'dconf help COMMAND' to get detailed help.
@@ -207,24 +195,6 @@ void dconf_reset (string?[] args) throws Error {
client.write (path, null);
}
-void dconf_lock (string?[] args) throws Error {
- var client = new DConf.Client ();
- var key = args[2];
-
- DConf.verify_key (key);
-
- client.set_locked (key, true);
-}
-
-void dconf_unlock (string?[] args) throws Error {
- var client = new DConf.Client ();
- var key = args[2];
-
- DConf.verify_key (key);
-
- client.set_locked (key, false);
-}
-
void show_path (DConf.Client client, string path) {
if (DConf.is_key (path)) {
var value = client.read (path);
@@ -311,8 +281,6 @@ int main (string[] args) {
CommandMapping ("write", dconf_write),
CommandMapping ("reset", dconf_reset),
CommandMapping ("update", dconf_update),
- CommandMapping ("lock", dconf_lock),
- CommandMapping ("unlock", dconf_unlock),
CommandMapping ("watch", dconf_watch),
CommandMapping ("dump", dconf_dump),
CommandMapping ("load", dconf_load),