s/BuddyInfo/BuddyModel
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
from sugar.presence import PresenceService
|
from sugar.presence import PresenceService
|
||||||
from sugar.canvas.IconColor import IconColor
|
from sugar.canvas.IconColor import IconColor
|
||||||
|
|
||||||
class BuddyInfo:
|
class BuddyModel:
|
||||||
def __init__(self, buddy=None):
|
def __init__(self, buddy=None):
|
||||||
if buddy:
|
if buddy:
|
||||||
self.set_name(buddy.get_name())
|
self.set_name(buddy.get_name())
|
||||||
@@ -3,7 +3,7 @@ from ConfigParser import ConfigParser
|
|||||||
|
|
||||||
import gobject
|
import gobject
|
||||||
|
|
||||||
from model.BuddyInfo import BuddyInfo
|
from model.BuddyModel import BuddyModel
|
||||||
from sugar import env
|
from sugar import env
|
||||||
|
|
||||||
class Friends(gobject.GObject):
|
class Friends(gobject.GObject):
|
||||||
@@ -31,7 +31,7 @@ class Friends(gobject.GObject):
|
|||||||
|
|
||||||
def make_friend(self, buddy):
|
def make_friend(self, buddy):
|
||||||
if not self.has_buddy(buddy):
|
if not self.has_buddy(buddy):
|
||||||
self.add_friend(BuddyInfo(buddy))
|
self.add_friend(BuddyModel(buddy))
|
||||||
self.save()
|
self.save()
|
||||||
|
|
||||||
def remove(self, buddy_info):
|
def remove(self, buddy_info):
|
||||||
@@ -47,7 +47,7 @@ class Friends(gobject.GObject):
|
|||||||
|
|
||||||
if cp.read([self._path]):
|
if cp.read([self._path]):
|
||||||
for name in cp.sections():
|
for name in cp.sections():
|
||||||
buddy = BuddyInfo()
|
buddy = BuddyModel()
|
||||||
buddy.set_name(name)
|
buddy.set_name(name)
|
||||||
buddy.set_color(cp.get(name, 'color'))
|
buddy.set_color(cp.get(name, 'color'))
|
||||||
self.add_friend(buddy)
|
self.add_friend(buddy)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
sugardir = $(pkgdatadir)/shell/model
|
sugardir = $(pkgdatadir)/shell/model
|
||||||
sugar_PYTHON = \
|
sugar_PYTHON = \
|
||||||
__init__.py \
|
__init__.py \
|
||||||
BuddyInfo.py \
|
BuddyModel.py \
|
||||||
Friends.py \
|
Friends.py \
|
||||||
Invites.py \
|
Invites.py \
|
||||||
Owner.py \
|
Owner.py \
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ from sugar.canvas.IconColor import IconColor
|
|||||||
from sugar.canvas.CanvasBox import CanvasBox
|
from sugar.canvas.CanvasBox import CanvasBox
|
||||||
from sugar.presence import PresenceService
|
from sugar.presence import PresenceService
|
||||||
from view.BuddyIcon import BuddyIcon
|
from view.BuddyIcon import BuddyIcon
|
||||||
from model.BuddyInfo import BuddyInfo
|
from model.BuddyModel import BuddyModel
|
||||||
from view.frame.MenuStrategy import MenuStrategy
|
from view.frame.MenuStrategy import MenuStrategy
|
||||||
|
|
||||||
class RightPanel(CanvasBox):
|
class RightPanel(CanvasBox):
|
||||||
@@ -25,7 +25,7 @@ class RightPanel(CanvasBox):
|
|||||||
shell.connect('activity-changed', self.__activity_changed_cb)
|
shell.connect('activity-changed', self.__activity_changed_cb)
|
||||||
|
|
||||||
def add(self, buddy):
|
def add(self, buddy):
|
||||||
icon = BuddyIcon(self._shell, self._menu_shell, BuddyInfo(buddy))
|
icon = BuddyIcon(self._shell, self._menu_shell, BuddyModel(buddy))
|
||||||
icon.set_menu_strategy(MenuStrategy())
|
icon.set_menu_strategy(MenuStrategy())
|
||||||
self.set_constraints(icon, 3, 3)
|
self.set_constraints(icon, 3, 3)
|
||||||
self.add_child(icon)
|
self.add_child(icon)
|
||||||
|
|||||||
Reference in New Issue
Block a user