@ -281,6 +281,7 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard):
name_e . textChanged . connect ( on_filename )
name_e . textChanged . connect ( on_filename )
name_e . setText ( os . path . basename ( path ) )
name_e . setText ( os . path . basename ( path ) )
def run_user_interaction_loop ( ) :
while True :
while True :
if self . loop . exec_ ( ) != 2 : # 2 = next
if self . loop . exec_ ( ) != 2 : # 2 = next
raise UserCancelled
raise UserCancelled
@ -327,6 +328,11 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard):
else :
else :
raise Exception ( ' Unexpected encryption version ' )
raise Exception ( ' Unexpected encryption version ' )
try :
run_user_interaction_loop ( )
finally :
pw_e . clear ( )
return temp_storage . path , ( temp_storage if temp_storage . file_exists ( ) else None )
return temp_storage . path , ( temp_storage if temp_storage . file_exists ( ) else None )
def run_upgrades ( self , storage : WalletStorage , db : ' WalletDB ' ) - > None :
def run_upgrades ( self , storage : WalletStorage , db : ' WalletDB ' ) - > None :
@ -482,8 +488,11 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard):
playout = PasswordLayout ( msg = msg , kind = kind , OK_button = self . next_button ,
playout = PasswordLayout ( msg = msg , kind = kind , OK_button = self . next_button ,
force_disable_encrypt_cb = force_disable_encrypt_cb )
force_disable_encrypt_cb = force_disable_encrypt_cb )
playout . encrypt_cb . setChecked ( True )
playout . encrypt_cb . setChecked ( True )
try :
self . exec_layout ( playout . layout ( ) )
self . exec_layout ( playout . layout ( ) )
return playout . new_password ( ) , playout . encrypt_cb . isChecked ( )
return playout . new_password ( ) , playout . encrypt_cb . isChecked ( )
finally :
playout . clear_password_fields ( )
@wizard_dialog
@wizard_dialog
def request_password ( self , run_next , force_disable_encrypt_cb = False ) :
def request_password ( self , run_next , force_disable_encrypt_cb = False ) :