qml/qeapp.py: (trivial) use os.path.join for constructing path
There is an issue with plyer on Windows, which I thought was related to the mixed
backwards/forward slashes in the path, but no, this change still did not fix it:
```
1.84 | D | gui.qml.qeapp.QEAppController | sending push notification to OS: message='heyheyhey'
Traceback (most recent call last):
File "...\electrum\electrum\util.py", line 1111, in run_with_except_hook
run_original(*args2, **kwargs2)
File "...\Python310\lib\threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "...\plyer\platforms\win\libs\balloontip.py", line 206, in balloon_tip
WindowsBalloonTip(**kwargs)
File "...\plyer\platforms\win\libs\balloontip.py", line 130, in __init__
raise Exception('Could not load icon {}'.format(app_icon))
Exception: Could not load icon ...\electrum\electrum\gui\icons\electrum.png
```
This commit is contained in:
@@ -154,8 +154,9 @@ class QEAppController(BaseCrashReporter, QObject):
|
||||
global notification
|
||||
if not notification:
|
||||
from plyer import notification
|
||||
icon = (os.path.dirname(os.path.realpath(__file__))
|
||||
+ '/../icons/electrum.png')
|
||||
icon = os.path.join(
|
||||
os.path.dirname(os.path.dirname(os.path.realpath(__file__))), "icons", "electrum.png",
|
||||
)
|
||||
notification.notify('Electrum', message, app_icon=icon, app_name='Electrum')
|
||||
except ImportError:
|
||||
self.logger.warning('Notification: needs plyer; `sudo python3 -m pip install plyer`')
|
||||
|
||||
Reference in New Issue
Block a user