From ae1a0bcda7dba6293ed53e01aef6bdbebc1bd7d5 Mon Sep 17 00:00:00 2001 From: Inso <insomniak.fr@gmail.com> Date: Sat, 6 Jun 2015 18:28:50 +0200 Subject: [PATCH] Only show balance with the Units referential --- res/ui/transactions_tab.ui | 2 +- src/cutecoin/core/app.py | 1 - src/cutecoin/gui/transactions_tab.py | 9 +++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/res/ui/transactions_tab.ui b/res/ui/transactions_tab.ui index bbeeff8a..e267081c 100644 --- a/res/ui/transactions_tab.ui +++ b/res/ui/transactions_tab.ui @@ -44,7 +44,7 @@ </layout> </item> <item> - <layout class="QHBoxLayout" name="horizontalLayout"> + <layout class="QHBoxLayout" name="layout_balance"> <item> <widget class="QLabel" name="label_payment"> <property name="text"> diff --git a/src/cutecoin/core/app.py b/src/cutecoin/core/app.py index 2c1ef32c..ef02f895 100644 --- a/src/cutecoin/core/app.py +++ b/src/cutecoin/core/app.py @@ -404,7 +404,6 @@ class Application(QObject): request = QNetworkRequest(url) self._network_manager.get(request) - @pyqtSlot(QNetworkReply) def read_available_version(self, reply): latest = None diff --git a/src/cutecoin/gui/transactions_tab.py b/src/cutecoin/gui/transactions_tab.py index 55e4ce21..3cd7a48a 100644 --- a/src/cutecoin/gui/transactions_tab.py +++ b/src/cutecoin/gui/transactions_tab.py @@ -82,6 +82,15 @@ class TransactionsTabWidget(QWidget, Ui_transactionsTabWidget): self.table_history.resizeColumnsToContents() def refresh_balance(self): + if self.app.current_account.referential == 'Units': + self.label_balance.show() + self.label_deposit.show() + self.label_payment.show() + else: + self.label_balance.hide() + self.label_deposit.hide() + self.label_payment.hide() + proxy = self.table_history.model() balance = proxy.deposits - proxy.payments if isinstance(proxy.deposits, int): -- GitLab