summaryrefslogtreecommitdiff
path: root/voctogui/lib
diff options
context:
space:
mode:
authorMaZderMind <git@mazdermind.de>2015-11-15 14:43:51 +0100
committerMaZderMind <git@mazdermind.de>2015-11-15 18:38:52 +0100
commitbc8af43104aafa0869cfb869c9d7caf0acefb23c (patch)
treea7c6c76ee406fe528749280570f5d9636646c610 /voctogui/lib
parent1d4604a089e0715ca438235fec5088ce93821614 (diff)
Implement a Button in the GUI to set a specific Source to Fullscreen, fixes #11
Diffstat (limited to 'voctogui/lib')
-rw-r--r--voctogui/lib/videopreviews.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/voctogui/lib/videopreviews.py b/voctogui/lib/videopreviews.py
index 233b132..c4700d9 100644
--- a/voctogui/lib/videopreviews.py
+++ b/voctogui/lib/videopreviews.py
@@ -80,6 +80,11 @@ class VideoPreviewsController(object):
key, mod = Gtk.accelerator_parse('<Ctrl>%u' % (idx+1))
btn_b.add_accelerator('activate', accelerators, key, mod, Gtk.AccelFlags.VISIBLE)
+ btn_fullscreen = uibuilder.find_widget_recursive(preview, 'btn_fullscreen')
+ btn_fullscreen.set_name("%c %u" % ('f', idx))
+
+ btn_fullscreen.connect('clicked', self.btn_fullscreen_clicked)
+
self.preview_players[source] = player
self.previews[source] = preview
self.a_btns[source] = btn_a
@@ -104,6 +109,16 @@ class VideoPreviewsController(object):
self.log.info('video-channel %s changed to %s', channel, source_name)
Connection.send('set_video_'+channel, source_name)
+ def btn_fullscreen_clicked(self, btn):
+ btn_name = btn.get_name()
+ self.log.debug('btn_fullscreen_clicked: %s', btn_name)
+
+ channel, idx = btn_name.split(' ')[:2]
+ source_name = self.sources[int(idx)]
+
+ self.log.info('selcting video %s for fullscreen', source_name)
+ Connection.send('set_videos_and_composite', source_name, '*', 'fullscreen')
+
def on_video_status(self, source_a, source_b):
self.log.info('on_video_status callback w/ sources: %s and %s', source_a, source_b)