diff options
Diffstat (limited to 'voctogui')
-rw-r--r-- | voctogui/lib/toolbar/specialfunctions.py | 33 | ||||
-rw-r--r-- | voctogui/lib/ui.py | 6 | ||||
-rw-r--r-- | voctogui/ui/voctogui.ui | 36 |
3 files changed, 0 insertions, 75 deletions
diff --git a/voctogui/lib/toolbar/specialfunctions.py b/voctogui/lib/toolbar/specialfunctions.py deleted file mode 100644 index 61fb6bf..0000000 --- a/voctogui/lib/toolbar/specialfunctions.py +++ /dev/null @@ -1,33 +0,0 @@ -import logging -from gi.repository import Gtk - -class SpecialFunctionsToolbarController(object): - """ Manages Accelerators and Clicks on the Composition Toolbar-Buttons """ - - def __init__(self, drawing_area, win, uibuilder, video_display): - self.log = logging.getLogger('SpecialFunctionsToolbarController') - - self.video_display = video_display - - accelerators = Gtk.AccelGroup() - win.add_accel_group(accelerators) - - composites = [ - 'preview_fullscreen', - 'preview_freeze', - ] - - for idx, name in enumerate(composites): - key, mod = Gtk.accelerator_parse('F%u' % (idx+10)) - btn = uibuilder.find_widget_recursive(drawing_area, name) - btn.set_name(name) - - # Thanks to http://stackoverflow.com/a/19739855/1659732 - childbtn = btn.get_child() - childbtn.add_accelerator('clicked', accelerators, key, mod, Gtk.AccelFlags.VISIBLE) - childbtn.connect('button-press-event', self.on_btn_event) - childbtn.connect('button-release-event', self.on_btn_event) - - def on_btn_event(self, btn, event): - self.log.info("on_btn_event: %s @ %s", event.type, btn.get_name()) - # do sth. to self.video_display here diff --git a/voctogui/lib/ui.py b/voctogui/lib/ui.py index 35d62e2..451a619 100644 --- a/voctogui/lib/ui.py +++ b/voctogui/lib/ui.py @@ -14,7 +14,6 @@ from lib.audioselector import AudioSelectorController from lib.toolbar.composition import CompositionToolbarController from lib.toolbar.streamblank import StreamblankToolbarController -from lib.toolbar.specialfunctions import SpecialFunctionsToolbarController class Ui(UiBuilder): def __init__(self, uifile): @@ -72,11 +71,6 @@ class Ui(UiBuilder): uibuilder=self, warning_overlay=self.video_warning_overlay) - self.special_functions_toolbar_controller = SpecialFunctionsToolbarController(toolbar, - win=self.win, - uibuilder=self, - video_display=self.main_video_display) - def show(self): self.log.info('Showing Main-Window') diff --git a/voctogui/ui/voctogui.ui b/voctogui/ui/voctogui.ui index b877146..d58f741 100644 --- a/voctogui/ui/voctogui.ui +++ b/voctogui/ui/voctogui.ui @@ -140,42 +140,6 @@ <property name="homogeneous">True</property> </packing> </child> - <child> - <object class="GtkSeparatorToolItem" id="stream_blank_separator"> - <property name="visible">True</property> - <property name="can_focus">False</property> - </object> - <packing> - <property name="expand">False</property> - <property name="homogeneous">True</property> - </packing> - </child> - <child> - <object class="GtkToolButton" id="preview_fullscreen"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="events">GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property> - <property name="label" translatable="yes">Fullscreen Preview</property> - <property name="use_underline">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="homogeneous">True</property> - </packing> - </child> - <child> - <object class="GtkToolButton" id="preview_freeze"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="events">GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property> - <property name="label" translatable="yes">Freeze Preview</property> - <property name="use_underline">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="homogeneous">True</property> - </packing> - </child> </object> <packing> <property name="expand">False</property> |