Commit 571fb919 authored by Jeff Fortin Tam's avatar Jeff Fortin Tam
Browse files

Disable keyboard shortcuts in the transformation spinbuttons

parent d205a510
...@@ -592,8 +592,14 @@ class TransformationProperties(gtk.Expander): ...@@ -592,8 +592,14 @@ class TransformationProperties(gtk.Expander):
spinbtn.set_value(self.effect.get_property(name)) spinbtn.set_value(self.effect.get_property(name))
def _getAndConnectToEffect(self, widget_name, property_name): def _getAndConnectToEffect(self, widget_name, property_name):
"""
Create a spinbutton widget and connect its signals to change property
values. While focused, disable the timeline actions' sensitivity.
"""
spinbtn = self.builder.get_object(widget_name) spinbtn = self.builder.get_object(widget_name)
spinbtn.connect("output", self._onValueChangedCb, property_name) spinbtn.connect("output", self._onValueChangedCb, property_name)
spinbtn.connect("focus-in-event", self._disableTimelineActionsCb)
spinbtn.connect("focus-out-event", self._enableTimelineActionsCb)
self.spin_buttons[property_name] = spinbtn self.spin_buttons[property_name] = spinbtn
self.default_values[property_name] = spinbtn.get_value() self.default_values[property_name] = spinbtn.get_value()
...@@ -614,6 +620,12 @@ class TransformationProperties(gtk.Expander): ...@@ -614,6 +620,12 @@ class TransformationProperties(gtk.Expander):
if box and box.clicked_point == 0: if box and box.clicked_point == 0:
box.update_from_effect(self.effect) box.update_from_effect(self.effect)
def _disableTimelineActionsCb(self, unused_widget, unused_event):
self.app.gui.setActionsSensitive(False)
def _enableTimelineActionsCb(self, unused_widget, unused_event):
self.app.gui.setActionsSensitive(True)
def _flushPipeLineCb(self, widget): def _flushPipeLineCb(self, widget):
self.app.current.pipeline.flushSeek() self.app.current.pipeline.flushSeek()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment