mambatray: use kcmshell5 to run proxy configuration in kde plasma 5

This commit is contained in:
Silvan Calarco 2018-02-10 16:48:26 +01:00
parent 544ab79409
commit aa5c3e894d

View File

@ -1,6 +1,6 @@
#!/usr/bin/python
# mambatray 2
# Copyright (C) 2011-2015 by Silvan Calarco
# Copyright (C) 2011-2018 by Silvan Calarco
# Copyright (C) 2011 by michiamophil
# Distributed under the terms of the GPL version 3 FLOSS License
#
@ -125,7 +125,7 @@ class SystemTrayIcon(QtGui.QSystemTrayIcon):
version = _("Error: Unable to find /etc/openmamba-release")
QtGui.QMessageBox.about(menu, _("About"),
"<center><b>"+_("openmamba control center")+"</b>"
"<br><br>Copyright(c) 2011-2015 by Silvan Calarco"
"<br><br>Copyright(c) 2011-2018 by Silvan Calarco"
"<br>Copyright(c) 2011 by michiamophil"
"<br><br><b>"+_("System info:")+"</b></center>"
""+_(version)+"<center><a href=\"http://openmamba.org\">http://openmamba.org</a></center>")
@ -195,7 +195,7 @@ class SystemTrayIcon(QtGui.QSystemTrayIcon):
def networkProxy(self):
if desktop_session == 'kde':
networkProxyProcess.execute("/opt/kde/bin/kcmshell4", QtCore.QStringList(list(set(['proxy']))))
networkProxyProcess.execute("/opt/kde/bin/kcmshell5", QtCore.QStringList(list(set(['proxy']))))
elif desktop_session == 'gnome':
networkProxyProcess.execute("/usr/bin/gnome-control-center", "network")
self.setProxyForSmart()