Found out how to catch double click

master
Frank Ploss 9 years ago
parent 9d398d77e1
commit 0bc1ad9afc

@ -18,12 +18,18 @@ const TorButton = new Lang.Class({
_init: function(metadata, params) { _init: function(metadata, params) {
this.parent(null, IndicatorName); this.parent(null, IndicatorName);
this._icon = new St.Icon({ this._icon = new St.Icon({
icon_name: TorIcon, icon_name: TorIcon,
style_class: 'system-status-icon' style_class: 'system-status-icon'
}); });
this.actor.add_child(this._icon); this.actor.add_child(this._icon);
this.actor.connect('button-press-event', Lang.bind(this, function(actor, event) {
if (event.get_click_count() >= 2) {
log('TOR DOUBLE CLICK!!!');
}
}));
} }
}); });

Loading…
Cancel
Save