def save_level(self, *args): if not self.edit_level: return d = self.edit_level.name # Keep SelectFileDialog here because that dialog makes it # easier to reuse the file name (which is a way of making # the lack of "save" vs "save as" less painful). sld = SelectFileDialog("Save", "Save", "Save level", default_file=d, path_filter=LVL_FILTER) sld.connect(gui.CHANGE, self.write_level, sld) sld.open()
def _actions_save(self): sfd = SelectFileDialog("Save to", "Save", "Save actions") sfd.connect(gui.CHANGE, self._actions_save_file, sfd) sfd.open()