diff options
author | MaZderMind <git@mazdermind.de> | 2015-06-22 22:35:18 +0200 |
---|---|---|
committer | MaZderMind <git@mazdermind.de> | 2015-06-22 22:35:18 +0200 |
commit | 00e139908f3f4d786d1f6c20d1de27d2260bfed2 (patch) | |
tree | 38f625662e472f2787334cba330ae1f55f5116a1 /voctogui/lib | |
parent | a9600d8c5e1383961ff44c6d846574909a5080c4 (diff) |
Configure Toolbar
Diffstat (limited to 'voctogui/lib')
-rw-r--r-- | voctogui/lib/ui.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/voctogui/lib/ui.py b/voctogui/lib/ui.py index c8ae1c5..73faca7 100644 --- a/voctogui/lib/ui.py +++ b/voctogui/lib/ui.py @@ -26,6 +26,7 @@ class Ui(UiBuilder): self.configure_video_main() self.configure_video_previews() self.configure_audio_selector() + self.configure_streamblank_selector() def configure_video_main(self): self.log.info('Initializing Main Video and Main Audio-Level View') @@ -109,6 +110,23 @@ class Ui(UiBuilder): combo.set_active_id('moofar') + def configure_streamblank_selector(self): + livebtn = self.get_check_widget('stream_live') + blankbtn = self.get_check_widget('stream_blank') + toolbar = blankbtn.get_parent() + pos = toolbar.get_item_index(blankbtn) + + for idx, name in enumerate(['pause', 'nostream']): + if idx == 0: + new_btn = blankbtn + else: + new_icon = Gtk.Image.new_from_pixbuf(blankbtn.get_icon_widget().get_pixbuf()) + new_btn = Gtk.RadioToolButton(group=livebtn) + new_btn.set_icon_widget(new_icon) + toolbar.insert(new_btn, pos+1) + + new_btn.set_label("Stream %s" % name) + def show(self): self.log.info('Running Video-Playback Pipelines') |