1
0

Merge pull request #3155 from bauerj/address-tab-combobox

Use combo box instead of buttons to filter address tab
This commit is contained in:
ThomasV
2017-10-30 19:33:31 +01:00
committed by GitHub
2 changed files with 24 additions and 27 deletions

View File

@@ -1567,16 +1567,16 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
self.utxo_list.update()
self.update_fee()
def create_list_tab(self, l, buttons=None):
def create_list_tab(self, l, list_header=None):
w = QWidget()
w.searchable_list = l
vbox = QVBoxLayout()
w.setLayout(vbox)
vbox.setContentsMargins(0, 0, 0, 0)
vbox.setSpacing(0)
if buttons:
if list_header:
hbox = QHBoxLayout()
for b in buttons:
for b in list_header:
hbox.addWidget(b)
hbox.addStretch()
vbox.addLayout(hbox)
@@ -1586,7 +1586,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
def create_addresses_tab(self):
from .address_list import AddressList
self.address_list = l = AddressList(self)
return self.create_list_tab(l, l.get_buttons())
return self.create_list_tab(l, l.get_list_header())
def create_utxo_tab(self):
from .utxo_list import UTXOList