ThomasV 10 years ago
parent
commit
fd651709b8
  1. 3
      gui/qt/main_window.py
  2. 9
      gui/qt/util.py

3
gui/qt/main_window.py

@ -1193,8 +1193,6 @@ class ElectrumWindow(QMainWindow):
self.payment_request = None
return
self.payto_help.show()
self.payto_help.set_alt(lambda: self.show_pr_details(pr))
if not pr.has_expired():
self.payto_e.setGreen()
else:
@ -1261,7 +1259,6 @@ class ElectrumWindow(QMainWindow):
e.setText('')
e.setFrozen(False)
self.payto_help.set_alt(None)
self.set_pay_from([])
self.update_status()
run_hook('do_clear')

9
gui/qt/util.py

@ -126,17 +126,10 @@ class HelpButton(QPushButton):
self.help_text = text
self.setFocusPolicy(Qt.NoFocus)
self.setFixedWidth(20)
self.alt = None
self.clicked.connect(self.onclick)
def set_alt(self, func):
self.alt = func
def onclick(self):
if self.alt:
apply(self.alt)
else:
QMessageBox.information(self, 'Help', self.help_text, 'OK')
QMessageBox.information(self, 'Help', self.help_text, 'OK')
class Buttons(QHBoxLayout):
def __init__(self, *buttons):

Loading…
Cancel
Save