cleanup: Only omit braces for single-line blocks
Braces can be avoided when a block consists of a single statement, but readability suffers when the statement spans more than a single line. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/805
This commit is contained in:

committed by
Georges Basile Stavracas Neto

parent
c860409da5
commit
07cc84f632
@ -222,11 +222,12 @@ class NetworkSecretDialog extends ModalDialog.ModalDialog {
|
||||
validate: this._validateStaticWep, password: true });
|
||||
break;
|
||||
case 'ieee8021x':
|
||||
if (wirelessSecuritySetting.auth_alg == 'leap') // Cisco LEAP
|
||||
if (wirelessSecuritySetting.auth_alg == 'leap') { // Cisco LEAP
|
||||
secrets.push({ label: _("Password: "), key: 'leap-password',
|
||||
value: wirelessSecuritySetting.leap_password || '', password: true });
|
||||
else // Dynamic (IEEE 802.1x) WEP
|
||||
} else { // Dynamic (IEEE 802.1x) WEP
|
||||
this._get8021xSecrets(secrets);
|
||||
}
|
||||
break;
|
||||
case 'wpa-eap':
|
||||
this._get8021xSecrets(secrets);
|
||||
@ -241,15 +242,18 @@ class NetworkSecretDialog extends ModalDialog.ModalDialog {
|
||||
|
||||
/* If hints were given we know exactly what we need to ask */
|
||||
if (this._settingName == "802-1x" && this._hints.length) {
|
||||
if (this._hints.includes('identity'))
|
||||
if (this._hints.includes('identity')) {
|
||||
secrets.push({ label: _("Username: "), key: 'identity',
|
||||
value: ieee8021xSetting.identity || '', password: false });
|
||||
if (this._hints.includes('password'))
|
||||
}
|
||||
if (this._hints.includes('password')) {
|
||||
secrets.push({ label: _("Password: "), key: 'password',
|
||||
value: ieee8021xSetting.password || '', password: true });
|
||||
if (this._hints.includes('private-key-password'))
|
||||
}
|
||||
if (this._hints.includes('private-key-password')) {
|
||||
secrets.push({ label: _("Private key password: "), key: 'private-key-password',
|
||||
value: ieee8021xSetting.private_key_password || '', password: true });
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user