Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2008-10-22 17:07:59 (GMT)
committer Simon Schampijer <simon@schampijer.de>2008-10-22 17:07:59 (GMT)
commit39f9b90244dd31f596659de32d1f7ef584f27837 (patch)
treecd366da4e863a56bcf170cd1055513b0aa19adde
parentdbf92a5dbc68fb09c7ee5ecaa8b01614007655cf (diff)
Add publish information option to control panel cli
-rw-r--r--extensions/cpsection/network/model.py23
1 files changed, 22 insertions, 1 deletions
diff --git a/extensions/cpsection/network/model.py b/extensions/cpsection/network/model.py
index 60475d3..1c50dfc 100644
--- a/extensions/cpsection/network/model.py
+++ b/extensions/cpsection/network/model.py
@@ -45,7 +45,6 @@ def set_jabber(server):
"""
client = gconf.client_get_default()
client.set_string('/desktop/sugar/collaboration/jabber_server', server)
- client.set_bool('/desktop/sugar/collaboration/jabber_registered', False)
return 1
def get_radio():
@@ -91,3 +90,25 @@ def clear_networks():
"""Clear saved passwords and network configurations.
"""
pass
+
+def get_publish_information():
+ client = gconf.client_get_default()
+ publish = client.get_bool('/desktop/sugar/collaboration/publish_gadget')
+ return publish
+
+def print_publish_information():
+ print get_publish_information()
+
+def set_publish_information(value):
+ """ If set to true, Sugar will make you searchable for
+ the other users of the Jabber server.
+ value: 0/1
+ """
+ try:
+ value = (False,True)[int(value)]
+ except:
+ raise ValueError(_("Error in specified argument use 0/1."))
+
+ client = gconf.client_get_default()
+ client.set_bool('/desktop/sugar/collaboration/publish_gadget', value)
+ return 0