From c0874220d28634c19ecb4835941e95a02ec83b4a Mon Sep 17 00:00:00 2001 From: Daniel Pavel Date: Thu, 8 Aug 2013 17:26:29 +0200 Subject: [PATCH] don't str() translated device status; fixes #108 --- lib/solaar/ui/notify.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/solaar/ui/notify.py b/lib/solaar/ui/notify.py index 81b0f9a1..48391a01 100644 --- a/lib/solaar/ui/notify.py +++ b/lib/solaar/ui/notify.py @@ -112,8 +112,14 @@ try: if n is None: n = _notifications[summary] = Notify.Notification() - message = reason or (_("unpaired") if dev.status is None else - (str(dev.status) or (_("connected") if dev.status else _("offline")))) + if reason: + message = reason + elif dev.status is None: + message = _("unpaired") + elif bool(dev.status): + message = dev.status.__str__() or _("connected") + else: + message = _("offline") # we need to use the filename here because the notifications daemon # is an external application that does not know about our icon sets