URI: 
       tcolumn for payment request memo - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit 89a1b48ba1f7cd788ecff4c6c074b5b5ac664622
   DIR parent 2b751f8026bb547ac9d4d8b98efc45f4731ff546
  HTML Author: ThomasV <thomasv@gitorious>
       Date:   Thu, 12 Jun 2014 10:20:06 +0200
       
       column for payment request memo
       
       Diffstat:
         M gui/qt/main_window.py               |      20 +++++++++++++-------
         M lib/paymentrequest.py               |       3 +++
       
       2 files changed, 16 insertions(+), 7 deletions(-)
       ---
   DIR diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py
       t@@ -925,7 +925,7 @@ class ElectrumWindow(QMainWindow):
                pr = self.gui_object.payment_request
                pr_id = pr.get_id()
                # save it
       -        self.invoices[pr_id] = (pr.get_domain(), pr.get_amount())
       +        self.invoices[pr_id] = (pr.get_domain(), pr.get_memo(), pr.get_amount())
                self.wallet.storage.put('invoices', self.invoices)
                self.update_invoices_tab()
        
       t@@ -1050,7 +1050,10 @@ class ElectrumWindow(QMainWindow):
        
        
            def create_invoices_tab(self):
       -        l, w = self.create_list_tab([_('Requestor'), _('Amount'), _('Status')])
       +        l, w = self.create_list_tab([_('Requestor'), _('Memo'),_('Amount'), _('Status')])
       +        h = l.header()
       +        h.setStretchLastSection(False)
       +        h.setResizeMode(1, QHeaderView.Stretch)
                l.setContextMenuPolicy(Qt.CustomContextMenu)
                l.customContextMenuRequested.connect(self.create_invoice_menu)
                self.invoices_list = l
       t@@ -1060,10 +1063,13 @@ class ElectrumWindow(QMainWindow):
                invoices = self.wallet.storage.get('invoices', {})
                l = self.invoices_list
                l.clear()
       -
       -        for item, value in invoices.items():
       -            domain, amount = value
       -            item = QTreeWidgetItem( [ domain, self.format_amount(amount), ""] )
       +        for key, value in invoices.items():
       +            try:
       +                domain, memo, amount = value
       +            except:
       +                invoices.pop(key)
       +                continue
       +            item = QTreeWidgetItem( [ domain, memo, self.format_amount(amount), ""] )
                    l.addTopLevelItem(item)
        
                l.setCurrentItem(l.topLevelItem(0))
       t@@ -1214,7 +1220,7 @@ class ElectrumWindow(QMainWindow):
        
            def show_invoice(self, key):
                from electrum.paymentrequest import PaymentRequest
       -        domain, value = self.invoices[key]
       +        domain, memo, value = self.invoices[key]
                pr = PaymentRequest(self.config)
                pr.read_file(key)
                pr.domain = domain
   DIR diff --git a/lib/paymentrequest.py b/lib/paymentrequest.py
       t@@ -272,6 +272,9 @@ class PaymentRequest:
            def get_domain(self):
                return self.domain
        
       +    def get_memo(self):
       +        return self.memo
       +
            def get_id(self):
                return self.id