diff options
Diffstat (limited to 'ControlToolbar.py')
-rw-r--r-- | ControlToolbar.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/ControlToolbar.py b/ControlToolbar.py index 29a50f6..1069c72 100644 --- a/ControlToolbar.py +++ b/ControlToolbar.py @@ -31,6 +31,13 @@ from sugar.activity import activity class ControlToolbar(gtk.Toolbar): """Class to create the Control (play )toolbar""" + __gsignals__ = { + 'go-fullscreen': (gobject.SIGNAL_RUN_FIRST, + gobject.TYPE_NONE, + ([])) + } + + def __init__(self, toolbox, jukebox): gtk.Toolbar.__init__(self) self.toolbox = toolbox @@ -77,6 +84,17 @@ class ControlToolbar(gtk.Toolbar): self.audio_scale_item.add(self.audioscale) self.insert(self.audio_scale_item, -1) + spacer = gtk.SeparatorToolItem() + spacer.props.draw = False + self.insert(spacer, -1) + spacer.show() + self._fullscreen = ToolButton('view-fullscreen') + self._fullscreen.set_tooltip(_('Fullscreen')) + self._fullscreen.connect('clicked', self._fullscreen_cb) + self.insert(self._fullscreen, -1) + self._fullscreen.show() + + def _button_clicked_cb(self, widget): self.jukebox.play_toggled() @@ -90,3 +108,6 @@ class ControlToolbar(gtk.Toolbar): self.button.set_sensitive(False) self.scale_item.set_sensitive(False) self.hscale.set_sensitive(False) + + def _fullscreen_cb(self, button): + self.emit('go-fullscreen') |