[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [torbutton/master] Bug 6009: Implement a Tor controller as a browser extension.
commit 45b8c6107b8001ee36a4660d3eb4187b880a081b
Author: Kathleen Brade <brade@xxxxxxxxxxxxxxxxx>
Date: Thu Mar 28 15:20:33 2013 -0400
Bug 6009: Implement a Tor controller as a browser extension.
Add "Open Network Settings..." to Torbutton menu.
---
src/chrome/content/popup.xul | 6 ++++--
src/chrome/content/torbutton.js | 8 ++++++++
src/chrome/locale/en/torbutton.dtd | 2 ++
3 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/src/chrome/content/popup.xul b/src/chrome/content/popup.xul
index 6dc8451..cb4c780 100644
--- a/src/chrome/content/popup.xul
+++ b/src/chrome/content/popup.xul
@@ -36,7 +36,10 @@
accesskey="&torbutton.context_menu.about.key;"
insertafter="context-stop"
oncommand="window.open('chrome://torbutton/content/about.xul', '', 'chrome,centerscreen');"/>
-
+ <menuitem id="torbutton-networksettings"
+ label="&torbutton.context_menu.networksettings;"
+ accesskey="&torbutton.context_menu.networksettings.key;"
+ oncommand="torbutton_open_network_settings()"/>
<menuseparator hidden="true"/>
<menuitem id="torbutton-downloadUpdate"
label="&torbutton.context_menu.downloadUpdate;"
@@ -44,7 +47,6 @@
insertafter="context-stop"
oncommand="torbutton_download_update()"
hidden="true"/>
-
</menupopup>
</overlay>
diff --git a/src/chrome/content/torbutton.js b/src/chrome/content/torbutton.js
index f8b25d1..5a9ffab 100644
--- a/src/chrome/content/torbutton.js
+++ b/src/chrome/content/torbutton.js
@@ -2281,6 +2281,14 @@ function torbutton_close_window(event) {
}
}
+
+function torbutton_open_network_settings() {
+ var obsSvc = Components.classes["@mozilla.org/observer-service;1"]
+ .getService(Ci.nsIObserverService);
+ obsSvc.notifyObservers(this, "TorOpenNetworkSettings", null);
+}
+
+
window.addEventListener('load',torbutton_new_window,false);
window.addEventListener('unload', torbutton_close_window, false);
diff --git a/src/chrome/locale/en/torbutton.dtd b/src/chrome/locale/en/torbutton.dtd
index 890a59c..1457b20 100644
--- a/src/chrome/locale/en/torbutton.dtd
+++ b/src/chrome/locale/en/torbutton.dtd
@@ -30,6 +30,8 @@
<!ENTITY torbutton.context_menu.preferences.key "P">
<!ENTITY torbutton.context_menu.about "About Torbutton...">
<!ENTITY torbutton.context_menu.about.key "A">
+<!ENTITY torbutton.context_menu.networksettings "Open Network Settingsâ?¦">
+<!ENTITY torbutton.context_menu.networksettings.key "S">
<!ENTITY torbutton.context_menu.downloadUpdate "Download Tor Browser Bundle Update...">
<!ENTITY torbutton.context_menu.downloadUpdate.key "U">
<!ENTITY torbutton.context_menu.cookieProtections "Cookie Protections">
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits