Show activity title in mesh view
This commit is contained in:
parent
82095ea26a
commit
28e8b9025e
@ -41,6 +41,9 @@ class ActivityModel:
|
|||||||
def get_service_name(self):
|
def get_service_name(self):
|
||||||
return self._bundle.get_service_name()
|
return self._bundle.get_service_name()
|
||||||
|
|
||||||
|
def get_title(self):
|
||||||
|
return self._activity.props.name
|
||||||
|
|
||||||
class MeshModel(gobject.GObject):
|
class MeshModel(gobject.GObject):
|
||||||
__gsignals__ = {
|
__gsignals__ = {
|
||||||
'activity-added': (gobject.SIGNAL_RUN_FIRST,
|
'activity-added': (gobject.SIGNAL_RUN_FIRST,
|
||||||
|
@ -170,11 +170,15 @@ class ActivityView(SnowflakeBox):
|
|||||||
self._model = model
|
self._model = model
|
||||||
self._icons = {}
|
self._icons = {}
|
||||||
|
|
||||||
icon = CanvasIcon(icon_name=model.get_icon_name(),
|
self._icon = CanvasIcon(icon_name=model.get_icon_name(),
|
||||||
xo_color=model.get_color(), box_width=80)
|
xo_color=model.get_color(), box_width=80)
|
||||||
icon.connect('activated', self._clicked_cb)
|
self._icon.connect('activated', self._clicked_cb)
|
||||||
self.append(icon, hippo.PACK_FIXED)
|
self._update_name()
|
||||||
self.set_root(icon)
|
self.append(self._icon, hippo.PACK_FIXED)
|
||||||
|
self.set_root(self._icon)
|
||||||
|
|
||||||
|
def _update_name(self):
|
||||||
|
self._icon.props.tooltip = self._model.get_title()
|
||||||
|
|
||||||
def has_buddy_icon(self, key):
|
def has_buddy_icon(self, key):
|
||||||
return self._icons.has_key(key)
|
return self._icons.has_key(key)
|
||||||
|
Loading…
Reference in New Issue
Block a user