From b02ccfe8bc6e038da6b494a33154fd71e9bd5170 Mon Sep 17 00:00:00 2001 From: Frank Ploss Date: Mon, 21 Dec 2015 15:37:58 +0100 Subject: [PATCH] Replace double-click by menu item --- README.md | 2 ++ extension.js | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c7f20d2..1138ea8 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ Suppose beta status. ## TODO * Add other authentication methods * Make configurable (host/port to use) +* Use async communication with Tor server, making it possible to react to + signals from the server ## Ideas * Add option for switching identity regularly diff --git a/extension.js b/extension.js index aecb487..a2fe214 100644 --- a/extension.js +++ b/extension.js @@ -48,10 +48,10 @@ const TorButton = new Lang.Class({ }); this.actor.add_child(this._icon); - this.actor.connect('button-press-event', Lang.bind(this, function(actor, event) { - if (event.get_click_count() >= 2) { - this._switchTorIdentity(); - } + + this.menu.addAction('Switch Tor Identity', Lang.bind(this, function(event) { + this._switchTorIdentity(); + log('Switched to a new Tor identity!'); })); },