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
parent
commit
ca1043ffda
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 2
      electrum/gui/qt/address_dialog.py
  2. 8
      electrum/gui/qt/history_list.py
  3. 2
      electrum/gui/qt/main_window.py

2
electrum/gui/qt/address_dialog.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)))

8
electrum/gui/qt/history_list.py

@ -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

2
electrum/gui/qt/main_window.py

@ -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)

Loading…
Cancel
Save