[Sugar-devel] [PATCH] Record: stop recording with the same shutter key in gamepad
quozl at laptop.org
Mon Mar 12 18:43:15 EDT 2012
On Mon, Mar 12, 2012 at 05:02:10PM -0300, Manuel Qui??ones wrote:
> Use the same shutter key in gamepad to stop the recording.
> This is for bug #3360 .
Your patch binds the stop recording function to the O game key.
I suggest instead that you bind it to the X game key, so that an
accidental double press of the O game key does not cause a short
recording, and so that the O game key does not act as a toggle.
The problem with using a push button as a toggle is that the learner is
forced to remember, without the display visible, whether the toggle is
on or off. This can lead to inverted state; where a series of videos
are recorded consisting entirely of the time periods between those that
should have been recorded.
The use of the X game key would also be consistent with the use of X to
The X game key is easily found by touch, as it is on the other side of
the game key diamond, just above the power button.
On the other hand, the symbol for stop on screen is a square. That
would suggest the square game key may be also used.
The same sound is used for both start and stop. A different sound for
stop would be another improvement.
Lastly, I think bug #3360 would also be addressed by moving the start
button to the same position that the stop button currently holds.
This also might address a different problem that is sometimes seen: when
the start button is pressed, there is a short time during which the
previous recording "Saving" progress bar is made visible.
> @@ -238,11 +238,18 @@ class Record(activity.Activity):
> self._toolbar_controls.set_quality(data.get('quality', 0))
> def _key_pressed(self, widget, event):
> - if self.model.ui_frozen():
> - return False
> key = event.keyval
> + if self.model.ui_frozen():
> + # game key O stops if recording:
> + if self.model.get_state() == constants.STATE_RECORDING:
> + if key == gtk.keysyms.KP_Page_Up:
> + if self._shutter_button.props.visible:
> + if self._shutter_button.props.sensitive:
> + self._shutter_button.clicked()
> + else:
> + return False
> if key == gtk.keysyms.KP_Page_Up: # game key O
> if self._shutter_button.props.visible:
> if self._shutter_button.props.sensitive:
More information about the Sugar-devel