tAmountEdit:get_amount - electrum - Electrum Bitcoin wallet (HTM) git clone https://git.parazyd.org/electrum (DIR) Log (DIR) Files (DIR) Refs (DIR) Submodules --- (DIR) commit 068609b4a65a172a15a24299b8a0fad0ef82898c (DIR) parent a195ca5c07f5c04314537b29cd77e8d14c5c0f9c (HTM) Author: ThomasV <thomasv@gitorious> Date: Wed, 16 Jul 2014 15:33:59 +0200 AmountEdit:get_amount Diffstat: M gui/qt/amountedit.py | 6 ++++++ 1 file changed, 6 insertions(+), 0 deletions(-) --- (DIR) diff --git a/gui/qt/amountedit.py b/gui/qt/amountedit.py t@@ -53,6 +53,12 @@ class AmountEdit(MyLineEdit): painter.setPen(self.help_palette.brush(QPalette.Disabled, QPalette.Text).color()) painter.drawText(textRect, Qt.AlignRight | Qt.AlignVCenter, self.base_unit()) + def get_amount(self): + try: + x = int(str(self.text())) + except: + return None + return x class BTCAmountEdit(AmountEdit):