Drop support for guarddog and add support for kcm_ufw and gufw ufw GUI's
This commit is contained in:
parent
8b50015775
commit
5a49c9cdcd
@ -72,7 +72,7 @@ class SystemTrayIcon(QtGui.QSystemTrayIcon):
|
||||
networkFirewallEnableAction = networkFirewallMenu.addAction(QtGui.QIcon.fromTheme("security-high"),_("Enable"))
|
||||
self.connect(networkFirewallEnableAction, SIGNAL("triggered()"), self.networkFirewallEnable)
|
||||
self.connect(networkFirewallEnableProcess, SIGNAL("finished(int,QProcess::ExitStatus)"), self.networkFirewallEnableMessage)
|
||||
networkFirewallConfigureAction = networkFirewallMenu.addAction(QtGui.QIcon("/opt/kde3/share/icons/locolor/32x32/apps/guarddog.png"),_("Configure..."))
|
||||
networkFirewallConfigureAction = networkFirewallMenu.addAction(QtGui.QIcon.fromTheme("security-medium"),_("Configure..."))
|
||||
self.connect(networkFirewallConfigureAction, SIGNAL("triggered()"), self.networkFirewallConfigure)
|
||||
networkProxyAction = networkMenu.addAction(QtGui.QIcon.fromTheme("network-server"),_("Proxy..."))
|
||||
self.connect(networkProxyAction, SIGNAL("triggered()"), self.networkProxy)
|
||||
@ -157,7 +157,7 @@ class SystemTrayIcon(QtGui.QSystemTrayIcon):
|
||||
self.showMessage("Firewall", _("Could not disable firewall"))
|
||||
|
||||
def networkFirewallEnable(self):
|
||||
networkFirewallEnableProcess.start("sudo",['/sbin/service','iptables','start'])
|
||||
networkFirewallEnableProcess.start("sudo",['/usr/sbin/ufw','enable'])
|
||||
|
||||
def networkFirewallEnableMessage(self,status):
|
||||
if (status == QtCore.QProcess.NormalExit):
|
||||
@ -166,8 +166,10 @@ class SystemTrayIcon(QtGui.QSystemTrayIcon):
|
||||
self.showMessage("Firewall", _("Could not enable firewall"))
|
||||
|
||||
def networkFirewallConfigure(self):
|
||||
networkFirewallConfigureProcess.execute("sudo",
|
||||
QtCore.QStringList(list(set(['/opt/kde3/bin/guarddog']))))
|
||||
if desktop_session == 'kde':
|
||||
networkFirewallConfigureProcess.execute("/opt/kde/bin/kcmshell4", QtCore.QStringList(list(set(['ufw']))))
|
||||
else:
|
||||
networkFirewallConfigureProcess.execute("/usr/bin/gufw")
|
||||
|
||||
def networkProxy(self):
|
||||
networkProxyProcess.execute("/opt/kde/bin/kcmshell4",
|
||||
|
Loading…
Reference in New Issue
Block a user