mirror of
https://github.com/gryf/wicd.git
synced 2025-12-19 12:28:08 +01:00
Fixed bug where advanced settings dialog wouldn't appear for wired networks.
Added MAC address to the top level info line in a wireless network entry. Fixed some setup.py problems.
This commit is contained in:
8
gui.py
8
gui.py
@@ -258,6 +258,7 @@ class GreyLabel(gtk.Label):
|
|||||||
""" Creates a grey gtk.Label. """
|
""" Creates a grey gtk.Label. """
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
gtk.Label.__init__(self)
|
gtk.Label.__init__(self)
|
||||||
|
|
||||||
def set_label(self, text):
|
def set_label(self, text):
|
||||||
self.set_markup("<span color=\"#666666\"><i>" + text + "</i></span>")
|
self.set_markup("<span color=\"#666666\"><i>" + text + "</i></span>")
|
||||||
self.set_alignment(0, 0)
|
self.set_alignment(0, 0)
|
||||||
@@ -773,7 +774,7 @@ class WiredNetworkEntry(NetworkEntry):
|
|||||||
# Show everything, but hide the profile help label.
|
# Show everything, but hide the profile help label.
|
||||||
self.show_all()
|
self.show_all()
|
||||||
self.profile_help.hide()
|
self.profile_help.hide()
|
||||||
self.advanced_dialog = AdvancedSettingsDialog()
|
self.advanced_dialog = WiredSettingsDialog()
|
||||||
|
|
||||||
# Display the default profile if it exists.
|
# Display the default profile if it exists.
|
||||||
if self.profile_list is not None:
|
if self.profile_list is not None:
|
||||||
@@ -952,8 +953,9 @@ class WirelessNetworkEntry(NetworkEntry):
|
|||||||
# The the expander label.
|
# The the expander label.
|
||||||
self.expander.set_use_markup(True)
|
self.expander.set_use_markup(True)
|
||||||
self.expander.set_label(self.essid + " " +
|
self.expander.set_label(self.essid + " " +
|
||||||
self.lbl_encryption.get_label() + " "
|
self.lbl_strength.get_label() + " " +
|
||||||
+ self.lbl_strength.get_label())
|
self.lbl_encryption.get_label() + " " +
|
||||||
|
self.lbl_mac.get_label())
|
||||||
|
|
||||||
# Pack the network status HBox.
|
# Pack the network status HBox.
|
||||||
self.hbox_status.pack_start(self.lbl_strength, True, True)
|
self.hbox_status.pack_start(self.lbl_strength, True, True)
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ class ConnectionStatus():
|
|||||||
self.reconnect_tries = 0
|
self.reconnect_tries = 0
|
||||||
self.last_reconnect_time = time.time()
|
self.last_reconnect_time = time.time()
|
||||||
self.signal_changed = False
|
self.signal_changed = False
|
||||||
|
|
||||||
# This determines if we use ioctl or external programs
|
# This determines if we use ioctl or external programs
|
||||||
self.fast = True
|
self.fast = True
|
||||||
self.iwconfig = ''
|
self.iwconfig = ''
|
||||||
|
|||||||
15
setup.py
15
setup.py
@@ -34,27 +34,16 @@ data=[
|
|||||||
('translations/zh_HK/LC_MESSAGES', ['translations/zh_HK/LC_MESSAGES/wicd.mo']),
|
('translations/zh_HK/LC_MESSAGES', ['translations/zh_HK/LC_MESSAGES/wicd.mo']),
|
||||||
('translations/fr_FR/LC_MESSAGES', ['translations/fr_FR/LC_MESSAGES/wicd.mo']),
|
('translations/fr_FR/LC_MESSAGES', ['translations/fr_FR/LC_MESSAGES/wicd.mo']),
|
||||||
('translations/ca_ES/LC_MESSAGES', ['translations/ca_ES/LC_MESSAGES/wicd.mo']),
|
('translations/ca_ES/LC_MESSAGES', ['translations/ca_ES/LC_MESSAGES/wicd.mo']),
|
||||||
('translations/ko_KR/LC_MESSAGES', ['translations/ko_KR/LC_MESSAGES/wicd.mo']),
|
|
||||||
('translations/gl_GL/LC_MESSAGES', ['translations/gl_GL/LC_MESSAGES/wicd.mo']),
|
('translations/gl_GL/LC_MESSAGES', ['translations/gl_GL/LC_MESSAGES/wicd.mo']),
|
||||||
('translations/no_NO/LC_MESSAGES', ['translations/no_NO/LC_MESSAGES/wicd.mo']),
|
|
||||||
('translations/bg_PHO/LC_MESSAGES', ['translations/bg_PHO/LC_MESSAGES/wicd.mo']),
|
|
||||||
('translations/po', [('translations/po/' + b) for b in os.listdir('translations/po') if not b.startswith('.')]),
|
('translations/po', [('translations/po/' + b) for b in os.listdir('translations/po') if not b.startswith('.')]),
|
||||||
('translations/sl_SI/LC_MESSAGES', ['translations/sl_SI/LC_MESSAGES/wicd.mo']),
|
('translations/sl_SI/LC_MESSAGES', ['translations/sl_SI/LC_MESSAGES/wicd.mo']),
|
||||||
('translations/da_DK/LC_MESSAGES', ['translations/da_DK/LC_MESSAGES/wicd.mo']),
|
|
||||||
('translations/ja_JA/LC_MESSAGES', ['translations/ja_JA/LC_MESSAGES/wicd.mo']),
|
('translations/ja_JA/LC_MESSAGES', ['translations/ja_JA/LC_MESSAGES/wicd.mo']),
|
||||||
('translations/zh_CN/LC_MESSAGES', ['translations/zh_CN/LC_MESSAGES/wicd.mo']),
|
|
||||||
('translations/ru_RU/LC_MESSAGES', ['translations/ru_RU/LC_MESSAGES/wicd.mo']),
|
|
||||||
('translations/it_IT/LC_MESSAGES', ['translations/it_IT/LC_MESSAGES/wicd.mo']),
|
('translations/it_IT/LC_MESSAGES', ['translations/it_IT/LC_MESSAGES/wicd.mo']),
|
||||||
('translations/es_ES/LC_MESSAGES', ['translations/es_ES/LC_MESSAGES/wicd.mo']),
|
('translations/es_ES/LC_MESSAGES', ['translations/es_ES/LC_MESSAGES/wicd.mo']),
|
||||||
('translations/pt_BR/LC_MESSAGES', ['translations/pt_BR/LC_MESSAGES/wicd.mo']),
|
|
||||||
('translations/cs_CZ/LC_MESSAGES', ['translations/cs_CZ/LC_MESSAGES/wicd.mo']),
|
|
||||||
('translations/sv_SE/LC_MESSAGES', ['translations/sv_SE/LC_MESSAGES/wicd.mo']),
|
('translations/sv_SE/LC_MESSAGES', ['translations/sv_SE/LC_MESSAGES/wicd.mo']),
|
||||||
('translations/ar_EG/LC_MESSAGES', ['translations/ar_EG/LC_MESSAGES/wicd.mo']),
|
|
||||||
('translations/tr_TR/LC_MESSAGES', ['translations/tr_TR/LC_MESSAGES/wicd.mo']),
|
|
||||||
('translations/en_US/LC_MESSAGES', ['translations/en_US/LC_MESSAGES/wicd.mo']),
|
('translations/en_US/LC_MESSAGES', ['translations/en_US/LC_MESSAGES/wicd.mo']),
|
||||||
('translations/fi_FI/LC_MESSAGES', ['translations/fi_FI/LC_MESSAGES/wicd.mo']),
|
('translations/fi_FI/LC_MESSAGES', ['translations/fi_FI/LC_MESSAGES/wicd.mo']),
|
||||||
('translations/pl_PL/LC_MESSAGES', ['translations/pl_PL/LC_MESSAGES/wicd.mo']),
|
('translations/pl_PL/LC_MESSAGES', ['translations/pl_PL/LC_MESSAGES/wicd.mo']),
|
||||||
('translations/hu_HU/LC_MESSAGES', ['translations/hu_HU/LC_MESSAGES/wicd.mo']),
|
|
||||||
('translations/nl_NL/LC_MESSAGES', ['translations/nl_NL/LC_MESSAGES/wicd.mo'])]
|
('translations/nl_NL/LC_MESSAGES', ['translations/nl_NL/LC_MESSAGES/wicd.mo'])]
|
||||||
if os.access('/etc/redhat-release', os.F_OK):
|
if os.access('/etc/redhat-release', os.F_OK):
|
||||||
data.append(('/etc/rc.d/init.d', ['other/initscripts/redhat/wicd']))
|
data.append(('/etc/rc.d/init.d', ['other/initscripts/redhat/wicd']))
|
||||||
@@ -64,11 +53,11 @@ elif os.access('/etc/fedora-release', os.F_OK):
|
|||||||
data.append(('/etc/rc.d/init.d', ['other/initscripts/redhat/wicd']))
|
data.append(('/etc/rc.d/init.d', ['other/initscripts/redhat/wicd']))
|
||||||
elif os.access('/etc/gentoo-release', os.F_OK):
|
elif os.access('/etc/gentoo-release', os.F_OK):
|
||||||
data.append(('/etc/init.d', ['other/initscripts/gentoo/wicd']))
|
data.append(('/etc/init.d', ['other/initscripts/gentoo/wicd']))
|
||||||
elif os.access('/etc/debian-release', os.F_OK):
|
elif os.access('/etc/debian_version', os.F_OK):
|
||||||
data.append(('/etc/init.d', ['other/initscripts/debian/wicd']))
|
data.append(('/etc/init.d', ['other/initscripts/debian/wicd']))
|
||||||
elif os.access('/etc/arch-release', os.F_OK):
|
elif os.access('/etc/arch-release', os.F_OK):
|
||||||
data.append(('/etc/rc.d', ['other/initscripts/arch/wicd']))
|
data.append(('/etc/rc.d', ['other/initscripts/arch/wicd']))
|
||||||
elif os.access('/etc/slackware-release', os.F_OK):
|
elif os.access('/etc/slackware-version', os.F_OK):
|
||||||
data.append(('/etc/rc.d', ['other/initscripts/slackware/wicd']))
|
data.append(('/etc/rc.d', ['other/initscripts/slackware/wicd']))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
13
wnettools.py
13
wnettools.py
@@ -723,7 +723,7 @@ class WirelessInterface(Interface):
|
|||||||
essid -- essid to set the interface to
|
essid -- essid to set the interface to
|
||||||
|
|
||||||
"""
|
"""
|
||||||
cmd = ''.join(['iwconfig ', self.iface, ' essid "', essid, '"'])
|
cmd = 'iwconfig %s essid "%s"' % (self.iface, essid)
|
||||||
if self.verbose: print cmd
|
if self.verbose: print cmd
|
||||||
misc.Run(cmd)
|
misc.Run(cmd)
|
||||||
|
|
||||||
@@ -962,7 +962,7 @@ class WirelessInterface(Interface):
|
|||||||
"""
|
"""
|
||||||
if mode.lower() == 'master':
|
if mode.lower() == 'master':
|
||||||
mode = 'managed'
|
mode = 'managed'
|
||||||
cmd = 'iwconfig ' + self.iface + ' mode ' + mode
|
cmd = 'iwconfig %s mode %s' % (self.iface, mode)
|
||||||
if self.verbose: print cmd
|
if self.verbose: print cmd
|
||||||
misc.Run(cmd)
|
misc.Run(cmd)
|
||||||
|
|
||||||
@@ -973,7 +973,7 @@ class WirelessInterface(Interface):
|
|||||||
channel -- channel to set the interface to
|
channel -- channel to set the interface to
|
||||||
|
|
||||||
"""
|
"""
|
||||||
cmd = 'iwconfig ' + self.iface + ' channel ' + str(channel)
|
cmd = 'iwconfig %s channel %s' % (self.iface, str(channel))
|
||||||
if self.verbose: print cmd
|
if self.verbose: print cmd
|
||||||
misc.Run(cmd)
|
misc.Run(cmd)
|
||||||
|
|
||||||
@@ -984,7 +984,7 @@ class WirelessInterface(Interface):
|
|||||||
key -- encryption key to set
|
key -- encryption key to set
|
||||||
|
|
||||||
"""
|
"""
|
||||||
cmd = 'iwconfig ' + self.iface + ' key ' + key
|
cmd = 'iwconfig %s key %s' % (self.iface, key)
|
||||||
if self.verbose: print cmd
|
if self.verbose: print cmd
|
||||||
misc.Run(cmd)
|
misc.Run(cmd)
|
||||||
|
|
||||||
@@ -997,7 +997,7 @@ class WirelessInterface(Interface):
|
|||||||
bssid -- bssid of the network
|
bssid -- bssid of the network
|
||||||
|
|
||||||
"""
|
"""
|
||||||
cmd = ''.join(['iwconfig ', self.iface, ' essid "', essid, '"'])
|
cmd = 'iwconfig %s essid "%s"' % (self.iface, essid)
|
||||||
if channel:
|
if channel:
|
||||||
cmd = ''.join([cmd, ' channel ', str(channel)])
|
cmd = ''.join([cmd, ' channel ', str(channel)])
|
||||||
if bssid:
|
if bssid:
|
||||||
@@ -1121,7 +1121,8 @@ class WirelessInterface(Interface):
|
|||||||
auth_mode = 'WPA2PSK'
|
auth_mode = 'WPA2PSK'
|
||||||
key_name = 'WPAPSK'
|
key_name = 'WPAPSK'
|
||||||
else:
|
else:
|
||||||
print 'Unknown AuthMode, can\'t complete connection process!'
|
print 'Unknown AuthMode, can\'t complete ' + \
|
||||||
|
'connection process!'
|
||||||
return
|
return
|
||||||
|
|
||||||
cmd_list = []
|
cmd_list = []
|
||||||
|
|||||||
Reference in New Issue
Block a user