tgui: simplify column widths - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit d52d5276f8b36f98e75b8e56f252cbeaac784d87 DIR parent c63948b314359ebbdb63ec5f170a5aced3e098b4 HTML Author: ThomasV <thomasv@gitorious> Date: Fri, 4 Oct 2013 15:05:59 +0200 gui: simplify column widths Diffstat: M gui/qt/main_window.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) --- DIR diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py t@@ -95,7 +95,7 @@ class StatusBarButton(QPushButton): -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,200,130] } class ElectrumWindow(QMainWindow): def changeEvent(self, event): t@@ -1031,10 +1031,9 @@ class ElectrumWindow(QMainWindow): def save_column_widths(self): - widths = [] + self.column_widths["receive"] = [] for i in range(self.receive_list.columnCount() -1): - widths.append(self.receive_list.columnWidth(i)) - self.column_widths["receive"][1] = widths + self.column_widths["receive"].append(self.receive_list.columnWidth(i)) self.column_widths["history"] = [] for i in range(self.history_list.columnCount() - 1): t@@ -1182,7 +1181,7 @@ class ElectrumWindow(QMainWindow): l.clear() l.setColumnHidden(2, False) l.setColumnHidden(3, False) - for i,width in enumerate(self.column_widths['receive'][1]): + for i,width in enumerate(self.column_widths['receive']): l.setColumnWidth(i, width) if self.current_account is None: