mirror of
https://github.com/gryf/wicd.git
synced 2025-12-23 14:42:29 +01:00
Merged with experimental-nacl, r336.
This commit is contained in:
@@ -177,7 +177,10 @@ class PrefsDialog(urwid.WidgetWrap):
|
|||||||
|
|
||||||
self.dhcp_header = urwid.Text(dhcp_header_t)
|
self.dhcp_header = urwid.Text(dhcp_header_t)
|
||||||
self.dhcp_l = []
|
self.dhcp_l = []
|
||||||
# Automatic
|
|
||||||
|
# Order of these is flipped in the actual interface,
|
||||||
|
# (2,3,1 -> dhcpcd, pump, dhclient), because dhclient often doesn't like
|
||||||
|
# to work on several distros.
|
||||||
self.dhcp0 = urwid.RadioButton(self.dhcp_l,automatic_t)
|
self.dhcp0 = urwid.RadioButton(self.dhcp_l,automatic_t)
|
||||||
self.dhcp1 = DynRadioButton(self.dhcp_l,dhcp1_t)
|
self.dhcp1 = DynRadioButton(self.dhcp_l,dhcp1_t)
|
||||||
self.dhcp2 = DynRadioButton(self.dhcp_l,dhcp2_t)
|
self.dhcp2 = DynRadioButton(self.dhcp_l,dhcp2_t)
|
||||||
@@ -199,7 +202,7 @@ class PrefsDialog(urwid.WidgetWrap):
|
|||||||
self.flush_l = [self.flush0,self.flush1,self.flush2]
|
self.flush_l = [self.flush0,self.flush1,self.flush2]
|
||||||
|
|
||||||
externalLB = urwid.ListBox([self.dhcp_header,
|
externalLB = urwid.ListBox([self.dhcp_header,
|
||||||
self.dhcp0,self.dhcp1,self.dhcp2,self.dhcp3,
|
self.dhcp0,self.dhcp2,self.dhcp3,self.dhcp1,
|
||||||
_blank,
|
_blank,
|
||||||
self.wired_detect_header,
|
self.wired_detect_header,
|
||||||
self.wired0,self.wired1,self.wired2,
|
self.wired0,self.wired1,self.wired2,
|
||||||
|
|||||||
@@ -69,8 +69,8 @@ from optparse import OptionParser
|
|||||||
#from grp import getgrgid
|
#from grp import getgrgid
|
||||||
#from os import getgroups,system
|
#from os import getgroups,system
|
||||||
|
|
||||||
import logging
|
#import logging
|
||||||
import logging.handler
|
#import logging.handler
|
||||||
|
|
||||||
CURSES_REVNO=wpath.curses_revision
|
CURSES_REVNO=wpath.curses_revision
|
||||||
|
|
||||||
@@ -1070,6 +1070,7 @@ def main():
|
|||||||
urwid.set_encoding('utf8')
|
urwid.set_encoding('utf8')
|
||||||
ui.run_wrapper(run)
|
ui.run_wrapper(run)
|
||||||
|
|
||||||
|
@wrap_exceptions
|
||||||
def run():
|
def run():
|
||||||
global loop
|
global loop
|
||||||
loop = gobject.MainLoop()
|
loop = gobject.MainLoop()
|
||||||
@@ -1135,7 +1136,7 @@ if __name__ == '__main__':
|
|||||||
parser.add_option("-r", "--raw-screen",action="store_const",const='raw'
|
parser.add_option("-r", "--raw-screen",action="store_const",const='raw'
|
||||||
,dest='screen',help="use urwid's raw screen controller (default)")
|
,dest='screen',help="use urwid's raw screen controller (default)")
|
||||||
parser.add_option("-c", "--curses-screen",action="store_const",const='curses',dest='screen',help="use urwid's curses screen controller")
|
parser.add_option("-c", "--curses-screen",action="store_const",const='curses',dest='screen',help="use urwid's curses screen controller")
|
||||||
parser.add_option("-d", "--debug",action="store_true",
|
parser.add_option("-d", "--debug",action="store_true"
|
||||||
,dest='debug',help="enable logging of wicd-curses (currently does nothing)")
|
,dest='debug',help="enable logging of wicd-curses (currently does nothing)")
|
||||||
(options,args) = parser.parse_args()
|
(options,args) = parser.parse_args()
|
||||||
main()
|
main()
|
||||||
|
|||||||
@@ -1138,7 +1138,7 @@ is already active.</property>
|
|||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="position">1</property>
|
<property name="position">3</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@@ -1153,7 +1153,7 @@ is already active.</property>
|
|||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="position">2</property>
|
<property name="position">1</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@@ -1168,7 +1168,7 @@ is already active.</property>
|
|||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="position">3</property>
|
<property name="position">2</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Categories=Application;Network;
|
Categories=Application;Network;
|
||||||
Encoding=UTF-8
|
|
||||||
Exec=wicd-client
|
Exec=wicd-client
|
||||||
GenericName=Network Manager
|
GenericName=Network Manager
|
||||||
Icon=wicd-client
|
Icon=wicd-client
|
||||||
|
|||||||
5
setup.py
5
setup.py
@@ -86,6 +86,8 @@ class configure(Command):
|
|||||||
('initfilename=', None, "set the name of the init file (don't use)"),
|
('initfilename=', None, "set the name of the init file (don't use)"),
|
||||||
('wicdgroup=', None, "set the name of the group used for wicd"),
|
('wicdgroup=', None, "set the name of the group used for wicd"),
|
||||||
('distro=', None, 'set the distribution for which wicd will be installed'),
|
('distro=', None, 'set the distribution for which wicd will be installed'),
|
||||||
|
('loggroup=', None, 'the group the log file belongs to'),
|
||||||
|
('logperms=', None, 'the log file permissions'),
|
||||||
|
|
||||||
# Configure switches
|
# Configure switches
|
||||||
('no-install-init', None, "do not install the init file"),
|
('no-install-init', None, "do not install the init file"),
|
||||||
@@ -220,6 +222,8 @@ class configure(Command):
|
|||||||
self.pidfile = '/var/run/wicd/wicd.pid'
|
self.pidfile = '/var/run/wicd/wicd.pid'
|
||||||
self.initfilename = os.path.basename(self.initfile)
|
self.initfilename = os.path.basename(self.initfile)
|
||||||
self.wicdgroup = 'users'
|
self.wicdgroup = 'users'
|
||||||
|
self.loggroup = ''
|
||||||
|
self.logperms = '0600'
|
||||||
|
|
||||||
def distro_check(self):
|
def distro_check(self):
|
||||||
print "Distro is: "+self.distro
|
print "Distro is: "+self.distro
|
||||||
@@ -236,6 +240,7 @@ class configure(Command):
|
|||||||
self.mandir = '/usr/man/'
|
self.mandir = '/usr/man/'
|
||||||
self.no_install_acpi = True
|
self.no_install_acpi = True
|
||||||
elif self.distro in ['debian']:
|
elif self.distro in ['debian']:
|
||||||
|
self.wicdgroup = "netdev"
|
||||||
self.init = '/etc/init.d/'
|
self.init = '/etc/init.d/'
|
||||||
self.initfile = 'init/debian/wicd'
|
self.initfile = 'init/debian/wicd'
|
||||||
elif self.distro in ['arch']:
|
elif self.distro in ['arch']:
|
||||||
|
|||||||
@@ -121,8 +121,9 @@ def GetWirelessInterfaces():
|
|||||||
def GetWiredInterfaces():
|
def GetWiredInterfaces():
|
||||||
""" Returns a list of wired interfaces on the system. """
|
""" Returns a list of wired interfaces on the system. """
|
||||||
basedir = '/sys/class/net/'
|
basedir = '/sys/class/net/'
|
||||||
return [iface for iface in os.listdir(basedir) if not 'wireless'
|
return [iface for iface in os.listdir(basedir)
|
||||||
in os.listdir(basedir + iface) and
|
if os.path.isdir(basedir + iface) and not 'wireless'
|
||||||
|
in os.listdir(basedir + iface) and
|
||||||
open(basedir + iface + "/type").readlines()[0].strip() == "1"]
|
open(basedir + iface + "/type").readlines()[0].strip() == "1"]
|
||||||
|
|
||||||
def NeedsExternalCalls():
|
def NeedsExternalCalls():
|
||||||
@@ -213,17 +214,17 @@ class BaseInterface(object):
|
|||||||
"""
|
"""
|
||||||
def get_client_name(cl):
|
def get_client_name(cl):
|
||||||
""" Converts the integer value for a dhcp client to a string. """
|
""" Converts the integer value for a dhcp client to a string. """
|
||||||
if self.dhclient_cmd and cl in [misc.DHCLIENT, misc.AUTO]:
|
if self.dhcpcd_cmd and cl in [misc.DHCPCD, misc.AUTO]:
|
||||||
client = "dhclient"
|
|
||||||
cmd = self.dhclient_cmd
|
|
||||||
if self.dhclient_needs_verbose:
|
|
||||||
cmd += ' -v'
|
|
||||||
elif self.dhcpcd_cmd and cl in [misc.DHCPCD, misc.AUTO]:
|
|
||||||
client = "dhcpcd"
|
client = "dhcpcd"
|
||||||
cmd = self.dhcpcd_cmd
|
cmd = self.dhcpcd_cmd
|
||||||
elif self.pump_cmd and cl in [misc.PUMP, misc.AUTO]:
|
elif self.pump_cmd and cl in [misc.PUMP, misc.AUTO]:
|
||||||
client = "pump"
|
client = "pump"
|
||||||
cmd = self.pump_cmd
|
cmd = self.pump_cmd
|
||||||
|
elif self.dhclient_cmd and cl in [misc.DHCLIENT, misc.AUTO]:
|
||||||
|
client = "dhclient"
|
||||||
|
cmd = self.dhclient_cmd
|
||||||
|
if self.dhclient_needs_verbose:
|
||||||
|
cmd += ' -v'
|
||||||
else:
|
else:
|
||||||
client = None
|
client = None
|
||||||
cmd = ""
|
cmd = ""
|
||||||
|
|||||||
Reference in New Issue
Block a user