def rename_done(self, oldname, newname, job): if job.traceback is not None: self.rewind_savepoint() return error_dialog(self.gui, _('Failed to rename files'), _('Failed to rename files, click Show details for more information.'), det_msg=job.traceback, show=True) self.gui.file_list.build(current_container()) self.gui.action_save.setEnabled(True) if oldname in editors: editors[newname] = editors.pop(oldname) self.gui.central.rename_editor(editors[newname], newname) self.apply_container_update_to_gui()
def rename_done(self, name_map, job): if job.traceback is not None: return error_dialog(self.gui, _('Failed to rename files'), _('Failed to rename files, click Show details for more information.'), det_msg=job.traceback, show=True) self.gui.file_list.build(current_container()) self.set_modified() for oldname, newname in name_map.iteritems(): if oldname in editors: editors[newname] = editors.pop(oldname) self.gui.central.rename_editor(editors[newname], newname) self.apply_container_update_to_gui()
def rename_done(self, name_map, job): if job.traceback is not None: return error_dialog( self.gui, _('Failed to rename files'), _('Failed to rename files, click Show details for more information.' ), det_msg=job.traceback, show=True) self.gui.file_list.build(current_container()) self.set_modified() for oldname, newname in name_map.iteritems(): if oldname in editors: editors[newname] = editors.pop(oldname) self.gui.central.rename_editor(editors[newname], newname) self.apply_container_update_to_gui()
def close_editor(self, name): editor = editors.pop(name) self.gui.central.close_editor(editor) editor.break_cycles() if not editors: self.gui.preview.clear()
def close_editor(self, name): editor = editors.pop(name) self.gui.central.close_editor(editor) editor.break_cycles() if not editors or getattr(self.gui.central.current_editor, 'syntax', None) != 'html': self.gui.preview.clear()