summaryrefslogtreecommitdiff
path: root/panels/network/wireless-security/ws-wep-key.c
diff options
context:
space:
mode:
Diffstat (limited to 'panels/network/wireless-security/ws-wep-key.c')
-rw-r--r--panels/network/wireless-security/ws-wep-key.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/panels/network/wireless-security/ws-wep-key.c b/panels/network/wireless-security/ws-wep-key.c
index 4ceb1ea29..6b3b7b44c 100644
--- a/panels/network/wireless-security/ws-wep-key.c
+++ b/panels/network/wireless-security/ws-wep-key.c
@@ -39,7 +39,6 @@ struct _WirelessSecurityWEPKey {
GtkLabel *key_label;
GtkCheckButton *show_key_check;
- gboolean editing_connection;
const char *password_flags_name;
NMWepKeyType type;
@@ -193,9 +192,8 @@ fill_connection (WirelessSecurity *security, NMConnection *connection)
g_object_set (s_wsec, NM_SETTING_WIRELESS_SECURITY_WEP_KEY_FLAGS, secret_flags, NULL);
/* Update secret flags and popup when editing the connection */
- if (self->editing_connection)
- nma_utils_update_password_storage (GTK_WIDGET (self->key_entry), secret_flags,
- NM_SETTING (s_wsec), self->password_flags_name);
+ nma_utils_update_password_storage (GTK_WIDGET (self->key_entry), secret_flags,
+ NM_SETTING (s_wsec), self->password_flags_name);
}
static void
@@ -282,20 +280,17 @@ wireless_security_iface_init (WirelessSecurityInterface *iface)
WirelessSecurityWEPKey *
ws_wep_key_new (NMConnection *connection,
- NMWepKeyType type,
- gboolean adhoc_create,
- gboolean secrets_only)
+ NMWepKeyType type)
{
WirelessSecurityWEPKey *self;
NMSettingWirelessSecurity *s_wsec = NULL;
NMSetting *setting = NULL;
guint8 default_key_idx = 0;
- gboolean is_adhoc = adhoc_create;
+ gboolean is_adhoc = FALSE;
gboolean is_shared_key = FALSE;
self = g_object_new (ws_wep_key_get_type (), NULL);
- self->editing_connection = secrets_only ? FALSE : TRUE;
self->password_flags_name = NM_SETTING_WIRELESS_SECURITY_WEP_KEY0;
self->type = type;
@@ -305,7 +300,7 @@ ws_wep_key_new (NMConnection *connection,
if (connection)
setting = (NMSetting *) nm_connection_get_setting_wireless_security (connection);
nma_utils_setup_password_storage (GTK_WIDGET (self->key_entry), 0, setting, self->password_flags_name,
- FALSE, secrets_only);
+ FALSE, FALSE);
if (connection) {
NMSettingWireless *s_wireless;
@@ -339,7 +334,7 @@ ws_wep_key_new (NMConnection *connection,
g_signal_connect_swapped (self->key_index_combo, "changed", G_CALLBACK (key_index_combo_changed_cb), self);
/* Key index is useless with adhoc networks */
- if (is_adhoc || secrets_only) {
+ if (is_adhoc) {
gtk_widget_hide (GTK_WIDGET (self->key_index_combo));
gtk_widget_hide (GTK_WIDGET (self->key_index_label));
}
@@ -357,7 +352,7 @@ ws_wep_key_new (NMConnection *connection,
/* Don't show auth method for adhoc (which always uses open-system) or
* when in "simple" mode.
*/
- if (is_adhoc || secrets_only) {
+ if (is_adhoc) {
/* Ad-Hoc connections can't use Shared Key auth */
if (is_adhoc)
gtk_combo_box_set_active (self->auth_method_combo, 0);