Fix donut activity icon, implement share

This commit is contained in:
Marco Pesenti Gritti 2006-08-28 15:10:31 +02:00
parent 8d26a76a88
commit 7af2ea5bbd
3 changed files with 6 additions and 5 deletions

View File

@ -42,7 +42,6 @@ class ActivityHost:
return conf.get_profile().get_color() return conf.get_profile().get_color()
def share(self): def share(self):
self._people_window.share()
self._activity.share() self._activity.share()
def get_shared(self): def get_shared(self):

View File

@ -5,8 +5,8 @@ import goocanvas
from sugar.canvas.IconItem import IconItem from sugar.canvas.IconItem import IconItem
class PieceIcon(IconItem): class PieceIcon(IconItem):
def __init__(self, piece_item, icon_name, color, **kwargs): def __init__(self, piece_item, **kwargs):
IconItem.__init__(self, icon_name, color, 48, **kwargs) IconItem.__init__(self, size=48, **kwargs)
self._piece_item = piece_item self._piece_item = piece_item
def construct(self): def construct(self):
@ -39,7 +39,7 @@ class PieceItem(goocanvas.Path):
return self._icon return self._icon
def set_icon(self, icon_name, color): def set_icon(self, icon_name, color):
self._icon = PieceIcon(self, icon_name, color) self._icon = PieceIcon(self, icon_name=icon_name, color=color)
self.get_parent().add_child(self._icon) self.get_parent().add_child(self._icon)
self._icon.construct() self._icon.construct()

View File

@ -29,7 +29,9 @@ class ActionsBar(goocanvas.Group):
self.add_child(icon) self.add_child(icon)
def __share_clicked_cb(self, item): def __share_clicked_cb(self, item):
pass activity = self._shell.get_current_activity()
if activity != None:
activity.share()
def __invite_clicked_cb(self, item): def __invite_clicked_cb(self, item):
pass pass