1
0
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:
imdano
2008-04-11 10:29:10 +00:00
parent e1d7429e6c
commit b72f4b2803
5 changed files with 16 additions and 23 deletions

8
gui.py
View File

@@ -258,6 +258,7 @@ class GreyLabel(gtk.Label):
""" Creates a grey gtk.Label. """
def __init__(self):
gtk.Label.__init__(self)
def set_label(self, text):
self.set_markup("<span color=\"#666666\"><i>" + text + "</i></span>")
self.set_alignment(0, 0)
@@ -773,7 +774,7 @@ class WiredNetworkEntry(NetworkEntry):
# Show everything, but hide the profile help label.
self.show_all()
self.profile_help.hide()
self.advanced_dialog = AdvancedSettingsDialog()
self.advanced_dialog = WiredSettingsDialog()
# Display the default profile if it exists.
if self.profile_list is not None:
@@ -952,8 +953,9 @@ class WirelessNetworkEntry(NetworkEntry):
# The the expander label.
self.expander.set_use_markup(True)
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.
self.hbox_status.pack_start(self.lbl_strength, True, True)

View File

@@ -67,6 +67,7 @@ class ConnectionStatus():
self.reconnect_tries = 0
self.last_reconnect_time = time.time()
self.signal_changed = False
# This determines if we use ioctl or external programs
self.fast = True
self.iwconfig = ''

View File

@@ -124,7 +124,7 @@ class Controller(object):
debug = property(get_debug, set_debug)
flush_tool = property(get_flush_tool, set_flush_tool)
dhcp_client = property(get_dhcp_client, set_dhcp_client)
class ConnectThread(threading.Thread):
""" A class to perform network connections in a multi-threaded way.

View File

@@ -34,27 +34,16 @@ data=[
('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/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/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/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/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/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/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/fi_FI/LC_MESSAGES', ['translations/fi_FI/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'])]
if os.access('/etc/redhat-release', os.F_OK):
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']))
elif os.access('/etc/gentoo-release', os.F_OK):
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']))
elif os.access('/etc/arch-release', os.F_OK):
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']))

View File

@@ -723,7 +723,7 @@ class WirelessInterface(Interface):
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
misc.Run(cmd)
@@ -962,7 +962,7 @@ class WirelessInterface(Interface):
"""
if mode.lower() == 'master':
mode = 'managed'
cmd = 'iwconfig ' + self.iface + ' mode ' + mode
cmd = 'iwconfig %s mode %s' % (self.iface, mode)
if self.verbose: print cmd
misc.Run(cmd)
@@ -973,7 +973,7 @@ class WirelessInterface(Interface):
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
misc.Run(cmd)
@@ -984,7 +984,7 @@ class WirelessInterface(Interface):
key -- encryption key to set
"""
cmd = 'iwconfig ' + self.iface + ' key ' + key
cmd = 'iwconfig %s key %s' % (self.iface, key)
if self.verbose: print cmd
misc.Run(cmd)
@@ -997,7 +997,7 @@ class WirelessInterface(Interface):
bssid -- bssid of the network
"""
cmd = ''.join(['iwconfig ', self.iface, ' essid "', essid, '"'])
cmd = 'iwconfig %s essid "%s"' % (self.iface, essid)
if channel:
cmd = ''.join([cmd, ' channel ', str(channel)])
if bssid:
@@ -1121,7 +1121,8 @@ class WirelessInterface(Interface):
auth_mode = 'WPA2PSK'
key_name = 'WPAPSK'
else:
print 'Unknown AuthMode, can\'t complete connection process!'
print 'Unknown AuthMode, can\'t complete ' + \
'connection process!'
return
cmd_list = []