def callback_save(self, widget, data=None): file_name=save_as_gpvdm(self) if file_name!=False: if os.path.splitext(file_name)[1]: self.save_image(file_name) else: filter=dialog.get_filter() self.save_image(file_name+".png")
def callback_next(self): help_window().help_set_help(["save.png",_("<big><b>Now save the simulation</b></big><br>Now select where you would like to save the simulation directory.")]) if len(self.window.listwidget.selectedItems())>0: file_path=save_as_gpvdm(self.window) if file_path!=None: selection=self.window.listwidget.selectedItems()[0].text() selection_file=selection[selection.find("(")+1:selection.find(")")] if not os.path.exists(file_path): os.makedirs(file_path) self.ret_path=file_path os.chdir(self.ret_path) gpvdm_clone(os.getcwd(),True) import_archive(os.path.join(get_device_lib_path(),selection_file),os.path.join(os.getcwd(),"sim.gpvdm"),False) self.window.close() else: error_dlg(self.window,_("Please select a device before clicking next"))