Fix donut activity icon, implement share
This commit is contained in:
parent
8d26a76a88
commit
7af2ea5bbd
@ -42,7 +42,6 @@ class ActivityHost:
|
||||
return conf.get_profile().get_color()
|
||||
|
||||
def share(self):
|
||||
self._people_window.share()
|
||||
self._activity.share()
|
||||
|
||||
def get_shared(self):
|
||||
|
@ -5,8 +5,8 @@ import goocanvas
|
||||
from sugar.canvas.IconItem import IconItem
|
||||
|
||||
class PieceIcon(IconItem):
|
||||
def __init__(self, piece_item, icon_name, color, **kwargs):
|
||||
IconItem.__init__(self, icon_name, color, 48, **kwargs)
|
||||
def __init__(self, piece_item, **kwargs):
|
||||
IconItem.__init__(self, size=48, **kwargs)
|
||||
self._piece_item = piece_item
|
||||
|
||||
def construct(self):
|
||||
@ -39,7 +39,7 @@ class PieceItem(goocanvas.Path):
|
||||
return self._icon
|
||||
|
||||
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._icon.construct()
|
||||
|
||||
|
@ -29,7 +29,9 @@ class ActionsBar(goocanvas.Group):
|
||||
self.add_child(icon)
|
||||
|
||||
def __share_clicked_cb(self, item):
|
||||
pass
|
||||
activity = self._shell.get_current_activity()
|
||||
if activity != None:
|
||||
activity.share()
|
||||
|
||||
def __invite_clicked_cb(self, item):
|
||||
pass
|
||||
|
Loading…
Reference in New Issue
Block a user