js: Use EVENT_PROPAGATE/EVENT_STOP constants in event handlers
Just as SOURCE_CONTINUE/SOURCE_REMOVE in source functions, these constants increase code clarity over plain true/false. https://bugzilla.gnome.org/show_bug.cgi?id=719567
This commit is contained in:
@ -80,6 +80,7 @@ const AuthPrompt = new Lang.Class({
|
||||
if (event.get_key_symbol() == Clutter.KEY_Escape) {
|
||||
this.cancel();
|
||||
}
|
||||
return Clutter.EVENT_PROPAGATE;
|
||||
}));
|
||||
|
||||
this._userWell = new St.Bin({ x_fill: true,
|
||||
|
@ -764,7 +764,7 @@ const LoginDialog = new Lang.Class({
|
||||
global.stage.connect('captured-event',
|
||||
Lang.bind(this, function(actor, event) {
|
||||
if (this._timedLoginDelay == undefined)
|
||||
return false;
|
||||
return Clutter.EVENT_PROPAGATE;
|
||||
|
||||
if (event.type() == Clutter.EventType.KEY_PRESS ||
|
||||
event.type() == Clutter.EventType.BUTTON_PRESS) {
|
||||
@ -777,7 +777,7 @@ const LoginDialog = new Lang.Class({
|
||||
this._resetTimedLogin();
|
||||
}
|
||||
|
||||
return false;
|
||||
return Clutter.EVENT_PROPAGATE;
|
||||
}));
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user