Browse Source
qt history list: hide columns sooner
while wallet was starting up "hidden columns" were visible
3.3.3.1
SomberNight
6 years ago
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
3 changed files with
9 additions and
3 deletions
-
electrum/gui/qt/address_dialog.py
-
electrum/gui/qt/history_list.py
-
electrum/gui/qt/main_window.py
|
|
@ -89,7 +89,7 @@ class AddressDialog(WindowModalDialog): |
|
|
|
vbox.addWidget(QLabel(_("History"))) |
|
|
|
addr_hist_model = AddressHistoryModel(self.parent, self.address) |
|
|
|
self.hw = HistoryList(self.parent, addr_hist_model) |
|
|
|
addr_hist_model.view = self.hw |
|
|
|
addr_hist_model.set_view(self.hw) |
|
|
|
vbox.addWidget(self.hw) |
|
|
|
|
|
|
|
vbox.addLayout(Buttons(CloseButton(self))) |
|
|
|
|
|
@ -76,10 +76,16 @@ class HistoryModel(QAbstractItemModel, PrintError): |
|
|
|
def __init__(self, parent): |
|
|
|
super().__init__(parent) |
|
|
|
self.parent = parent |
|
|
|
self.view = None # type: HistoryList # set by caller! FIXME... |
|
|
|
self.view = None # type: HistoryList |
|
|
|
self.transactions = OrderedDictWithIndex() |
|
|
|
self.tx_status_cache = {} # type: Dict[str, Tuple[int, str]] |
|
|
|
|
|
|
|
def set_view(self, history_list: 'HistoryList'): |
|
|
|
# FIXME HistoryModel and HistoryList mutually depend on each other. |
|
|
|
# After constructing both, this method needs to be called. |
|
|
|
self.view = history_list # type: HistoryList |
|
|
|
self.set_visibility_of_columns() |
|
|
|
|
|
|
|
def columnCount(self, parent: QModelIndex): |
|
|
|
return self.NUM_COLUMNS |
|
|
|
|
|
|
|
|
|
@ -812,7 +812,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): |
|
|
|
def create_history_tab(self): |
|
|
|
self.history_model = HistoryModel(self) |
|
|
|
self.history_list = l = HistoryList(self, self.history_model) |
|
|
|
self.history_model.view = self.history_list |
|
|
|
self.history_model.set_view(self.history_list) |
|
|
|
l.searchable_list = l |
|
|
|
toolbar = l.create_toolbar(self.config) |
|
|
|
toolbar_shown = self.config.get('show_toolbar_history', False) |
|
|
|