def _edit_template(self, p): template = self.get_selected_template() if template: template_path = DEFAULT_TEMPLATE_PATH + '/' + template editor = ScriptEditorWindow() editor.open_file(template_path) editor.show_all()
def _edit_cb(self, p): script = self.get_selected_script() if script and script.path: if self.preferences.use_internal_editor: editor = ScriptEditorWindow() editor.open_file(script.path) editor.show_all() else: # XXX : find better way to run shell command from Python if not os.fork(): os.system(self.preferences.external_command % script.path) sys.exit(0)
def _new_file_cb(self, p): editor = ScriptEditorWindow() editor.open_file() editor.show_all()
def _new_wizard_file_cb(self, p): editor = ScriptEditorWindow() editor.new_file_wizard() editor.show_all()