Added date to the history overview of the lite GUI
This commit is contained in:
parent
a32a679359
commit
b564bedd52
@ -434,15 +434,19 @@ class MiniWindow(QDialog):
|
|||||||
|
|
||||||
def update_completions(self, completions):
|
def update_completions(self, completions):
|
||||||
self.address_completions.setStringList(completions)
|
self.address_completions.setStringList(completions)
|
||||||
|
|
||||||
|
|
||||||
def update_history(self, tx_history):
|
def update_history(self, tx_history):
|
||||||
from util import format_satoshis
|
from util import format_satoshis, age
|
||||||
|
|
||||||
|
self.history_list.empty()
|
||||||
|
|
||||||
for item in tx_history[-10:]:
|
for item in tx_history[-10:]:
|
||||||
tx_hash, conf, is_mine, value, fee, balance, timestamp = item
|
tx_hash, conf, is_mine, value, fee, balance, timestamp = item
|
||||||
label = self.actuator.wallet.get_label(tx_hash)[0]
|
label = self.actuator.wallet.get_label(tx_hash)[0]
|
||||||
#amount = D(value) / 10**8
|
#amount = D(value) / 10**8
|
||||||
v_str = format_satoshis(value, True)
|
v_str = format_satoshis(value, True)
|
||||||
self.history_list.append(label, v_str)
|
self.history_list.append(label, v_str, age(timestamp))
|
||||||
|
|
||||||
def acceptbit(self):
|
def acceptbit(self):
|
||||||
self.actuator.acceptbit(self.quote_currencies[0])
|
self.actuator.acceptbit(self.quote_currencies[0])
|
||||||
|
|||||||
@ -6,10 +6,13 @@ class HistoryWidget(QTreeWidget):
|
|||||||
def __init__(self, parent=None):
|
def __init__(self, parent=None):
|
||||||
QTreeWidget.__init__(self, parent)
|
QTreeWidget.__init__(self, parent)
|
||||||
self.setColumnCount(2)
|
self.setColumnCount(2)
|
||||||
self.setHeaderLabels([_("Amount"), _("To / From")])
|
self.setHeaderLabels([_("Amount"), _("To / From"), _("When")])
|
||||||
self.setIndentation(0)
|
self.setIndentation(0)
|
||||||
|
|
||||||
def append(self, address, amount):
|
def empty(self):
|
||||||
item = QTreeWidgetItem([amount, address])
|
self.clear()
|
||||||
|
|
||||||
|
def append(self, address, amount, date):
|
||||||
|
item = QTreeWidgetItem([amount, address, date])
|
||||||
self.insertTopLevelItem(0, item)
|
self.insertTopLevelItem(0, item)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user