gui: proper dialog for private keys (fixes issue #500)
authorthomasv <thomasv@gitorious>
Mon, 16 Dec 2013 14:40:24 +0000 (15:40 +0100)
committerthomasv <thomasv@gitorious>
Mon, 16 Dec 2013 14:40:24 +0000 (15:40 +0100)
gui/qt/main_window.py

index b96e366..eb6afe5 100644 (file)
@@ -1694,7 +1694,20 @@ class ElectrumWindow(QMainWindow):
         except Exception as e:
             self.show_message(str(e))
             return
-        QMessageBox.information(self, _('Private key'), _('Address')+ ': ' + address + '\n\n' + _('Private key') + ': ' + '\n'.join(pk_list), _('OK'))
+
+        d = QDialog(self)
+        d.setMinimumSize(600, 200)
+        d.setModal(1)
+        vbox = QVBoxLayout()
+        vbox.addWidget( QLabel(_("Address") + ': ' + address))
+        vbox.addWidget( QLabel(_("Private key") + ':'))
+        keys = QTextEdit()
+        keys.setReadOnly(True)
+        keys.setText('\n'.join(pk_list))
+        vbox.addWidget(keys)
+        vbox.addLayout(close_button(d))
+        d.setLayout(vbox)
+        d.exec_()
 
 
     @protected