def _play_controls_finish(self, exc):
# Reverse _play_controls_setup
self.ui.play_box.props.visible = False
( self.props.application.pressure.simulate_noise,
self.props.application.humidity.simulate_noise,
self.props.application.imu.simulate_world,
) = self._play_restore
self.ui.environ_box.props.sensitive = True
self.ui.gyro_grid.props.sensitive = True
self._play_thread = None
# If an exception occurred in the background thread, display the
# error in an appropriate dialog
if exc:
dialog = Gtk.MessageDialog(
transient_for=self,
message_type=Gtk.MessageType.ERROR,
title=_('Error'),
text=_('Error while replaying recording'),
buttons=Gtk.ButtonsType.CLOSE)
dialog.format_secondary_text(str(exc))
dialog.run()
dialog.destroy()
评论列表
文章目录