mambatray: run plasma-discover and pkcon in every kind of sessione (KDE and LXQt)

This commit is contained in:
Silvan Calarco 2022-01-02 20:53:33 +01:00
parent 8126e139eb
commit dc82198db9

View File

@ -1,6 +1,6 @@
#!/usr/bin/python3
# mambatray 2
# Copyright (C) 2011-2021 by Silvan Calarco
# Copyright (C) 2011-2022 by Silvan Calarco
# Copyright (C) 2011 by michiamophil
# Distributed under the terms of the GPL version 3 FLOSS License
#
@ -142,7 +142,7 @@ class SystemTrayIcon(QSystemTrayIcon):
version = _("Error: Unable to find /etc/openmamba-release")
QMessageBox.about(self.menu, _("About"),
"<center><b>"+_("openmamba control center")+"</b>"
"<br><br>Copyright(c) 2011-2021 by Silvan Calarco"
"<br><br>Copyright(c) 2011-2022 by Silvan Calarco"
"<br>Copyright(c) 2011 by michiamophil"
"<br><br><b>"+_("System info:")+"</b></center>"
""+_(version)+"<center><a href=\"https://openmamba.org\">https://openmamba.org</a></center>")
@ -161,21 +161,11 @@ class SystemTrayIcon(QSystemTrayIcon):
def softwareManager(self):
#self.setProxyForSmart()
if desktop_session == 'plasma':
softwareManagerProcess.execute("/usr/bin/plasma-discover")
elif desktop_session == 'kde':
softwareManagerProcess.execute("/opt/kde/bin/apper")
else:
softwareManagerProcess.execute("/usr/bin/gpk-application")
def softwareCheckUpgrades(self):
#self.setProxyForSmart()
if desktop_session == 'plasma':
softwareCheckUpgradesProcess.start("/usr/bin/pkcon", ['refresh', 'force'])
elif desktop_session == 'kde':
softwareCheckUpgradesProcess.start("/usr/bin/plasma-discover")
else:
softwareCheckUpgradesProcess.start("/usr/bin/gpk-update-viewer")
def refreshPackagesCache(self):
#self.setProxyForSmart()