summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKushal Das <kushal@fedoraproject.org>2008-10-02 00:03:27 +0530
committerKushal Das <kushal@fedoraproject.org>2008-10-02 00:03:27 +0530
commit707573d4e71bf02eedeaa6465ebf3b0322014d18 (patch)
tree900eef50edb06d64689af1c183d0053a465417bf
parent42599035387d76c980d2127522c7c08a73a7e9c8 (diff)
downloadjukebox-activity.git-newtoolbar.zip
jukebox-activity.git-newtoolbar.tar.gz
jukebox-activity.git-newtoolbar.tar.xz
Full screen button added , working :)newtoolbar
-rw-r--r--ControlToolbar.py24
-rwxr-xr-xjukeboxactivity.py5
2 files changed, 26 insertions, 3 deletions
diff --git a/ControlToolbar.py b/ControlToolbar.py
index 79a1fd3..dd0dc79 100644
--- a/ControlToolbar.py
+++ b/ControlToolbar.py
@@ -69,10 +69,26 @@ class ControlToolbar(gtk.Toolbar):
self.scale_item.add(self.hscale)
self.insert(self.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()
+
+ spacer = gtk.SeparatorToolItem()
+ spacer.props.draw = False
+ self.insert(spacer, -1)
+ spacer.show()
+
self.audioscale = gtk.VolumeButton()
self.audioscale.connect('value-changed', jukebox.volume_changed_cb)
self.audioscale.set_value(1)
-
+
self.audio_scale_item = gtk.ToolItem()
self.audio_scale_item.set_expand(False)
self.audio_scale_item.add(self.audioscale)
@@ -83,7 +99,7 @@ class ControlToolbar(gtk.Toolbar):
def set_button_play(self):
self.button.set_icon_widget(self.play_image)
-
+
def set_button_pause(self):
self.button.set_icon_widget(self.pause_image)
@@ -91,4 +107,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')
diff --git a/jukeboxactivity.py b/jukeboxactivity.py
index 34a78ab..4a98e4f 100755
--- a/jukeboxactivity.py
+++ b/jukeboxactivity.py
@@ -59,6 +59,8 @@ class JukeboxActivity(activity.Activity):
toolbar.show()
toolbox.show()
+ self.toolbar.connect('go-fullscreen', self.__go_fullscreen_cb)
+
self.connect("shared", self._shared_cb)
if handle.uri:
@@ -236,6 +238,9 @@ class JukeboxActivity(activity.Activity):
return True
+ def __go_fullscreen_cb(self, toolbar):
+ self.fullscreen()
+
class GstPlayer(gobject.GObject):
__gsignals__ = {
'error': (gobject.SIGNAL_RUN_FIRST, None, [str, str]),