cleanup: Don't add linebreak before operators
When breaking overly long conditions into multiple lines, the operator should end the previous line instead of starting the new one. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/731
This commit is contained in:
parent
b446667df6
commit
efed695eca
@ -172,8 +172,8 @@ var BoxPointer = GObject.registerClass({
|
|||||||
let borderWidth = themeNode.get_length('-arrow-border-width');
|
let borderWidth = themeNode.get_length('-arrow-border-width');
|
||||||
minSize += borderWidth * 2;
|
minSize += borderWidth * 2;
|
||||||
natSize += borderWidth * 2;
|
natSize += borderWidth * 2;
|
||||||
if ((!isWidth && (this._arrowSide == St.Side.TOP || this._arrowSide == St.Side.BOTTOM))
|
if ((!isWidth && (this._arrowSide == St.Side.TOP || this._arrowSide == St.Side.BOTTOM)) ||
|
||||||
|| (isWidth && (this._arrowSide == St.Side.LEFT || this._arrowSide == St.Side.RIGHT))) {
|
(isWidth && (this._arrowSide == St.Side.LEFT || this._arrowSide == St.Side.RIGHT))) {
|
||||||
let rise = themeNode.get_length('-arrow-rise');
|
let rise = themeNode.get_length('-arrow-rise');
|
||||||
minSize += rise;
|
minSize += rise;
|
||||||
natSize += rise;
|
natSize += rise;
|
||||||
|
@ -164,9 +164,9 @@ class NetworkSecretDialog extends ModalDialog.ModalDialog {
|
|||||||
if (value.length == 64) {
|
if (value.length == 64) {
|
||||||
// must be composed of hexadecimal digits only
|
// must be composed of hexadecimal digits only
|
||||||
for (let i = 0; i < 64; i++) {
|
for (let i = 0; i < 64; i++) {
|
||||||
if (!((value[i] >= 'a' && value[i] <= 'f')
|
if (!((value[i] >= 'a' && value[i] <= 'f') ||
|
||||||
|| (value[i] >= 'A' && value[i] <= 'F')
|
(value[i] >= 'A' && value[i] <= 'F') ||
|
||||||
|| (value[i] >= '0' && value[i] <= '9')))
|
(value[i] >= '0' && value[i] <= '9')))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -180,15 +180,15 @@ class NetworkSecretDialog extends ModalDialog.ModalDialog {
|
|||||||
if (secret.wep_key_type == NM.WepKeyType.KEY) {
|
if (secret.wep_key_type == NM.WepKeyType.KEY) {
|
||||||
if (value.length == 10 || value.length == 26) {
|
if (value.length == 10 || value.length == 26) {
|
||||||
for (let i = 0; i < value.length; i++) {
|
for (let i = 0; i < value.length; i++) {
|
||||||
if (!((value[i] >= 'a' && value[i] <= 'f')
|
if (!((value[i] >= 'a' && value[i] <= 'f') ||
|
||||||
|| (value[i] >= 'A' && value[i] <= 'F')
|
(value[i] >= 'A' && value[i] <= 'F') ||
|
||||||
|| (value[i] >= '0' && value[i] <= '9')))
|
(value[i] >= '0' && value[i] <= '9')))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else if (value.length == 5 || value.length == 13) {
|
} else if (value.length == 5 || value.length == 13) {
|
||||||
for (let i = 0; i < value.length; i++) {
|
for (let i = 0; i < value.length; i++) {
|
||||||
if (!((value[i] >= 'a' && value[i] <= 'z')
|
if (!((value[i] >= 'a' && value[i] <= 'z') ||
|
||||||
|| (value[i] >= 'A' && value[i] <= 'Z')))
|
(value[i] >= 'A' && value[i] <= 'Z')))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -613,8 +613,8 @@ var PopupMenuBase = class {
|
|||||||
while (childBeforeIndex >= 0 && !isPopupMenuItemVisible(children[childBeforeIndex]))
|
while (childBeforeIndex >= 0 && !isPopupMenuItemVisible(children[childBeforeIndex]))
|
||||||
childBeforeIndex--;
|
childBeforeIndex--;
|
||||||
|
|
||||||
if (childBeforeIndex < 0
|
if (childBeforeIndex < 0 ||
|
||||||
|| children[childBeforeIndex]._delegate instanceof PopupSeparatorMenuItem) {
|
children[childBeforeIndex]._delegate instanceof PopupSeparatorMenuItem) {
|
||||||
menuItem.actor.hide();
|
menuItem.actor.hide();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -624,8 +624,8 @@ var PopupMenuBase = class {
|
|||||||
while (childAfterIndex < children.length && !isPopupMenuItemVisible(children[childAfterIndex]))
|
while (childAfterIndex < children.length && !isPopupMenuItemVisible(children[childAfterIndex]))
|
||||||
childAfterIndex++;
|
childAfterIndex++;
|
||||||
|
|
||||||
if (childAfterIndex >= children.length
|
if (childAfterIndex >= children.length ||
|
||||||
|| children[childAfterIndex]._delegate instanceof PopupSeparatorMenuItem) {
|
children[childAfterIndex]._delegate instanceof PopupSeparatorMenuItem) {
|
||||||
menuItem.actor.hide();
|
menuItem.actor.hide();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -909,8 +909,8 @@ class NMWirelessDialog extends ModalDialog.ModalDialog {
|
|||||||
this._client.activate_connection_async(connection, this._device, null, null, null);
|
this._client.activate_connection_async(connection, this._device, null, null, null);
|
||||||
} else {
|
} else {
|
||||||
let accessPoints = network.accessPoints;
|
let accessPoints = network.accessPoints;
|
||||||
if ((accessPoints[0]._secType == NMAccessPointSecurity.WPA2_ENT)
|
if ((accessPoints[0]._secType == NMAccessPointSecurity.WPA2_ENT) ||
|
||||||
|| (accessPoints[0]._secType == NMAccessPointSecurity.WPA_ENT)) {
|
(accessPoints[0]._secType == NMAccessPointSecurity.WPA_ENT)) {
|
||||||
// 802.1x-enabled APs require further configuration, so they're
|
// 802.1x-enabled APs require further configuration, so they're
|
||||||
// handled in gnome-control-center
|
// handled in gnome-control-center
|
||||||
Util.spawn(['gnome-control-center', 'wifi', 'connect-8021x-wifi',
|
Util.spawn(['gnome-control-center', 'wifi', 'connect-8021x-wifi',
|
||||||
|
Loading…
Reference in New Issue
Block a user