cleanup: Use type-safe comparisons

We have been using type-safe comparisons in new code for quite a while
now, however old code has only been adapted slowly.

Change all the remaining bits to get rid of another legacy style
difference.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2866>
This commit is contained in:
Florian Müllner
2023-08-07 02:51:19 +02:00
committed by Marge Bot
parent 9a3913d4a0
commit a42f7c2384
94 changed files with 847 additions and 845 deletions

View File

@ -105,7 +105,7 @@ export const ModalDialog = GObject.registerClass({
}
_setState(state) {
if (this._state == state)
if (this._state === state)
return;
this._state = state;
@ -175,7 +175,7 @@ export const ModalDialog = GObject.registerClass({
}
open(timestamp, onPrimary) {
if (this.state == State.OPENED || this.state == State.OPENING)
if (this.state === State.OPENED || this.state === State.OPENING)
return true;
if (!this.pushModal(timestamp))
@ -195,7 +195,7 @@ export const ModalDialog = GObject.registerClass({
}
close(timestamp) {
if (this.state == State.CLOSED || this.state == State.CLOSING)
if (this.state === State.CLOSED || this.state === State.CLOSING)
return;
this._setState(State.CLOSING);
@ -276,10 +276,10 @@ export const ModalDialog = GObject.registerClass({
// immediately, but the lightbox should remain until the logout is
// complete.
_fadeOutDialog(timestamp) {
if (this.state == State.CLOSED || this.state == State.CLOSING)
if (this.state === State.CLOSED || this.state === State.CLOSING)
return;
if (this.state == State.FADED_OUT)
if (this.state === State.FADED_OUT)
return;
this.popModal(timestamp);