@ -290,12 +290,34 @@ class ElectrumWindow(QMainWindow):
self.load_wallet(wallet)
defbackup_wallet(self):
importshutil
path=self.wallet.storage.path
wallet_folder=os.path.dirname(path)
new_filename,ok=QInputDialog.getText(self,_('Filename'),_('Current directory')+': '+wallet_folder+'\n'+_('Enter a filename for the copy of your wallet')+':')
new_filename=unicode(new_filename)
ifnotokornotnew_filename:
return
new_path=os.path.join(wallet_folder,new_filename)
ifnew_path!=path:
try:
shutil.copy2(path,new_path)
QMessageBox.information(None,"Wallet backup created",_("A copy of your wallet file was created in")+"'%s'"%str(new_path))
except(IOError,os.error),reason:
QMessageBox.critical(None,"Unable to create backup",_("Electrum was unable to copy your wallet file to the specified location.")+"\n"+str(reason))
defnew_wallet(self):
importinstallwizard
wallet_folder=self.wallet.storage.path
re.sub("(\/\w*.dat)$","",wallet_folder)
filename=self.getSaveFileName("Select your wallet file",wallet_folder)