Added date to the history overview of the lite GUI

This commit is contained in:
Maran 2012-12-09 13:39:28 +01:00
parent a32a679359
commit b564bedd52
2 changed files with 12 additions and 5 deletions

View File

@ -434,15 +434,19 @@ class MiniWindow(QDialog):
def update_completions(self, completions):
self.address_completions.setStringList(completions)
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:]:
tx_hash, conf, is_mine, value, fee, balance, timestamp = item
label = self.actuator.wallet.get_label(tx_hash)[0]
#amount = D(value) / 10**8
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):
self.actuator.acceptbit(self.quote_currencies[0])

View File

@ -6,10 +6,13 @@ class HistoryWidget(QTreeWidget):
def __init__(self, parent=None):
QTreeWidget.__init__(self, parent)
self.setColumnCount(2)
self.setHeaderLabels([_("Amount"), _("To / From")])
self.setHeaderLabels([_("Amount"), _("To / From"), _("When")])
self.setIndentation(0)
def append(self, address, amount):
item = QTreeWidgetItem([amount, address])
def empty(self):
self.clear()
def append(self, address, amount, date):
item = QTreeWidgetItem([amount, address, date])
self.insertTopLevelItem(0, item)