[Dextrose] [PATCH] Show register gconf value

Bernie Innocenti bernie at codewiz.org
Thu Feb 3 16:08:40 EST 2011


On Thu, 2011-02-03 at 13:13 -0300, Martin Abente wrote: 
> Add a new gconf show_register value in the sugar scheme. This value
> determines whether or not the Register option will be displayed at
> the buddy icon palette.
> 
> This is a request from Abhishek Singh at Nepal.

Reviewed-by: Bernie Innocenti <bernie at codewiz.org>

Martin, would you please also post this patch to sugar-devel, for the
purpose of upstreaming it? Either cc erikos or silbe...

Also, could you please check if the following patch went both upstream
and in Dextrose 2? (I'm on a plane now :-)

>From c2bb0475096a0f2ce27270c6d02a18c81118ce18 Mon Sep 17 00:00:00 2001
From: Dipankar Patro <dipankar at seeta.in>
Date: Fri, 15 Oct 2010 20:07:55 +0530
Subject: [PATCH] Removed hardcoded server url (SL #1976)
Organization: Sugar Labs Foundation
X-Subversion: sucks

Previously registration url was set hardcoded for XO device.
Modififed the code for same behavior on all devices. Register
url is taken from gconf prop. If the gconf is empty or unset,
registration url falls back to 'schoolserver'.
---
src/jarabe/desktop/schoolserver.py |    9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/jarabe/desktop/schoolserver.py
b/src/jarabe/desktop/schoolserver.py
index a05f56c..ab9b68a 100644
--- a/src/jarabe/desktop/schoolserver.py
+++ b/src/jarabe/desktop/schoolserver.py
@@ -89,9 +89,12 @@ def register_laptop(url=REGISTER_URL):
     else:
         sn = generate_serial_number()
         uuid_ = str(uuid.uuid1())
-        setting_name = '/desktop/sugar/collaboration/jabber_server'
-        jabber_server = client.get_string(setting_name)
-        store_identifiers(sn, uuid_, jabber_server)
+
+    setting_name = '/desktop/sugar/collaboration/jabber_server'
+    jabber_server = client.get_string(setting_name)
+    store_identifiers(sn, uuid_, jabber_server)
+
+    if jabber_server:
         url = 'http://' + jabber_server + ':8080/'

     nick = client.get_string('/desktop/sugar/user/nick')
-- 
1.7.4

-- 
   // Bernie Innocenti - http://codewiz.org/
 \X/  Sugar Labs       - http://sugarlabs.org/



More information about the Dextrose mailing list