fix #3993
This commit is contained in:
@@ -50,7 +50,7 @@ class AddressList(MyTreeWidget):
|
|||||||
for t in [_('All'), _('Unused'), _('Funded'), _('Used')]:
|
for t in [_('All'), _('Unused'), _('Funded'), _('Used')]:
|
||||||
self.used_button.addItem(t)
|
self.used_button.addItem(t)
|
||||||
|
|
||||||
def create_toolbar_buttons(self):
|
def get_toolbar_buttons(self):
|
||||||
return QLabel(_("Filter:")), self.change_button, self.used_button
|
return QLabel(_("Filter:")), self.change_button, self.used_button
|
||||||
|
|
||||||
def on_hide_toolbar(self):
|
def on_hide_toolbar(self):
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ class HistoryList(MyTreeWidget, AcceptFileDragDrop):
|
|||||||
self.start_timestamp = None
|
self.start_timestamp = None
|
||||||
self.end_timestamp = None
|
self.end_timestamp = None
|
||||||
self.years = []
|
self.years = []
|
||||||
|
self.create_toolbar_buttons()
|
||||||
|
|
||||||
def format_date(self, d):
|
def format_date(self, d):
|
||||||
return str(datetime.date(d.year, d.month, d.day)) if d else _('None')
|
return str(datetime.date(d.year, d.month, d.day)) if d else _('None')
|
||||||
@@ -115,6 +116,8 @@ class HistoryList(MyTreeWidget, AcceptFileDragDrop):
|
|||||||
self.end_button.setEnabled(False)
|
self.end_button.setEnabled(False)
|
||||||
self.period_combo.addItems([_('All'), _('Custom')])
|
self.period_combo.addItems([_('All'), _('Custom')])
|
||||||
self.period_combo.activated.connect(self.on_combo)
|
self.period_combo.activated.connect(self.on_combo)
|
||||||
|
|
||||||
|
def get_toolbar_buttons(self):
|
||||||
return self.period_combo, self.start_button, self.end_button
|
return self.period_combo, self.start_button, self.end_button
|
||||||
|
|
||||||
def on_hide_toolbar(self):
|
def on_hide_toolbar(self):
|
||||||
|
|||||||
@@ -524,7 +524,7 @@ class MyTreeWidget(QTreeWidget):
|
|||||||
|
|
||||||
def create_toolbar(self):
|
def create_toolbar(self):
|
||||||
hbox = QHBoxLayout()
|
hbox = QHBoxLayout()
|
||||||
buttons = self.create_toolbar_buttons()
|
buttons = self.get_toolbar_buttons()
|
||||||
for b in buttons:
|
for b in buttons:
|
||||||
b.setVisible(False)
|
b.setVisible(False)
|
||||||
hbox.addWidget(b)
|
hbox.addWidget(b)
|
||||||
|
|||||||
Reference in New Issue
Block a user