electrum

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

commit c89fc345af2a5de5a16cdce20fbf4fa690ce9e59
parent 7a8689f6aa118fef3fd521acca526bf1f86045f2
Author: thomasv <thomasv@gitorious>
Date:   Wed,  6 Jun 2012 16:08:29 +0200

fix gap visualization

Diffstat:
Mlib/gui_qt.py | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/gui_qt.py b/lib/gui_qt.py @@ -650,6 +650,7 @@ class ElectrumWindow(QMainWindow): self.receive_list.clear() self.change_list.clear() gap = 0 + is_red = False for address in self.wallet.all_addresses(): if self.wallet.is_change(address): l = self.change_list @@ -666,6 +667,8 @@ class ElectrumWindow(QMainWindow): tx = "None" if l == self.receive_list: gap += 1 + if gap > self.wallet.gap_limit: + is_red = True else: tx = "%d"%n if l == self.receive_list: @@ -680,7 +683,7 @@ class ElectrumWindow(QMainWindow): item.setBackgroundColor(0, QColor('lightgreen')) item.setFont(0, QFont(MONOSPACE_FONT)) - if gap > self.wallet.gap_limit and l == self.receive_list: + if is_red and l==self.receive_list: item.setBackgroundColor(0, QColor('red')) l.addTopLevelItem(item)