Add TrayIcon.get_icon() (tomeu)
This commit is contained in:
parent
324a9b549d
commit
ee4a4ece7c
@ -261,10 +261,10 @@ class _IconWidget(gtk.EventBox):
|
||||
|
||||
self.set_app_paintable(True)
|
||||
|
||||
icon = Icon(icon_name=icon_name, xo_color=xo_color,
|
||||
self._icon = Icon(icon_name=icon_name, xo_color=xo_color,
|
||||
icon_size=gtk.ICON_SIZE_LARGE_TOOLBAR)
|
||||
self.add(icon)
|
||||
icon.show()
|
||||
self.add(self._icon)
|
||||
self._icon.show()
|
||||
|
||||
def do_expose_event(self, event):
|
||||
if self._palette and self._palette.is_up():
|
||||
@ -279,6 +279,9 @@ class _IconWidget(gtk.EventBox):
|
||||
self._palette = palette
|
||||
self._palette.props.invoker = ToolInvoker(self)
|
||||
|
||||
def get_icon(self):
|
||||
return self._icon
|
||||
|
||||
class TrayIcon(gtk.ToolItem):
|
||||
__gtype_name__ = "SugarTrayIcon"
|
||||
|
||||
@ -297,3 +300,6 @@ class TrayIcon(gtk.ToolItem):
|
||||
def set_tooltip(self, text):
|
||||
self.set_palette(Palette(text))
|
||||
|
||||
def get_icon(self):
|
||||
return self._icon_widget.get_icon()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user