1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-25 07:32:29 +01:00

Fix crash when saving settings for unencrypted networks.

Remove unneeded function in prefs.py
This commit is contained in:
Dan O'Reilly
2009-05-01 20:20:40 -04:00
parent 0abd1da1f5
commit adec1fdc18
2 changed files with 4 additions and 7 deletions

View File

@@ -405,9 +405,9 @@ class WirelessSettingsDialog(AdvancedSettingsDialog):
def save_settings(self, networkid):
# Check encryption info
encrypt_info = self.encryption_info
if self.chkbox_encryption.get_active():
print "setting encryption info..."
encrypt_info = self.encryption_info
encrypt_methods = self.encrypt_types
self.set_net_prop("enctype",
encrypt_methods[self.combo_encryption.get_active()]['type'])
@@ -432,7 +432,7 @@ class WirelessSettingsDialog(AdvancedSettingsDialog):
print "no encryption specified..."
self.set_net_prop("enctype", "None")
for entry in encrypt_info.iterkeys():
self.set_net_prop(entry[0].entry, "")
self.set_net_prop(entry[0], "")
AdvancedSettingsDialog.save_settings(self)
if self.chkbox_global_settings.get_active():

View File

@@ -57,12 +57,9 @@ class PreferencesDialog(object):
def _setup_external_app_radios(self, radio_list, get_method, set_method):
""" Generic function for setting up external app radios. """
def set_available(apps):
for app in apps:
app.set_sensitive(daemon.GetAppAvailable(app.get_label()))
# Disable radios for apps that aren't installed.
set_available(radio_list[1:])
for app in radio_list[1:]:
app.set_sensitive(daemon.GetAppAvailable(app.get_label()))
selected_app = get_method()
# Make sure the app we want to select is actually available.
if radio_list[selected_app].get_property("sensitive"):