mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
Fix greenaddress modality and centring issues
This commit is contained in:
parent
0ecf2565ce
commit
37a49752eb
2 changed files with 6 additions and 9 deletions
|
@ -2193,8 +2193,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
|
||||||
d.exec_()
|
d.exec_()
|
||||||
|
|
||||||
def password_dialog(self, msg=None, parent=None):
|
def password_dialog(self, msg=None, parent=None):
|
||||||
if parent == None:
|
parent = parent or self
|
||||||
parent = self
|
|
||||||
d = WindowModalDialog(parent, _("Enter Password"))
|
d = WindowModalDialog(parent, _("Enter Password"))
|
||||||
pw = QLineEdit()
|
pw = QLineEdit()
|
||||||
pw.setEchoMode(2)
|
pw.setEchoMode(2)
|
||||||
|
|
|
@ -21,7 +21,7 @@ import urllib
|
||||||
import sys
|
import sys
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
from PyQt4.QtGui import QMessageBox, QApplication, QPushButton
|
from PyQt4.QtGui import QApplication, QPushButton
|
||||||
|
|
||||||
from electrum.plugins import BasePlugin, hook
|
from electrum.plugins import BasePlugin, hook
|
||||||
from electrum.i18n import _
|
from electrum.i18n import _
|
||||||
|
@ -65,7 +65,7 @@ class Plugin(BasePlugin):
|
||||||
'to verify that transaction is instant.\n'
|
'to verify that transaction is instant.\n'
|
||||||
'Please enter your password to sign a\n'
|
'Please enter your password to sign a\n'
|
||||||
'verification request.')
|
'verification request.')
|
||||||
password = window.password_dialog(msg)
|
password = window.password_dialog(msg, parent=d)
|
||||||
if not password:
|
if not password:
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
|
@ -84,14 +84,12 @@ class Plugin(BasePlugin):
|
||||||
|
|
||||||
# 3. display the result
|
# 3. display the result
|
||||||
if response.get('verified'):
|
if response.get('verified'):
|
||||||
QMessageBox.information(None, _('Verification successful!'),
|
d.show_message(_('%s is covered by GreenAddress instant confirmation') % (tx.hash()), title=_('Verification successful!'))
|
||||||
_('%s is covered by GreenAddress instant confirmation') % (tx.hash()), _('OK'))
|
|
||||||
else:
|
else:
|
||||||
QMessageBox.critical(None, _('Verification failed!'),
|
d.show_critical(_('%s is not covered by GreenAddress instant confirmation') % (tx.hash()), title=_('Verification failed!'))
|
||||||
_('%s is not covered by GreenAddress instant confirmation') % (tx.hash()), _('OK'))
|
|
||||||
except BaseException as e:
|
except BaseException as e:
|
||||||
import traceback
|
import traceback
|
||||||
traceback.print_exc(file=sys.stdout)
|
traceback.print_exc(file=sys.stdout)
|
||||||
QMessageBox.information(None, _('Error'), str(e), _('OK'))
|
d.show_error(str(e))
|
||||||
finally:
|
finally:
|
||||||
d.verify_button.setText(self.button_label)
|
d.verify_button.setText(self.button_label)
|
||||||
|
|
Loading…
Add table
Reference in a new issue