|
|
@ -1354,14 +1354,14 @@ class ElectrumWindow(QMainWindow): |
|
|
|
|
|
|
|
|
|
|
|
def create_invoices_tab(self): |
|
|
|
l, w = self.create_list_tab([_('Status'), _('Date'), _('Requestor'), _('Memo'), _('Amount')]) |
|
|
|
l.setColumnWidth(0, 60) |
|
|
|
l, w = self.create_list_tab([_('Date'), _('Requestor'), _('Memo'), _('Amount'), _('Status')]) |
|
|
|
l.setColumnWidth(0, 150) |
|
|
|
l.setColumnWidth(1, 150) |
|
|
|
l.setColumnWidth(2, 150) |
|
|
|
l.setColumnWidth(4, 150) |
|
|
|
l.setColumnWidth(3, 150) |
|
|
|
l.setColumnWidth(4, 40) |
|
|
|
h = l.header() |
|
|
|
h.setStretchLastSection(False) |
|
|
|
h.setResizeMode(3, QHeaderView.Stretch) |
|
|
|
h.setResizeMode(2, QHeaderView.Stretch) |
|
|
|
l.setContextMenuPolicy(Qt.CustomContextMenu) |
|
|
|
l.customContextMenuRequested.connect(self.create_invoice_menu) |
|
|
|
self.invoices_list = l |
|
|
@ -1376,13 +1376,13 @@ class ElectrumWindow(QMainWindow): |
|
|
|
if status == PR_UNPAID and expiration_date and expiration_date < time.time(): |
|
|
|
status = PR_EXPIRED |
|
|
|
date_str = datetime.datetime.fromtimestamp(expiration_date).isoformat(' ')[:-3] |
|
|
|
item = QTreeWidgetItem( [ '', date_str, domain, memo, self.format_amount(amount, whitespaces=True)] ) |
|
|
|
item = QTreeWidgetItem( [ date_str, domain, memo, self.format_amount(amount, whitespaces=True), ''] ) |
|
|
|
icon = QIcon(pr_icons.get(status)) |
|
|
|
item.setIcon(0, icon) |
|
|
|
item.setToolTip(0, pr_tooltips.get(status,'')) |
|
|
|
item.setIcon(4, icon) |
|
|
|
item.setToolTip(4, pr_tooltips.get(status,'')) |
|
|
|
item.setData(0, 32, key) |
|
|
|
item.setFont(1, QFont(MONOSPACE_FONT)) |
|
|
|
item.setFont(2, QFont(MONOSPACE_FONT)) |
|
|
|
item.setFont(3, QFont(MONOSPACE_FONT)) |
|
|
|
l.addTopLevelItem(item) |
|
|
|
l.setCurrentItem(l.topLevelItem(0)) |
|
|
|
|
|
|
|