make it work with KDE 5

This commit is contained in:
Francesc Ortiz 2016-02-16 15:28:45 +01:00
parent 7eeeb94d2c
commit df0d7dcc34
1 changed files with 3 additions and 0 deletions

View File

@ -47,6 +47,9 @@ try:
from gi.repository import Gtk, AppIndicator3 as AppIndicator
TrayEngine = "AppIndicator"
elif os.getenv("KDE_SESSION_VERSION") >= 5:
TrayEngine = "Qt"
elif (os.getenv("KDE_FULL_SESSION") or os.getenv("DESKTOP_SESSION") == "kde-plasma") and not os.path.exists("/etc/debian_version"):
from PyKDE4.kdeui import KAction, KIcon, KMenu, KStatusNotifierItem