From 16574cbfccdd5a5bb8da7a8c6165a0063f5f7ce3 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Fri, 15 Sep 2006 14:41:56 +0200 Subject: [PATCH] s/FriendIcon/BuddyIcon since that is generic now --- shell/view/{FriendIcon.py => BuddyIcon.py} | 14 +++++++------- shell/view/{FriendPopup.py => BuddyPopup.py} | 6 +++--- shell/view/frame/RightPanel.py | 4 ++-- shell/view/home/FriendsGroup.py | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) rename shell/view/{FriendIcon.py => BuddyIcon.py} (88%) rename shell/view/{FriendPopup.py => BuddyPopup.py} (95%) diff --git a/shell/view/FriendIcon.py b/shell/view/BuddyIcon.py similarity index 88% rename from shell/view/FriendIcon.py rename to shell/view/BuddyIcon.py index 3e506008..1743b79b 100644 --- a/shell/view/FriendIcon.py +++ b/shell/view/BuddyIcon.py @@ -1,6 +1,6 @@ from sugar.canvas.IconItem import IconItem from sugar.canvas.Grid import Grid -from view.FriendPopup import FriendPopup +from view.BuddyPopup import BuddyPopup class _PopupShell: def __init__(self): @@ -11,7 +11,7 @@ class _PopupShell: self._popup_controller._popdown() self._popup_controller = controller -class FriendIcon(IconItem): +class BuddyIcon(IconItem): _popup_shell = _PopupShell() def __init__(self, shell, friend): @@ -42,10 +42,10 @@ class FriendIcon(IconItem): def _popup_cb(self, icon, x1, y1, x2, y2): self._popdown() - FriendIcon._popup_shell.set_active(None) + BuddyIcon._popup_shell.set_active(None) grid = self._shell.get_grid() - self._popup = FriendPopup(self._shell, icon.get_friend()) + self._popup = BuddyPopup(self._shell, icon.get_friend()) self._popup.connect('action', self._popup_action_cb) self._popup.connect('enter-notify-event', self._popup_enter_notify_event_cb) @@ -73,7 +73,7 @@ class FriendIcon(IconItem): self._popup.show() - FriendIcon._popup_shell.set_active(self) + BuddyIcon._popup_shell.set_active(self) def _popup_action_cb(self, popup, action): self._popdown() @@ -83,10 +83,10 @@ class FriendIcon(IconItem): return model = self._shell.get_model() - if action == FriendPopup.ACTION_INVITE: + if action == BuddyPopup.ACTION_INVITE: activity = model.get_current_activity() activity.invite(buddy) - elif action == FriendPopup.ACTION_MAKE_FRIEND: + elif action == BuddyPopup.ACTION_MAKE_FRIEND: friends = model.get_friends() friends.add_buddy(buddy) diff --git a/shell/view/FriendPopup.py b/shell/view/BuddyPopup.py similarity index 95% rename from shell/view/FriendPopup.py rename to shell/view/BuddyPopup.py index 5baff098..a5a04fd6 100644 --- a/shell/view/FriendPopup.py +++ b/shell/view/BuddyPopup.py @@ -6,7 +6,7 @@ from sugar.canvas.CanvasView import CanvasView from sugar.canvas.CanvasBox import CanvasBox from sugar.canvas.IconItem import IconItem -class FriendPopup(gtk.Window): +class BuddyPopup(gtk.Window): ACTION_MAKE_FRIEND = 0 ACTION_INVITE = 1 @@ -57,7 +57,7 @@ class FriendPopup(gtk.Window): icon = IconItem(icon_name='stock-make-friend') icon.connect('clicked', self._action_clicked_cb, - FriendPopup.ACTION_MAKE_FRIEND) + BuddyPopup.ACTION_MAKE_FRIEND) box.set_constraints(icon, 3, 3) box.add_child(icon) @@ -67,7 +67,7 @@ class FriendPopup(gtk.Window): icon = IconItem(icon_name='stock-invite') icon.connect('clicked', self._action_clicked_cb, - FriendPopup.ACTION_INVITE) + BuddyPopup.ACTION_INVITE) box.set_constraints(icon, 3, 3) box.add_child(icon) diff --git a/shell/view/frame/RightPanel.py b/shell/view/frame/RightPanel.py index 7a064b57..20e96222 100644 --- a/shell/view/frame/RightPanel.py +++ b/shell/view/frame/RightPanel.py @@ -4,7 +4,7 @@ from sugar.canvas.IconItem import IconItem from sugar.canvas.IconColor import IconColor from sugar.canvas.CanvasBox import CanvasBox from sugar.presence import PresenceService -from view.FriendIcon import FriendIcon +from view.BuddyIcon import BuddyIcon from model.Friends import Friend class RightPanel(CanvasBox): @@ -25,7 +25,7 @@ class RightPanel(CanvasBox): def add(self, buddy): friend = Friend(buddy.get_name(), buddy.get_color()) - icon = FriendIcon(self._shell, friend) + icon = BuddyIcon(self._shell, friend) icon.set_popup_distance(1) self.set_constraints(icon, 3, 3) self.add_child(icon) diff --git a/shell/view/home/FriendsGroup.py b/shell/view/home/FriendsGroup.py index 2f69a6e0..3904080b 100644 --- a/shell/view/home/FriendsGroup.py +++ b/shell/view/home/FriendsGroup.py @@ -4,7 +4,7 @@ import goocanvas from view.home.IconLayout import IconLayout from view.home.MyIcon import MyIcon -from view.FriendIcon import FriendIcon +from view.BuddyIcon import BuddyIcon class FriendsGroup(goocanvas.Group): def __init__(self, shell): @@ -26,7 +26,7 @@ class FriendsGroup(goocanvas.Group): friends.connect('friend-added', self._friend_added_cb) def add_friend(self, friend): - icon = FriendIcon(self._shell, friend) + icon = BuddyIcon(self._shell, friend) self.add_child(icon) self._icon_layout.add_icon(icon)