1
0
mirror of https://github.com/gryf/wicd.git synced 2026-02-24 11:15:49 +01:00

Merge latest 1.6

This commit is contained in:
Adam Blackburn
2009-05-02 12:47:05 +08:00
7 changed files with 44 additions and 37 deletions

View File

@@ -108,7 +108,7 @@ class ConfigManager(RawConfigParser):
try:
if not ret.startswith('0') or len(ret) == 1:
ret = int(ret)
except (ValueError, TypeError):
except (ValueError, TypeError, AttributeError):
ret = Noneify(ret)
# This is a workaround for a python-dbus issue on 64-bit systems.
if isinstance(ret, (int)):

View File

@@ -148,7 +148,7 @@ class appGui(object):
gladefile = os.path.join(wpath.share, "wicd.glade")
self.wTree = gtk.glade.XML(gladefile)
self.window = self.wTree.get_widget("window1")
self.window.set_icon_from_file(wpath.icons +'scalable/apps/wicd-client.svg')
self.window.set_icon_name("wicd-client")
size = daemon.ReadWindowSize("main")
width = size[0]
height = size[1]

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

@@ -59,12 +59,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"):

View File

@@ -1201,8 +1201,8 @@ class WirelessDaemon(dbus.service.Object):
# We want to write the essid in addition to bssid
# sections if global settings are enabled.
self.config.remove_section(essid_key)
if cur_network["use_settings_globally"]:
self.config.remove_section(essid_key)
self.config.add_section(essid_key)
for x in cur_network: