URI: 
       timprove signed URI window - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit 1e668209dcbec5ccf32121e9199f3ff2bc671e81
   DIR parent 9c30ad3dd5fb10832579e858c3cfdded06444dad
  HTML Author: ThomasV <thomasv@gitorious>
       Date:   Sun, 19 Jul 2015 10:54:45 +0200
       
       improve signed URI window
       
       Diffstat:
         M gui/qt/main_window.py               |      18 +++++++++++-------
         M gui/qt/util.py                      |       7 +++++++
       
       2 files changed, 18 insertions(+), 7 deletions(-)
       ---
   DIR diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py
       t@@ -716,8 +716,8 @@ class ElectrumWindow(QMainWindow):
                menu.addAction(_("Copy Address"), lambda: self.app.clipboard().setText(addr))
                menu.addAction(_("Copy URI"), lambda: self.app.clipboard().setText(str(URI)))
                if req.get('signature'):
       -            menu.addAction(_("View signed URI"), lambda: self.view_signed_request(addr))
       -        menu.addAction(_("Export as BIP70 file"), lambda: self.export_payment_request(addr)) #.setEnabled(amount is not None)
       +            menu.addAction(_("Copy Signed URI"), lambda: self.view_signed_request(addr))
       +        menu.addAction(_("Save as BIP70 file"), lambda: self.export_payment_request(addr)) #.setEnabled(amount is not None)
                menu.addAction(_("Delete"), lambda: self.delete_payment_request(item))
                run_hook('receive_list_menu', menu, addr)
                menu.exec_(self.receive_list.viewport().mapToGlobal(position))
       t@@ -774,12 +774,16 @@ class ElectrumWindow(QMainWindow):
                dialog.setWindowTitle(_("Signed Request"))
                vbox = QVBoxLayout()
                pr_e = ShowQRTextEdit(text=pr_text)
       -        pr_e.setMaximumHeight(170)
       -        msg = _('This URI contains the payment request signed with your alias.') + '\n' + _('Note: This feature is experimental')
       -        vbox.addWidget(QLabel(msg))
       -        vbox.addWidget(pr_e)
                pr_e.addCopyButton(self.app)
       -        vbox.addLayout(Buttons(CloseButton(dialog)))
       +        msg = ' '.join([_('The following URI contains your payment request signed with your OpenAlias key.'),
       +                        _('The signature is a proof that the payment was requested by you.')])
       +        l = QLabel(msg)
       +        l.setWordWrap(True)
       +        vbox.addWidget(l)
       +        vbox.addWidget(pr_e)
       +        msg = _('Note: This format is experimental and may not be supported by other Bitcoin clients.')
       +        vbox.addWidget(QLabel(msg))
       +        vbox.addLayout(Buttons(CopyCloseButton(pr_e.text, self.app, dialog)))
                dialog.setLayout(vbox)
                dialog.exec_()
        
   DIR diff --git a/gui/qt/util.py b/gui/qt/util.py
       t@@ -167,6 +167,13 @@ class CopyButton(QPushButton):
                QPushButton.__init__(self, _("Copy"))
                self.clicked.connect(lambda: app.clipboard().setText(text_getter()))
        
       +class CopyCloseButton(QPushButton):
       +    def __init__(self, text_getter, app, dialog):
       +        QPushButton.__init__(self, _("Copy and Close"))
       +        self.clicked.connect(lambda: app.clipboard().setText(text_getter()))
       +        self.clicked.connect(dialog.close)
       +        self.setDefault(True)
       +
        class OkButton(QPushButton):
            def __init__(self, dialog, label=None):
                QPushButton.__init__(self, label or _("OK"))