Browse Source

trying to fix column_widths

283 1.7.3
ecdsa 12 years ago
parent
commit
b0d223e6bb
  1. 14
      gui/gui_classic.py

14
gui/gui_classic.py

@ -254,8 +254,7 @@ def text_dialog(parent, title, label, ok_label):
default_column_widths = { "history":[40,140,350,140], "contacts":[350,330],
"receive":[[370],[370,200,130]] }
default_column_widths = { "history":[40,140,350,140], "contacts":[350,330], "receive":[[370], [370,200,130]] }
class ElectrumWindow(QMainWindow):
@ -965,6 +964,8 @@ class ElectrumWindow(QMainWindow):
for i in range(self.contacts_list.columnCount() - 1):
self.column_widths["contacts"].append(self.contacts_list.columnWidth(i))
self.config.set_key("column_widths", self.column_widths, True)
def create_contacts_tab(self):
l,w,hbox = self.create_list_tab([_('Address'), _('Label'), _('Tx')])
@ -1084,12 +1085,8 @@ class ElectrumWindow(QMainWindow):
l.clear()
l.setColumnHidden(2, not self.expert_mode)
l.setColumnHidden(3, not self.expert_mode)
if not self.expert_mode:
width = self.column_widths['receive'][0][0]
l.setColumnWidth(0, width)
else:
for i,width in enumerate(self.column_widths['receive'][self.expert_mode]):
l.setColumnWidth(i, width)
for i,width in enumerate(self.column_widths['receive'][self.expert_mode]):
l.setColumnWidth(i, width)
if self.current_account is None:
account_items = self.wallet.accounts.items()
@ -2283,7 +2280,6 @@ class ElectrumWindow(QMainWindow):
g = self.geometry()
self.config.set_key("winpos-qt", [g.left(),g.top(),g.width(),g.height()], True)
self.save_column_widths()
self.config.set_key("column_widths", self.column_widths, True)
self.config.set_key("console-history",self.console.history[-50:])
event.accept()

Loading…
Cancel
Save