Browse Source

Make more dialogs window-modal

283
Neil Booth 9 years ago
parent
commit
0f431b23eb
  1. 22
      gui/qt/main_window.py

22
gui/qt/main_window.py

@ -1640,8 +1640,7 @@ class ElectrumWindow(QMainWindow, PrintError):
self.show_pr_details(pr) self.show_pr_details(pr)
def show_pr_details(self, pr): def show_pr_details(self, pr):
d = QDialog(self) d = WindowModalDialog(self, _("Invoice"))
d.setWindowTitle(_("Invoice"))
vbox = QVBoxLayout(d) vbox = QVBoxLayout(d)
grid = QGridLayout() grid = QGridLayout()
grid.addWidget(QLabel(_("Requestor") + ':'), 0, 0) grid.addWidget(QLabel(_("Requestor") + ':'), 0, 0)
@ -2000,10 +1999,8 @@ class ElectrumWindow(QMainWindow, PrintError):
self.show_message(str(e)) self.show_message(str(e))
return return
d = QDialog(self) d = WindowModalDialog(self, _("Public key"))
d.setMinimumSize(600, 200) d.setMinimumSize(600, 200)
d.setModal(1)
d.setWindowTitle(_("Public key"))
vbox = QVBoxLayout() vbox = QVBoxLayout()
vbox.addWidget( QLabel(_("Address") + ': ' + address)) vbox.addWidget( QLabel(_("Address") + ': ' + address))
vbox.addWidget( QLabel(_("Public key") + ':')) vbox.addWidget( QLabel(_("Public key") + ':'))
@ -2292,8 +2289,7 @@ class ElectrumWindow(QMainWindow, PrintError):
QMessageBox.warning(self, _('Error'), str(e), _('OK')) QMessageBox.warning(self, _('Error'), str(e), _('OK'))
return return
d = QDialog(self) d = WindowModalDialog(self, _('Private keys'))
d.setWindowTitle(_('Private keys'))
d.setMinimumSize(850, 300) d.setMinimumSize(850, 300)
vbox = QVBoxLayout(d) vbox = QVBoxLayout(d)
@ -2544,9 +2540,7 @@ class ElectrumWindow(QMainWindow, PrintError):
def settings_dialog(self): def settings_dialog(self):
self.need_restart = False self.need_restart = False
d = QDialog(self) d = WindowModalDialog(self, _('Preferences'))
d.setWindowTitle(_('Preferences'))
d.setModal(1)
vbox = QVBoxLayout() vbox = QVBoxLayout()
tabs = QTabWidget() tabs = QTabWidget()
gui_widgets = [] gui_widgets = []
@ -2841,9 +2835,7 @@ class ElectrumWindow(QMainWindow, PrintError):
def plugins_dialog(self): def plugins_dialog(self):
self.pluginsdialog = d = QDialog(self) self.pluginsdialog = d = WindowModalDialog(self, _('Electrum Plugins'))
d.setWindowTitle(_('Electrum Plugins'))
d.setModal(1)
plugins = self.gui_object.plugins plugins = self.gui_object.plugins
@ -2906,9 +2898,7 @@ class ElectrumWindow(QMainWindow, PrintError):
def show_account_details(self, k): def show_account_details(self, k):
account = self.wallet.accounts[k] account = self.wallet.accounts[k]
d = QDialog(self) d = WindowModalDialog(self, _('Account Details'))
d.setWindowTitle(_('Account Details'))
d.setModal(1)
vbox = QVBoxLayout(d) vbox = QVBoxLayout(d)
name = self.wallet.get_account_name(k) name = self.wallet.get_account_name(k)

Loading…
Cancel
Save