focusCaretTracker: Minor cleanup

This commit is contained in:
Florian Müllner 2013-09-06 10:18:09 +02:00
parent 56d96383e2
commit b04c47c15f

View File

@ -37,14 +37,10 @@ const FocusCaretTracker = new Lang.Class({
}, },
_onChanged: function(event) { _onChanged: function(event) {
let update = null;
if (event.type.indexOf(STATECHANGED) == 0) if (event.type.indexOf(STATECHANGED) == 0)
update = 'focus-changed'; this.emit('focus-changed', event);
else if (event.type == CARETMOVED) else if (event.type == CARETMOVED)
update = 'caret-moved'; this.emit('caret-moved', event);
if(update != null)
this.emit(update, event);
}, },
registerFocusListener: function() { registerFocusListener: function() {