Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/view/frame/overlaybox.py
blob: eaa1e5defbc5bc21a9e2ca8d7d1d9b0164a43ada (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import hippo

from sugar.graphics import style
from sugar.graphics.canvasicon import CanvasIcon

class OverlayBox(hippo.CanvasBox):
	def __init__(self, shell):
		hippo.CanvasBox.__init__(self, orientation=hippo.ORIENTATION_HORIZONTAL)

		self._shell = shell

		icon = CanvasIcon(icon_name='stock-chat')
		style.apply_stylesheet(icon, 'frame.OverlayIcon')
		icon.connect('activated', self._overlay_clicked_cb)
		self.append(icon)

	def _overlay_clicked_cb(self, item):
		self._shell.toggle_chat_visibility()