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:
Florian Müllner
2013-11-29 18:17:34 +00:00
parent 751a3f0e94
commit deb2f30b37
31 changed files with 178 additions and 143 deletions

View File

@ -131,7 +131,7 @@ const WindowClone = new Lang.Class({
_onButtonRelease : function (actor, event) {
this.emit('selected', event.get_time());
return true;
return Clutter.EVENT_STOP;
},
_onDragBegin : function (draggable, time) {
@ -562,7 +562,7 @@ const ThumbnailsBox = new Lang.Class({
this._thumbnails = [];
this.actor.connect('button-press-event', function() { return true; });
this.actor.connect('button-press-event', function() { return Clutter.EVENT_STOP; });
this.actor.connect('button-release-event', Lang.bind(this, this._onButtonRelease));
Main.overview.connect('showing',
@ -607,7 +607,7 @@ const ThumbnailsBox = new Lang.Class({
}
}
return true;
return Clutter.EVENT_STOP;
},
_onDragBegin: function() {