mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-05 05:15:12 +00:00
fix send button
This commit is contained in:
parent
f157a990c7
commit
3a9bf8430e
1 changed files with 6 additions and 12 deletions
|
@ -111,6 +111,8 @@ class ElectrumWindow(QMainWindow):
|
||||||
|
|
||||||
self.config = config
|
self.config = config
|
||||||
self.network = network
|
self.network = network
|
||||||
|
self.wallet = None
|
||||||
|
|
||||||
self.gui_object = gui_object
|
self.gui_object = gui_object
|
||||||
self.tray = gui_object.tray
|
self.tray = gui_object.tray
|
||||||
self.go_lite = gui_object.go_lite
|
self.go_lite = gui_object.go_lite
|
||||||
|
@ -180,7 +182,6 @@ class ElectrumWindow(QMainWindow):
|
||||||
# set initial message
|
# set initial message
|
||||||
self.console.showMessage(self.network.banner)
|
self.console.showMessage(self.network.banner)
|
||||||
|
|
||||||
self.wallet = None
|
|
||||||
self.payment_request = None
|
self.payment_request = None
|
||||||
self.qr_window = None
|
self.qr_window = None
|
||||||
self.not_enough_funds = False
|
self.not_enough_funds = False
|
||||||
|
@ -843,9 +844,9 @@ class ElectrumWindow(QMainWindow):
|
||||||
|
|
||||||
def set_send_button_text(self):
|
def set_send_button_text(self):
|
||||||
if self.show_before_broadcast():
|
if self.show_before_broadcast():
|
||||||
text = _("Show...")
|
text = _("View...")
|
||||||
elif self.wallet.is_watching_only():
|
elif self.wallet and self.wallet.is_watching_only():
|
||||||
text = _("Create unsigned transaction")
|
text = _("View...")
|
||||||
else:
|
else:
|
||||||
text = _("Send")
|
text = _("Send")
|
||||||
self.send_button.setText(text)
|
self.send_button.setText(text)
|
||||||
|
@ -902,8 +903,7 @@ class ElectrumWindow(QMainWindow):
|
||||||
grid.addWidget(self.fee_e_label, 5, 0)
|
grid.addWidget(self.fee_e_label, 5, 0)
|
||||||
grid.addWidget(self.fee_e, 5, 1, 1, 2)
|
grid.addWidget(self.fee_e, 5, 1, 1, 2)
|
||||||
|
|
||||||
self.send_button = EnterButton('', self.do_send)
|
self.send_button = EnterButton(_("Send"), self.do_send)
|
||||||
self.set_send_button_text()
|
|
||||||
self.clear_button = EnterButton(_("Clear"), self.do_clear)
|
self.clear_button = EnterButton(_("Clear"), self.do_clear)
|
||||||
buttons = QHBoxLayout()
|
buttons = QHBoxLayout()
|
||||||
buttons.addStretch(1)
|
buttons.addStretch(1)
|
||||||
|
@ -1672,30 +1672,24 @@ class ElectrumWindow(QMainWindow):
|
||||||
sb.addPermanentWidget( self.seed_button )
|
sb.addPermanentWidget( self.seed_button )
|
||||||
self.status_button = StatusBarButton( QIcon(":icons/status_disconnected.png"), _("Network"), self.run_network_dialog )
|
self.status_button = StatusBarButton( QIcon(":icons/status_disconnected.png"), _("Network"), self.run_network_dialog )
|
||||||
sb.addPermanentWidget( self.status_button )
|
sb.addPermanentWidget( self.status_button )
|
||||||
|
|
||||||
run_hook('create_status_bar', sb)
|
run_hook('create_status_bar', sb)
|
||||||
|
|
||||||
self.setStatusBar(sb)
|
self.setStatusBar(sb)
|
||||||
|
|
||||||
|
|
||||||
def update_lock_icon(self):
|
def update_lock_icon(self):
|
||||||
icon = QIcon(":icons/lock.png") if self.wallet.use_encryption else QIcon(":icons/unlock.png")
|
icon = QIcon(":icons/lock.png") if self.wallet.use_encryption else QIcon(":icons/unlock.png")
|
||||||
self.password_button.setIcon( icon )
|
self.password_button.setIcon( icon )
|
||||||
|
|
||||||
|
|
||||||
def update_buttons_on_seed(self):
|
def update_buttons_on_seed(self):
|
||||||
self.seed_button.setVisible(self.wallet.has_seed())
|
self.seed_button.setVisible(self.wallet.has_seed())
|
||||||
self.password_button.setVisible(self.wallet.can_change_password())
|
self.password_button.setVisible(self.wallet.can_change_password())
|
||||||
self.set_send_button_text()
|
self.set_send_button_text()
|
||||||
|
|
||||||
|
|
||||||
def change_password_dialog(self):
|
def change_password_dialog(self):
|
||||||
from password_dialog import PasswordDialog
|
from password_dialog import PasswordDialog
|
||||||
d = PasswordDialog(self.wallet, self)
|
d = PasswordDialog(self.wallet, self)
|
||||||
d.run()
|
d.run()
|
||||||
self.update_lock_icon()
|
self.update_lock_icon()
|
||||||
|
|
||||||
|
|
||||||
def toggle_search(self):
|
def toggle_search(self):
|
||||||
self.search_box.setHidden(not self.search_box.isHidden())
|
self.search_box.setHidden(not self.search_box.isHidden())
|
||||||
if not self.search_box.isHidden():
|
if not self.search_box.isHidden():
|
||||||
|
|
Loading…
Add table
Reference in a new issue