Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2007-09-17 14:28:21 (GMT)
committer Marco Pesenti Gritti <mpg@redhat.com>2007-09-17 14:28:21 (GMT)
commit2536f515701524b4a538ae98ec0ab580e97e8b40 (patch)
tree298d2fb633303cb2ca373c7da606b8eb164ffa25 /sugar
parented227339414ebb2692759a2096ef43c018e48068 (diff)
Use nick name consistently in the profile
Diffstat (limited to 'sugar')
-rw-r--r--sugar/profile.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/sugar/profile.py b/sugar/profile.py
index c92f8b7..112d19c 100644
--- a/sugar/profile.py
+++ b/sugar/profile.py
@@ -58,7 +58,7 @@ class Profile(object):
privkey_hash -- SHA has of the child's public key
"""
def __init__(self, path):
- self.name = None
+ self.nick_name = None
self.color = None
self.pubkey = None
self.privkey_hash = None
@@ -73,7 +73,7 @@ class Profile(object):
self._hash_private_key()
def is_valid(self):
- return self.name is not None and \
+ return self.nick_name is not None and \
self.color is not None and \
self.pubkey is not None and \
self.privkey_hash is not None
@@ -82,8 +82,8 @@ class Profile(object):
cp = ConfigParser()
parsed = cp.read([self._config_path])
- if self.name:
- _set_key(cp, 'Buddy', 'NickName', self.name)
+ if self.nick_name:
+ _set_key(cp, 'Buddy', 'NickName', self.nick_name)
if self.color:
_set_key(cp, 'Buddy', 'Color', self.color.to_string())
if self.backup1:
@@ -104,7 +104,7 @@ class Profile(object):
if cp.has_option('Buddy', 'NickName'):
name = cp.get('Buddy', 'NickName')
# decode nickname from ascii-safe chars to unicode
- self.name = name.decode("utf-8")
+ self.nick_name = name.decode("utf-8")
if cp.has_option('Buddy', 'Color'):
self.color = XoColor(cp.get('Buddy', 'Color'))
if cp.has_option('Jabber', 'Server'):
@@ -179,8 +179,8 @@ def get_profile():
# Convenience methods for frequently used properties
-def get_name():
- return get_profile().name
+def get_nick_name():
+ return get_profile().nick_name
def get_color():
return get_profile().color