mirror of
https://github.com/gryf/wicd.git
synced 2026-01-06 13:54:17 +01:00
Fix crash when saving settings for unencrypted networks.
Remove unneeded function in prefs.py
This commit is contained in:
@@ -405,9 +405,9 @@ class WirelessSettingsDialog(AdvancedSettingsDialog):
|
|||||||
|
|
||||||
def save_settings(self, networkid):
|
def save_settings(self, networkid):
|
||||||
# Check encryption info
|
# Check encryption info
|
||||||
|
encrypt_info = self.encryption_info
|
||||||
if self.chkbox_encryption.get_active():
|
if self.chkbox_encryption.get_active():
|
||||||
print "setting encryption info..."
|
print "setting encryption info..."
|
||||||
encrypt_info = self.encryption_info
|
|
||||||
encrypt_methods = self.encrypt_types
|
encrypt_methods = self.encrypt_types
|
||||||
self.set_net_prop("enctype",
|
self.set_net_prop("enctype",
|
||||||
encrypt_methods[self.combo_encryption.get_active()]['type'])
|
encrypt_methods[self.combo_encryption.get_active()]['type'])
|
||||||
@@ -432,7 +432,7 @@ class WirelessSettingsDialog(AdvancedSettingsDialog):
|
|||||||
print "no encryption specified..."
|
print "no encryption specified..."
|
||||||
self.set_net_prop("enctype", "None")
|
self.set_net_prop("enctype", "None")
|
||||||
for entry in encrypt_info.iterkeys():
|
for entry in encrypt_info.iterkeys():
|
||||||
self.set_net_prop(entry[0].entry, "")
|
self.set_net_prop(entry[0], "")
|
||||||
AdvancedSettingsDialog.save_settings(self)
|
AdvancedSettingsDialog.save_settings(self)
|
||||||
|
|
||||||
if self.chkbox_global_settings.get_active():
|
if self.chkbox_global_settings.get_active():
|
||||||
|
|||||||
@@ -57,12 +57,9 @@ class PreferencesDialog(object):
|
|||||||
|
|
||||||
def _setup_external_app_radios(self, radio_list, get_method, set_method):
|
def _setup_external_app_radios(self, radio_list, get_method, set_method):
|
||||||
""" Generic function for setting up external app radios. """
|
""" 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.
|
# 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()
|
selected_app = get_method()
|
||||||
# Make sure the app we want to select is actually available.
|
# Make sure the app we want to select is actually available.
|
||||||
if radio_list[selected_app].get_property("sensitive"):
|
if radio_list[selected_app].get_property("sensitive"):
|
||||||
|
|||||||
Reference in New Issue
Block a user