sugar-toolkit-gtk3/shell/view/frame/overlaybox.py

17 lines
470 B
Python
Raw Normal View History

2006-10-24 19:44:18 +02:00
import hippo
2007-02-21 13:01:20 +01:00
from sugar.graphics.iconbutton import IconButton
2006-10-24 19:44:18 +02:00
class OverlayBox(hippo.CanvasBox):
def __init__(self, shell):
hippo.CanvasBox.__init__(self, orientation=hippo.ORIENTATION_HORIZONTAL)
2006-10-24 19:44:18 +02:00
self._shell = shell
2006-10-24 19:44:18 +02:00
2007-02-21 13:01:20 +01:00
icon = IconButton(icon_name='theme:stock-chat')
icon.connect('activated', self._overlay_clicked_cb)
self.append(icon)
2006-10-24 19:44:18 +02:00
def _overlay_clicked_cb(self, item):
self._shell.toggle_chat_visibility()