Browse Source

Cleanup

tags/v0.9.0
falkTX 6 years ago
parent
commit
94478bd461
1 changed files with 11 additions and 7 deletions
  1. +11
    -7
      src/systray.py

+ 11
- 7
src/systray.py View File

@@ -29,16 +29,20 @@ else:
from PyQt4.QtGui import QAction, QMainWindow, QMenu, QSystemTrayIcon

try:
if os.getenv("DESKTOP_SESSION") in ("ubuntu", "ubuntu-2d") and not os.path.exists("/var/cadence/no_app_indicators"):
from gi.repository import Gtk, AppIndicator3 as AppIndicator
if False and os.getenv("DESKTOP_SESSION") in ("ubuntu", "ubuntu-2d") and not os.path.exists("/var/cadence/no_app_indicators"):
from gi import require_version
require_version('Gtk', '3.0')
from gi.repository import Gtk
require_version('AppIndicator3', '0.1')
from gi.repository import AppIndicator3 as AppIndicator
TrayEngine = "AppIndicator"

elif os.getenv("KDE_SESSION_VERSION") >= 5:
TrayEngine = "Qt"
#elif os.getenv("KDE_SESSION_VERSION") >= 5:
#TrayEngine = "Qt"

elif os.getenv("KDE_FULL_SESSION") or os.getenv("DESKTOP_SESSION") == "kde-plasma":
from PyKDE5.kdeui import KAction, KIcon, KMenu, KStatusNotifierItem
TrayEngine = "KDE"
#elif os.getenv("KDE_FULL_SESSION") or os.getenv("DESKTOP_SESSION") == "kde-plasma":
#from PyKDE5.kdeui import KAction, KIcon, KMenu, KStatusNotifierItem
#TrayEngine = "KDE"

else:
TrayEngine = "Qt"


Loading…
Cancel
Save