Don't mix GJS and GObject signal systems

GJS implements a basic signal system that allows monkey-patching
JS objects with signal methods resembling the GObject ones. However
it's clearly not a good idea to replace the actual GObject methods,
so use the proper GObject facilities when inheriting from GObject.

https://bugzilla.gnome.org/show_bug.cgi?id=778660
This commit is contained in:
Florian Müllner
2017-02-14 18:24:50 +01:00
parent 30e17036e8
commit e08f2a4a04
3 changed files with 5 additions and 4 deletions

View File

@ -14,6 +14,7 @@ const DRAG_DISTANCE = 80;
const EdgeDragAction = new Lang.Class({
Name: 'EdgeDragAction',
Extends: Clutter.GestureAction,
Signals: { 'activated': {} },
_init : function(side, allowedModes) {
this.parent();
@ -81,4 +82,3 @@ const EdgeDragAction = new Lang.Class({
this.emit('activated');
}
});
Signals.addSignalMethods(EdgeDragAction.prototype);