electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 98b361f3284d0cd53a0e675097a564b5944935e3
parent 33a1e2aa2de278edd472dfe0b4630a23cc018a27
Author: ThomasV <thomasv@gitorious>
Date:   Sun, 14 Sep 2014 12:40:09 +0200

code cleanup

Diffstat:
Mgui/qt/main_window.py | 6++----
Mgui/qt/util.py | 4++--
2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py @@ -1414,10 +1414,8 @@ class ElectrumWindow(QMainWindow): def create_account_menu(self, position, k, item): menu = QMenu() - if item.isExpanded(): - menu.addAction(_("Minimize"), lambda: self.account_set_expanded(item, k, False)) - else: - menu.addAction(_("Maximize"), lambda: self.account_set_expanded(item, k, True)) + exp = item.isExpanded() + menu.addAction(_("Minimize") if exp else _("Maximize"), lambda: self.account_set_expanded(item, k, not exp)) menu.addAction(_("Rename"), lambda: self.edit_account_label(k)) if self.wallet.seed_version > 4: menu.addAction(_("View details"), lambda: self.show_account_details(k)) diff --git a/gui/qt/util.py b/gui/qt/util.py @@ -210,9 +210,9 @@ class MyTreeWidget(QTreeWidget): def __init__(self, parent): QTreeWidget.__init__(self, parent) self.setContextMenuPolicy(Qt.CustomContextMenu) - self.connect(self, SIGNAL('itemActivated(QTreeWidgetItem*, int)'), self.itemactivated) + self.itemActivated.connect(self.on_activated) - def itemactivated(self, item): + def on_activated(self, item): if not item: return for i in range(0,self.viewport().height()/5): if self.itemAt(QPoint(0,i*5)) == item: