diff options
author | Kushal Das <kushal@fedoraproject.org> | 2008-10-01 22:03:51 +0530 |
---|---|---|
committer | Kushal Das <kushal@fedoraproject.org> | 2008-10-01 22:03:51 +0530 |
commit | cb54d6f18ced5590ab94bbcc40fa7ac691dc0a76 (patch) | |
tree | a016368b3503e6a24353ae4abc98179bc7d3573b | |
parent | 920315ea2284fd0434569be931db2203f0a6cb41 (diff) | |
download | jukebox-activity.git-cb54d6f18ced5590ab94bbcc40fa7ac691dc0a76.tar.gz jukebox-activity.git-cb54d6f18ced5590ab94bbcc40fa7ac691dc0a76.tar.xz jukebox-activity.git-cb54d6f18ced5590ab94bbcc40fa7ac691dc0a76.zip |
Added volume control button in the toolbarmaster
-rwxr-xr-x | jukeboxactivity.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/jukeboxactivity.py b/jukeboxactivity.py index 34e715f..bc2f9fe 100755 --- a/jukeboxactivity.py +++ b/jukeboxactivity.py @@ -182,6 +182,9 @@ class JukeboxActivity(activity.Activity): self.update_scale_cb) self.toolbar.set_button_pause() + def volume_changed_cb(self, widget, value): + self.player.player.set_property('volume', value) + def scale_button_press_cb(self, widget, event): self.toolbar.button.set_sensitive(False) self.was_playing = self.player.is_playing() @@ -266,6 +269,15 @@ class ControlToolbar(gtk.Toolbar): self.scale_item.add(self.hscale) self.insert(self.scale_item, -1) + 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) + self.insert(self.audio_scale_item, -1) + def _button_clicked_cb(self, widget): self.jukebox.play_toggled() |