def media_stop(self): """ Stop playing media""" if self.tw.gst_available: from tagplay import stop_media stop_media(self) self.ireturn() yield True
def stop_logo(self): """ Stop logo is called from the Stop button on the toolbar """ self.tw.step_time = 0 self.step = _just_stop() for plugin in self.tw._plugins: plugin.stop() if self.tw.gst_available: from tagplay import stop_media stop_media(self) self.tw.active_turtle.show()
def prim_clear(self): """ Clear screen """ self.tw.clear_plugins() if self.tw.gst_available: from tagplay import stop_media stop_media(self) self.tw.canvas.clearscreen() self.scale = DEFAULT_SCALE self.hidden_turtle = None self.start_time = time() self.clear_value_blocks()
def prim_clear(self): """ Clear screen """ self.tw.clear_plugins() if self.tw.gst_available: from tagplay import stop_media stop_media(self) self.tw.canvas.clearscreen() self.tw.turtles.reset_turtles() self.scale = DEFAULT_SCALE self.hidden_turtle = None self.start_time = time() self.clear_value_blocks() self.tw.activity.restore_state()
def stop_logo(self): """ Stop logo is called from the Stop button on the toolbar """ self.step = _just_stop() # Clear istack and iline of any code that was not executed due to Stop self.istack = [] self.iline = None self.tw.stop_plugins() if self.tw.gst_available: from tagplay import stop_media stop_media(self) self.tw.active_turtle.show() self.tw.running_blocks = False # If we disabled hover help, reenable it if self._disable_help: self.tw.no_help = False self._disable_help = False
def stop_logo(self): """ Stop logo is called from the Stop button on the toolbar """ self.step = _just_stop() # Clear istack and iline of any code that was not executed due to Stop self.istack = [] self.iline = None self.tw.stop_plugins() if self.tw.gst_available: from tagplay import stop_media stop_media(self) self.tw.turtles.get_active_turtle().show() self.tw.running_blocks = False # If we disabled hover help, reenable it if self._disable_help: self.tw.no_help = False self._disable_help = False