log tray/notification capabilities
This commit is contained in:
@@ -1,11 +1,21 @@
|
||||
import logging
|
||||
|
||||
from PyQt6 import QtGui, QtWidgets
|
||||
from gotify_tray.__version__ import __title__
|
||||
|
||||
|
||||
logger = logging.getLogger("gotify-tray")
|
||||
|
||||
|
||||
class Tray(QtWidgets.QSystemTrayIcon):
|
||||
def __init__(self):
|
||||
super(Tray, self).__init__()
|
||||
|
||||
if not self.isSystemTrayAvailable():
|
||||
logger.warning("System tray is not available.")
|
||||
if not self.supportsMessages():
|
||||
logger.warning("System does not support notifications.")
|
||||
|
||||
self.set_icon_error()
|
||||
self.setToolTip(__title__)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user