@ -269,7 +269,7 @@ class ElectrumWindow(QMainWindow, PrintError):
self . update_account_selector ( )
self . update_account_selector ( )
# update menus
# update menus
self . new_account_menu . setVisible ( self . wallet . can_create_accounts ( ) )
self . new_account_menu . setVisible ( self . wallet . can_create_accounts ( ) )
self . priva te_keys _menu . setEnabled ( not self . wallet . is_watching_only ( ) )
self . ex po rt_menu. setEnabled ( not self . wallet . is_watching_only ( ) )
self . password_menu . setEnabled ( self . wallet . can_change_password ( ) )
self . password_menu . setEnabled ( self . wallet . can_change_password ( ) )
self . seed_menu . setEnabled ( self . wallet . has_seed ( ) )
self . seed_menu . setEnabled ( self . wallet . has_seed ( ) )
self . mpk_menu . setEnabled ( self . wallet . is_deterministic ( ) )
self . mpk_menu . setEnabled ( self . wallet . is_deterministic ( ) )
@ -2009,10 +2009,8 @@ class ElectrumWindow(QMainWindow, PrintError):
self . show_message ( str ( e ) )
self . show_message ( str ( e ) )
return
return
d = Q Dialog( self )
d = WindowModal Dialog( self , _ ( " Private key " ) )
d . setMinimumSize ( 600 , 200 )
d . setMinimumSize ( 600 , 200 )
d . setModal ( 1 )
d . setWindowTitle ( _ ( " Private key " ) )
vbox = QVBoxLayout ( )
vbox = QVBoxLayout ( )
vbox . addWidget ( QLabel ( _ ( " Address " ) + ' : ' + address ) )
vbox . addWidget ( QLabel ( _ ( " Address " ) + ' : ' + address ) )
vbox . addWidget ( QLabel ( _ ( " Private key " ) + ' : ' ) )
vbox . addWidget ( QLabel ( _ ( " Private key " ) + ' : ' ) )
@ -2457,12 +2455,11 @@ class ElectrumWindow(QMainWindow, PrintError):
def sweep_key_dialog ( self ) :
def sweep_key_dialog ( self ) :
d = QDialog ( self )
d = WindowModalDialog ( self , title = _ ( ' Sweep private keys ' ) )
d . setWindowTitle ( _ ( ' Sweep private keys ' ) )
d . setMinimumSize ( 600 , 300 )
d . setMinimumSize ( 600 , 300 )
vbox = QVBoxLayout ( d )
vbox = QVBoxLayout ( d )
vbox . addWidget ( QLabel ( _ ( " Enter private keys " ) ) )
vbox . addWidget ( QLabel ( _ ( " Enter private keys: " ) ) )
keys_e = QTextEdit ( )
keys_e = QTextEdit ( )
keys_e . setTabChangesFocus ( True )
keys_e . setTabChangesFocus ( True )
@ -2493,6 +2490,10 @@ class ElectrumWindow(QMainWindow, PrintError):
if not d . exec_ ( ) :
if not d . exec_ ( ) :
return
return
if self . wallet . is_watching_only ( ) :
if not self . question ( _ ( " Warning: this wallet is watching only. You will be UNABLE to spend the swept funds directly. Continue only if you have access to the private keys in another way. \n \n Are you SURE you want to sweep? " ) ) :
return
fee = self . wallet . fee_per_kb ( self . config )
fee = self . wallet . fee_per_kb ( self . config )
tx = Transaction . sweep ( get_pk ( ) , self . network , get_address ( ) , fee )
tx = Transaction . sweep ( get_pk ( ) , self . network , get_address ( ) , fee )
if not tx :
if not tx :