Quote:
Originally Posted by kovidgoyal
Depends if it s GUI plugin yes it should be.
|
Well, first I checked if the tray was available and supported messages:
Code:
QSystemTrayIcon.isSystemTrayAvailable()
QSystemTrayIcon.supportsMessages()
Both returned 'True'.
Then, I tried to show a message from a GUI plugin:
Code:
from calibre.gui2.ui import get_gui
from calibre.gui2 import notify
gui = get_gui()
tray = QSystemTrayIcon(gui)
n = notify.get_notifier(systray=tray)
n('hello', timeout=3000)
It didn't work. No message shown.
1) If I call get_notifier() without the systray argument, then it returns None
2) If instead of get_gui(), I use QApplication.instance(), it doesn't work either
What am I missing?