diff --git a/shell/model/Owner.py b/shell/model/Owner.py index 49aed353..b06b3915 100644 --- a/shell/model/Owner.py +++ b/shell/model/Owner.py @@ -46,7 +46,7 @@ class ShellOwner(gobject.GObject): def __init__(self): gobject.GObject.__init__(self) - self._nick = profile.get_name() + self._nick = profile.get_nick_name() self._icon = None self._icon_hash = "" diff --git a/shell/view/home/FriendsBox.py b/shell/view/home/FriendsBox.py index b5519dfa..9a9ca9b3 100644 --- a/shell/view/home/FriendsBox.py +++ b/shell/view/home/FriendsBox.py @@ -41,7 +41,7 @@ class FriendsBox(hippo.CanvasBox): self._owner_icon = CanvasIcon(icon_name='computer-xo', cache=True, xo_color=profile.get_color()) self._owner_icon.props.size = style.LARGE_ICON_SIZE - palette = Palette(profile.get_name()) + palette = Palette(profile.get_nick_name()) self._owner_icon.set_palette(palette) self._layout.add_center(self._owner_icon) diff --git a/shell/view/home/HomeBox.py b/shell/view/home/HomeBox.py index 4cf688bb..82fa083d 100644 --- a/shell/view/home/HomeBox.py +++ b/shell/view/home/HomeBox.py @@ -149,7 +149,7 @@ class HomeMyIcon(MyIcon): self._shell = shell def enable_palette(self): - palette = Palette(profile.get_name()) + palette = Palette(profile.get_nick_name()) reboot_menu_item = gtk.MenuItem(_('Reboot')) reboot_menu_item.connect('activate', self._reboot_activate_cb) diff --git a/sugar/profile.py b/sugar/profile.py index c92f8b7d..112d19c8 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