Commit 45017bb0 authored by Bezleputh's avatar Bezleputh

[boobank_indicator] Do not include load account type in total

parent a8c42d46
include boobank-indicator/data/indicator-boobank.png
include boobank-indicator/data/green_light.png
include boobank-indicator/data/red_light.png
include boobank-indicator/data/red_light.png
include boobank-indicator/data/personal-loan.png
exclude screenshot.png
\ No newline at end of file
......@@ -11,7 +11,7 @@ from gi.repository import Gtk, GObject, Notify
from gi.repository import AppIndicator3 as appindicator
from weboob.core import Weboob, CallErrors
from weboob.capabilities.bank import CapBank
from weboob.capabilities.bank import CapBank, Account
from weboob.capabilities import UserError
from weboob.tools.application.base import MoreResultsAvailable
from weboob.exceptions import BrowserUnavailable, BrowserIncorrectPassword, BrowserForbidden, BrowserSSLError
......@@ -42,7 +42,7 @@ class BoobankTransactionsChecker(Thread):
account_history_menu = Gtk.Menu()
for tr in self.weboob.do('iter_history', self.account, backends=self.account.backend):
label = "%s - %s: %s%s" % (tr.date, tr.label, tr.amount, self.account.currency_text)
label = u'%s - %s: %s%s' % (tr.date, tr.label, tr.amount, self.account.currency_text)
image = "green_light.png" if tr.amount > 0 else "red_light.png"
transaction_item = create_image_menu_item(label, image)
account_history_menu.append(transaction_item)
......@@ -91,11 +91,14 @@ class BoobankChecker():
if account.coming:
balance += account.coming
total += balance
currency = account.currency_text
if account.type != Account.TYPE_LOAN:
total += balance
image = "green_light.png" if balance > 0 else "red_light.png"
else:
image = "personal-loan.png"
currency = account.currency_text
label = "%s: %s%s" % (account.label, balance, account.currency_text)
image = "green_light.png" if balance > 0 else "red_light.png"
account_item = create_image_menu_item(label, image)
thread = BoobankTransactionsChecker(self.weboob, account_item, account)
thread.start()
......
......@@ -12,7 +12,7 @@ setup(name='boobank_indicator',
author_email='bezleputh@gmail.com',
packages=find_packages(),
package_data={
'boobank_indicator.data': ['indicator-boobank.png', 'green_light.png', 'red_light.png']
'boobank_indicator.data': ['indicator-boobank.png', 'green_light.png', 'red_light.png', 'personal-loan.png']
},
entry_points={
'console_scripts': ['boobank_indicator = boobank_indicator.boobank_indicator:main'],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment