mirror of
https://github.com/gryf/wicd.git
synced 2026-01-06 05:44:18 +01:00
Fix bug where be-ioctl scans always reported channels as 1.
Tweak the UI a little bit. Add debugging output when forced_disconnect gets enabled.
This commit is contained in:
@@ -316,7 +316,7 @@ class WirelessInterface(Interface, wnettools.BaseWirelessInterface):
|
||||
ap['hidden'] = False
|
||||
|
||||
if cell["channel"]:
|
||||
ap["channel"] = True
|
||||
ap["channel"] = cell["channel"]
|
||||
else:
|
||||
ap["channel"] = self._FreqToChannel(cell["frequency"])
|
||||
|
||||
|
||||
@@ -435,7 +435,7 @@ def get_language_list_gui():
|
||||
language['use_static_ip'] = _('Use Static IPs')
|
||||
language['use_static_dns'] = _('Use Static DNS')
|
||||
language['use_encryption'] = _('Use Encryption')
|
||||
language['advanced_settings'] = _('Advanced Settings')
|
||||
language['advanced_settings'] = _('Properties')
|
||||
language['wired_network'] = _('Wired Network')
|
||||
language['wired_network_instructions'] = _('To connect to a wired network,'
|
||||
' you must create a network profile. To create a network profile, type a'
|
||||
|
||||
@@ -804,6 +804,7 @@ class WirelessNetworkEntry(NetworkEntry):
|
||||
"essid"))
|
||||
self.lbl_strength = GreyLabel()
|
||||
self.lbl_encryption = GreyLabel()
|
||||
self.lbl_channel = GreyLabel()
|
||||
|
||||
print "ESSID : " + self.essid
|
||||
self.chkbox_autoconnect = gtk.CheckButton(language['automatic_connect'])
|
||||
@@ -816,11 +817,13 @@ class WirelessNetworkEntry(NetworkEntry):
|
||||
'encryption'),
|
||||
wireless.GetWirelessProperty(networkID,
|
||||
'encryption_method'))
|
||||
self.set_channel(wireless.GetWirelessProperty(networkID, 'channel'))
|
||||
self.name_label.set_use_markup(True)
|
||||
self.name_label.set_label("%s %s %s" % (self._escape(self.essid),
|
||||
self.lbl_strength.get_label(),
|
||||
self.lbl_encryption.get_label()
|
||||
)
|
||||
self.name_label.set_label("%s %s %s %s" % (self._escape(self.essid),
|
||||
self.lbl_strength.get_label(),
|
||||
self.lbl_encryption.get_label(),
|
||||
self.lbl_channel.get_label(),
|
||||
)
|
||||
)
|
||||
# Add the wireless network specific parts to the NetworkEntry
|
||||
# VBox objects.
|
||||
@@ -927,6 +930,10 @@ class WirelessNetworkEntry(NetworkEntry):
|
||||
self.lbl_encryption.set_label(language['secured'])
|
||||
if not on:
|
||||
self.lbl_encryption.set_label(language['unsecured'])
|
||||
|
||||
def set_channel(self, channel):
|
||||
""" Set the channel value for the WirelessNetworkEntry. """
|
||||
self.lbl_channel.set_label(language['channel'] + ' ' + str(channel))
|
||||
|
||||
def format_entry(self, networkid, label):
|
||||
""" Helper method for fetching/formatting wireless properties. """
|
||||
|
||||
@@ -91,6 +91,7 @@ class WicdDaemon(dbus.service.Object):
|
||||
self.vpn_session = None
|
||||
self.gui_open = False
|
||||
self.suspended = False
|
||||
self.debug_mode = False
|
||||
self.connection_state = misc.NOT_CONNECTED
|
||||
self.connection_info = [""]
|
||||
self.auto_connecting = False
|
||||
@@ -421,6 +422,7 @@ class WicdDaemon(dbus.service.Object):
|
||||
started.
|
||||
|
||||
"""
|
||||
if self.debug_mode and value: print "Forced disconnect on"
|
||||
self.forced_disconnect = bool(value)
|
||||
self.wireless_bus.SetForcedDisconnect(bool(value))
|
||||
self.wired_bus.SetForcedDisconnect(bool(value))
|
||||
|
||||
Reference in New Issue
Block a user