summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-François Fortin Tam <nekohayo@gmail.com>2012-07-19 02:52:16 (GMT)
committerJean-François Fortin Tam <nekohayo@gmail.com>2012-07-19 02:52:16 (GMT)
commit571fb91949d7da7c7e9fd2f737d4dce6cc061f3f (patch)
tree3e27092f776ea92532e55bde1bb12731fd263aca
parentd205a510dc1a638687cca8bc18dbf591ff21e3be (diff)
downloadpitivi-571fb919.zip
pitivi-571fb919.tar.xz
Disable keyboard shortcuts in the transformation spinbuttons
-rw-r--r--pitivi/clipproperties.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/pitivi/clipproperties.py b/pitivi/clipproperties.py
index b664e84..0da2760 100644
--- a/pitivi/clipproperties.py
+++ b/pitivi/clipproperties.py
@@ -592,8 +592,14 @@ class TransformationProperties(gtk.Expander):
spinbtn.set_value(self.effect.get_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.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.default_values[property_name] = spinbtn.get_value()
@@ -614,6 +620,12 @@ class TransformationProperties(gtk.Expander):
if box and box.clicked_point == 0:
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):
self.app.current.pipeline.flushSeek()