network-manager-applet r709 - in trunk: . src
- From: dcbw svn gnome org
- To: svn-commits-list gnome org
- Subject: network-manager-applet r709 - in trunk: . src
- Date: Wed, 30 Apr 2008 16:37:57 +0100 (BST)
Author: dcbw
Date: Wed Apr 30 15:37:57 2008
New Revision: 709
URL: http://svn.gnome.org/viewvc/network-manager-applet?rev=709&view=rev
Log:
2008-04-30 Dan Williams <dcbw redhat com>
* src/wireless-dialog.c
- (security_combo_changed): re-validate when security combo changes
- (security_combo_init): guess WEP key type and select the right option
in the security combo
Modified:
trunk/ChangeLog
trunk/src/wireless-dialog.c
Modified: trunk/src/wireless-dialog.c
==============================================================================
--- trunk/src/wireless-dialog.c (original)
+++ trunk/src/wireless-dialog.c Wed Apr 30 15:37:57 2008
@@ -171,6 +171,9 @@
gtk_container_add (GTK_CONTAINER (vbox), sec_widget);
wireless_security_unref (sec);
+
+ /* Re-validate */
+ wireless_security_changed_cb (NULL, sec);
}
} else {
g_warning ("%s: no active security combo box item.", __func__);
@@ -474,12 +477,16 @@
if ( nm_utils_security_valid (NMU_SEC_STATIC_WEP, dev_caps, !!cur_ap, is_adhoc, ap_flags, ap_wpa, ap_rsn)
&& ((!ap_wpa && !ap_rsn) || !(dev_caps & (NM_802_11_DEVICE_CAP_WPA | NM_802_11_DEVICE_CAP_RSN)))) {
WirelessSecurityWEPKey *ws_wep;
+ WEPKeyType default_wep_type = WEP_KEY_TYPE_PASSPHRASE;
+
+ if (default_type == NMU_SEC_STATIC_WEP)
+ default_wep_type = ws_wep_guess_key_type (connection, connection_id);
ws_wep = ws_wep_key_new (glade_file, connection, connection_id, WEP_KEY_TYPE_PASSPHRASE);
if (ws_wep) {
add_security_item (dialog, WIRELESS_SECURITY (ws_wep), sec_model,
&iter, _("WEP 128-bit Passphrase"));
- if ((active < 0) && (default_type == NMU_SEC_STATIC_WEP))
+ if ((active < 0) && (default_type == NMU_SEC_STATIC_WEP) && (default_wep_type == WEP_KEY_TYPE_PASSPHRASE))
active = item;
item++;
}
@@ -488,7 +495,7 @@
if (ws_wep) {
add_security_item (dialog, WIRELESS_SECURITY (ws_wep), sec_model,
&iter, _("WEP 40/128-bit Hexadecimal"));
- if ((active < 0) && (default_type == NMU_SEC_STATIC_WEP))
+ if ((active < 0) && (default_type == NMU_SEC_STATIC_WEP) && (default_wep_type == WEP_KEY_TYPE_HEX))
active = item;
item++;
}
@@ -497,7 +504,7 @@
if (ws_wep) {
add_security_item (dialog, WIRELESS_SECURITY (ws_wep), sec_model,
&iter, _("WEP 40/128-bit ASCII"));
- if ((active < 0) && (default_type == NMU_SEC_STATIC_WEP))
+ if ((active < 0) && (default_type == NMU_SEC_STATIC_WEP) && (default_wep_type == WEP_KEY_TYPE_ASCII))
active = item;
item++;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]