commit b0d223e6bb957dbdd8c3735301723f73af8c867b
parent 6585da69feb4f8fe3b85441d7da8a6a3ed6bfb83
Author: ecdsa <ecdsa@github>
Date: Sat, 13 Apr 2013 18:15:55 +0200
trying to fix column_widths
Diffstat:
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/gui/gui_classic.py b/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()