[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r10250: [darcs-to-svn @ version 1.0.1] Original author: squires@pobo (in torbutton/trunk/src: . chrome/content chrome/locale/en-US chrome/skin defaults defaults/preferences)



Author: squires
Date: 2007-05-22 01:23:15 -0400 (Tue, 22 May 2007)
New Revision: 10250

Added:
   torbutton/trunk/src/CHANGELOG
   torbutton/trunk/src/chrome/content/preferences.xul
   torbutton/trunk/src/chrome/skin/bigbutton.png
   torbutton/trunk/src/chrome/skin/bigbutton_gr.png
   torbutton/trunk/src/chrome/skin/contents.rdf
   torbutton/trunk/src/chrome/skin/smallbutton.png
   torbutton/trunk/src/chrome/skin/smallbutton_gr.png
   torbutton/trunk/src/chrome/skin/torbutton.css
   torbutton/trunk/src/defaults/
   torbutton/trunk/src/defaults/preferences/
   torbutton/trunk/src/defaults/preferences/torbutton.js
Removed:
   torbutton/trunk/src/chrome/skin/classic/
Modified:
   torbutton/trunk/src/chrome.manifest
   torbutton/trunk/src/chrome/content/contents.rdf
   torbutton/trunk/src/chrome/content/torbutton.js
   torbutton/trunk/src/chrome/content/torbutton.xul
   torbutton/trunk/src/chrome/locale/en-US/torbutton.dtd
   torbutton/trunk/src/install.rdf
Log:
[darcs-to-svn @ version 1.0.1]

Original author: squires@xxxxxxxxx
Date: 2006-06-01 18:59:35+00:00

Added: torbutton/trunk/src/CHANGELOG
===================================================================
--- torbutton/trunk/src/CHANGELOG	2007-05-22 05:22:53 UTC (rev 10249)
+++ torbutton/trunk/src/CHANGELOG	2007-05-22 05:23:15 UTC (rev 10250)
@@ -0,0 +1,12 @@
+1.0.1
+  16 Mar 2006
+  * bugfix: toolbar button tooltips now display the correct status
+  * bugfix: set socks5 proxy to tor port (9050) instead of privoxy (8118)
+  * new: use socks_remote_dns on firefox versions that have it
+  * new: added update functionality through the extensions manager
+  * new: added preference: display statusbar panel (yes/no)
+  * new: added compatibility with firefox 1.0 and 0.9
+
+1.0
+  07 Mar 2006
+  * initial release

Modified: torbutton/trunk/src/chrome/content/contents.rdf
===================================================================
--- torbutton/trunk/src/chrome/content/contents.rdf	2007-05-22 05:22:53 UTC (rev 10249)
+++ torbutton/trunk/src/chrome/content/contents.rdf	2007-05-22 05:23:15 UTC (rev 10250)
@@ -1,23 +1,26 @@
 <?xml version="1.0"?>
 
-<RDF:RDF xmlns:chrome="http://www.mozilla.org/rdf/chrome#";
-         xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#";>
+<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
+     xmlns:chrome="http://www.mozilla.org/rdf/chrome#";>
 
-    <RDF:Seq about="urn:mozilla:package:root">
-        <RDF:li resource="urn:mozilla:package:torbutton"/>
-    </RDF:Seq>
+    <Seq about="urn:mozilla:package:root">
+        <li resource="urn:mozilla:package:torbutton"/>
+    </Seq>
     
-    <RDF:Description about="urn:mozilla:package:torbutton"
-                     chrome:extension="true"
-                     chrome:name="torbutton" />
-    </RDF:Description>
+    <Description about="urn:mozilla:package:torbutton"
+                 chrome:athor="Scott Squires"
+		 chrome:displayName="Torbutton"
+		 chrome:description="Torbutton provides a button to easily enable or disable the tor proxy"
+                 chrome:extension="true"
+                 chrome:name="torbutton">
+    </Description>
 
-    <RDF:Seq about="urn:mozilla:overlays">
-        <RDF:li resource="chrome://browser/content/browser.xul"/>
-    </RDF:Seq>
+    <Seq about="urn:mozilla:overlays">
+        <li resource="chrome://browser/content/browser.xul"/>
+    </Seq>
     
-    <RDF:Seq about="chrome://browser/content/browser.xul">
-        <RDF:li>chrome://torbutton/content/torbutton.xul</RDF:li>
-    </RDF:Seq>
+    <Seq about="chrome://browser/content/browser.xul">
+        <li>chrome://torbutton/content/torbutton.xul</li>
+    </Seq>
 
-</RDF:RDF>
+</RDF>

Added: torbutton/trunk/src/chrome/content/preferences.xul
===================================================================
--- torbutton/trunk/src/chrome/content/preferences.xul	2007-05-22 05:22:53 UTC (rev 10249)
+++ torbutton/trunk/src/chrome/content/preferences.xul	2007-05-22 05:23:15 UTC (rev 10250)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+
+<!DOCTYPE overlay SYSTEM "chrome://torbutton/locale/torbutton.dtd">
+
+<dialog id="torbutton-prefs"
+        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
+        xmlns:html="http://www.w3.org/1999/xhtml";
+        title="&torbutton.prefs.title;"
+        buttons="accept,cancel"
+        persist="screenX screenY"
+        onload="torbutton_prefs_init(document)"
+        ondialogaccept="torbutton_prefs_save(document)" >
+
+    <script type="application/x-javascript" src="torbutton.js" />
+    <checkbox id="torbutton_displayStatusPanel" label="&torbutton.prefs.display_panel;" />
+<!--
+    <checkbox id="torbutton_warnUponExcludedSite" label="&torbutton.prefs.prompt_before_visiting_excluded_sites;" />
+    <description>
+        <textnode value="&torbutton.prefs.warning_explanation;"/>
+    </description>
+-->
+</dialog>

Modified: torbutton/trunk/src/chrome/content/torbutton.js
===================================================================
--- torbutton/trunk/src/chrome/content/torbutton.js	2007-05-22 05:22:53 UTC (rev 10249)
+++ torbutton/trunk/src/chrome/content/torbutton.js	2007-05-22 05:23:15 UTC (rev 10250)
@@ -1,10 +1,64 @@
 var m_toolbutton = false;
 var m_statuspanel = false;
 var m_wasinited = false;
-var m_commonprefs = false;
+var m_prefs = false;
 var m_stringbundle = false;
 var m_tb_logger = false;
+var m_socks_pref_exists = false;
+var m_exclusion_list = "";
 
+var torbutton_pref_observer =
+{
+    register: function()
+    {
+        var pref_service = Components.classes["@mozilla.org/preferences-service;1"]
+                                     .getService(Components.interfaces.nsIPrefBranchInternal);
+        this._branch = pref_service.QueryInterface(Components.interfaces.nsIPrefBranchInternal);
+        this._branch.addObserver("", this, false);
+    },
+
+    unregister: function()
+    {
+        if (!this._branch) return;
+        this._branch.removeOberver("", this);
+    },
+
+    // topic:   what event occurred
+    // subject: what nsIPrefBranch we're observing
+    // data:    which pref has been changed (relative to subject)
+    observe: function(subject, topic, data)
+    {
+        if (topic != "nsPref:changed") return;
+        switch (data) {
+            case "extensions.torbutton.display_panel":
+                torbutton_set_panel_view();
+                break;
+            case "network.proxy.http":
+            case "network.proxy.http_port":
+            case "network.proxy.ssl":
+            case "network.proxy.ssl_port":
+            case "network.proxy.ftp":
+            case "network.proxy.ftp_port":
+            case "network.proxy.gopher":
+            case "network.proxy.gopher_port":
+            case "network.proxy.socks":
+            case "network.proxy.socks_port":
+            case "network.proxy.socks_version":
+            case "network.proxy.share_proxy_settings":
+            case "network.proxy.socks_remote_dns":
+            case "network.proxy.type":
+                torbutton_set_status();
+                break;
+        }
+    }
+}
+
+function torbutton_set_panel_view() {
+    torbutton_log(4, 'setting panel visibility');
+    var display_panel = m_prefs.getBoolPref('extensions.torbutton.display_panel');
+    document.getElementById('torbutton-panel').setAttribute('collapsed', !display_panel);
+}
+
 function torbutton_toggle() {
     torbutton_log(1, 'called toggle()');
     if (!m_wasinited) {
@@ -14,7 +68,6 @@
         torbutton_init_toolbutton();
     }
 
-    var nCurProxyType = m_commonprefs.getIntPref("network.proxy.type");
     if (torbutton_check_status()) {
         torbutton_disable_tor();
     } else {
@@ -22,167 +75,213 @@
     }
 }
 
+function torbutton_set_status() {
+    if (torbutton_check_status()) {
+        torbutton_log(1,'tor is enabled');
+        torbutton_update_status(1);
+    } else {
+        torbutton_log(1,'tor is disabled');
+        torbutton_update_status(0);
+    }
+}
+
 function torbutton_init() {
+    torbutton_log(1, 'called init()');
+
     if (!m_tb_logger) {
         try {
-            var logMngr = Components.classes["@mozmonkey.com/debuglogger/manager;1"].getService(Components.interfaces.nsIDebugLoggerManager); 
+            var logMngr = Components.classes["@mozmonkey.com/debuglogger/manager;1"]
+                                    .getService(Components.interfaces.nsIDebugLoggerManager); 
             m_tb_logger = logMngr.registerLogger("torbutton");
         } catch (exErr) {
             m_tb_logger = false;
         }
     }
     
+    // load localization strings
     if (!m_stringbundle) {
         try {
-            var oBundle = Components.classes["@mozilla.org/intl/stringbundle;1"].getService(Components.interfaces.nsIStringBundleService);
+            var oBundle = Components.classes["@mozilla.org/intl/stringbundle;1"]
+                                    .getService(Components.interfaces.nsIStringBundleService);
             m_stringbundle = oBundle.createBundle("chrome://torbutton/locale/torbutton.properties");
-        } catch(err) { torbutton_log(1, 'caught exception'); }
+        } catch(err) {
+            m_stringbundle = false;
+        }
         if (!m_stringbundle) {
             torbutton_log(1, 'ERROR (init): failed to find torbutton-bundle');
         }
     }
 
-    torbutton_log(1, 'called init()');
-    if (!m_commonprefs) {
-    	torbutton_initPrefObjects();
+    if (!m_prefs) {
+    	torbutton_init_pref_objs();
     }
 
+    if (!m_toolbutton) {
+        torbutton_init_toolbutton();
+    } else {
+        torbutton_log(5, 'skipping toolbar button element search');
+    }
+
     if (!m_statuspanel) {
-        torbutton_log(1, 'looking for statusbar element');
-        if (document.getElementById("torbutton-panel")) {
-            m_statuspanel = document.getElementById("torbutton-panel");
-        } else {
-            torbutton_log(1, 'ERROR (init): failed to find torbutton-panel');
-        }
+        torbutton_init_statuspanel();
     } else {
-        torbutton_log(1, 'skipping statusbar panel element search');
+        torbutton_log(5, 'skipping statusbar panel element search');
     }
 
     if (!m_wasinited) {
-        torbutton_log(1, 'initializing observer');
-        var rObserver = {
-            observe : function(subject, topic, data) { torbutton_setButtonFromPreference(); }
-        };
-        torbutton_log(1, 'getting service');
-        var prefService = Components.classes["@mozilla.org/preferences-service;1"].
-            getService(Components.interfaces.nsIPrefService);
-        torbutton_log(1, 'getting branch');
-        var rBranch = prefService.getBranch("network.");
-        torbutton_log(1, 'quering interface');
-        var pbi = rBranch.QueryInterface(Components.interfaces.nsIPrefBranchInternal);
-        torbutton_log(1, 'adding observer');
-        pbi.addObserver("proxy", rObserver, false);
-        
+        torbutton_pref_observer.register();
         m_wasinited = true;
     } else {
-        torbutton_log(1, 'skipping observers init');
+        torbutton_log(5, 'skipping pref observer init');
     }
     
-    torbutton_log(1, 'setting from prefs');
-    torbutton_setButtonFromPreference();
-    torbutton_log(1, 'init completed');
+    // check if this version of Firefox has the socks_remote_dns option
+    m_socks_pref_exists = true;
+    try {
+        m_prefs.getCharPref("network.proxy.socks_remote_dns");
+    } catch (rErr) {
+        // no such preference
+        m_socks_pref_exists = false;
+    }
+
+    torbutton_set_panel_view();
+    torbutton_log(2, 'setting torbutton status from proxy prefs');
+    torbutton_set_status();
+    torbutton_log(2, 'init completed');
 }
 
+function torbutton_init_pref_objs() {
+    m_prefs = Components.classes["@mozilla.org/preferences-service;1"]
+                              .getService(Components.interfaces.nsIPrefBranch);
+}
+
 function torbutton_init_toolbutton() {
-    torbutton_log(1, 'called init_toolbutton()');
-    if (!m_toolbutton) {
-        torbutton_log(1, 'looking for button element');
-        if (document.getElementById("torbutton-button")) {
-            m_toolbutton = document.getElementById("torbutton-button");
-        } else {
-            torbutton_log(1, 'ERROR (init): failed to find torbutton-button');
-        }
+    torbutton_log(4, 'init_toolbutton(): looking for button element');
+    if (document.getElementById("torbutton-button")) {
+        m_toolbutton = document.getElementById("torbutton-button");
     } else {
-        torbutton_log(1, 'skipping button element search');
+        torbutton_log(1, 'ERROR (init): failed to find torbutton-button');
     }
 }
 
-function torbutton_initPrefObjects() {
-    m_commonprefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
+function torbutton_init_statuspanel() {
+    torbutton_log(4, 'init_statuspanel(): looking for statusbar element');
+    if (document.getElementById("torbutton-panel")) {
+        m_statuspanel = document.getElementById("torbutton-panel");
+    } else {
+        torbutton_log(1, 'ERROR (init): failed to find torbutton-panel');
+    }
 }
 
-function torbutton_check_status() {
-    torbutton_log(1,'checking tor status');
-    if ( (m_commonprefs.getIntPref("network.proxy.type")           == 0)           ||
-         (m_commonprefs.getCharPref("network.proxy.http")          != "localhost") ||
-         (m_commonprefs.getIntPref("network.proxy.http_port")      != 8118)        ||
-         (m_commonprefs.getCharPref("network.proxy.ssl")           != "localhost") ||
-         (m_commonprefs.getIntPref("network.proxy.ssl_port")       != 8118)        ||
-         (m_commonprefs.getCharPref("network.proxy.ftp")           != "localhost") ||
-         (m_commonprefs.getIntPref("network.proxy.ftp_port")       != 8118)        ||
-         (m_commonprefs.getCharPref("network.proxy.gopher")        != "localhost") ||
-         (m_commonprefs.getIntPref("network.proxy.gopher_port")    != 8118)        ||
-         (m_commonprefs.getCharPref("network.proxy.socks")         != "localhost") ||
-         (m_commonprefs.getIntPref("network.proxy.socks_port")     != 8118)        ||
-         (m_commonprefs.getIntPref("network.proxy.socks_version")  != 4)           ||
-         (m_commonprefs.getCharPref("network.proxy.no_proxies_on") != "localhost, 127.0.0.1") ||
-         (m_commonprefs.getIntPref("network.proxy.type")           != 1) )
-    {
-        return false;
-        // torbutton_log(1,'tor is disabled');
-        // torbutton_update_status(0);
-    } else {
-        return true;
-        // torbutton_log(1,'tor is enabled');
-        // torbutton_update_status(1);
+// preferences dialog functions
+//   torbutton_prefs_init() -- on dialog load
+//   torbutton_prefs_save() -- on dialog save
+
+function torbutton_prefs_init(doc) {
+    var checkbox_displayStatusPanel = doc.getElementById('torbutton_displayStatusPanel');
+    
+    sizeToContent();
+
+    if (!m_prefs) {
+        torbutton_init_pref_objs();
     }
+
+    doc.getElementById('torbutton_displayStatusPanel').checked = m_prefs.getBoolPref('extensions.torbutton.display_panel');
+    // doc.getElementById('torbutton_warnUponExcludedSite').checked = m_prefs.getBoolPref('extensions.torbutton.prompt_before_visiting_excluded_sites');
 }
 
-function torbutton_setButtonFromPreference() {
-    if (torbutton_check_status()) {
-        torbutton_log(1,'tor is enabled');
-        torbutton_update_status(1);
+function torbutton_prefs_save(doc) {
+    m_prefs.setBoolPref('extensions.torbutton.display_panel', doc.getElementById('torbutton_displayStatusPanel').checked);
+    // m_prefs.setBoolPref('extensions.torbutton.prompt_before_visiting_excluded_sites', doc.getElementById('torbutton_warnUponExcludedSite').checked);
+}
+
+function torbutton_check_status() {
+    // make sure we have the latest proxy exclusion list
+    m_exclusion_list = m_prefs.getCharPref("network.proxy.no_proxies_on");
+
+    var remote_dns = false;
+    if (m_socks_pref_exists) {
+         remote_dns = m_prefs.getBoolPref("network.proxy.socks_remote_dns");
     } else {
-        torbutton_log(1,'tor is disabled');
-        torbutton_update_status(0);
+         remote_dns = true;
     }
+
+    return ( (m_prefs.getIntPref("network.proxy.type")           == 1)           &&
+             (m_prefs.getCharPref("network.proxy.http")          == "localhost") &&
+             (m_prefs.getIntPref("network.proxy.http_port")      == 8118)        &&
+             (m_prefs.getCharPref("network.proxy.ssl")           == "localhost") &&
+             (m_prefs.getIntPref("network.proxy.ssl_port")       == 8118)        &&
+             (m_prefs.getCharPref("network.proxy.ftp")           == "localhost") &&
+             (m_prefs.getIntPref("network.proxy.ftp_port")       == 8118)        &&
+             (m_prefs.getCharPref("network.proxy.gopher")        == "localhost") &&
+             (m_prefs.getIntPref("network.proxy.gopher_port")    == 8118)        &&
+             (m_prefs.getCharPref("network.proxy.socks")         == "localhost") &&
+             (m_prefs.getIntPref("network.proxy.socks_port")     == 9050)        &&
+             (m_prefs.getIntPref("network.proxy.socks_version")  == 5)           &&
+             (m_prefs.getBoolPref("network.proxy.share_proxy_settings") == false) &&
+             (remote_dns == true) );
 }
 
 function torbutton_disable_tor() {
-    torbutton_log(1, 'called disable_tor()');
-    m_commonprefs.setIntPref("network.proxy.type", 0);
+    torbutton_log(2, 'called disable_tor()');
+    m_prefs.setIntPref("network.proxy.type", 0);
 }
 
 function torbutton_enable_tor() {
-    torbutton_log(1, 'called enable_tor()');
+    torbutton_log(2, 'called enable_tor()');
 
-    m_commonprefs.setCharPref("network.proxy.http", "localhost");
-    m_commonprefs.setIntPref("network.proxy.http_port", 8118);
-    m_commonprefs.setCharPref("network.proxy.ssl", "localhost");
-    m_commonprefs.setIntPref("network.proxy.ssl_port", 8118);
-    m_commonprefs.setCharPref("network.proxy.ftp", "localhost");
-    m_commonprefs.setIntPref("network.proxy.ftp_port", 8118);
-    m_commonprefs.setCharPref("network.proxy.gopher", "localhost");
-    m_commonprefs.setIntPref("network.proxy.gopher_port", 8118);
-    m_commonprefs.setCharPref("network.proxy.socks", "localhost");
-    m_commonprefs.setIntPref("network.proxy.socks_port", 8118);
-    m_commonprefs.setIntPref("network.proxy.socks_version", 4);
-    m_commonprefs.setCharPref("network.proxy.no_proxies_on", "localhost, 127.0.0.1");
-    m_commonprefs.setIntPref("network.proxy.type", 1);
+    m_prefs.setCharPref("network.proxy.http", "localhost");
+    m_prefs.setIntPref("network.proxy.http_port", 8118);
+    m_prefs.setCharPref("network.proxy.ssl", "localhost");
+    m_prefs.setIntPref("network.proxy.ssl_port", 8118);
+    m_prefs.setCharPref("network.proxy.ftp", "localhost");
+    m_prefs.setIntPref("network.proxy.ftp_port", 8118);
+    m_prefs.setCharPref("network.proxy.gopher", "localhost");
+    m_prefs.setIntPref("network.proxy.gopher_port", 8118);
+    m_prefs.setCharPref("network.proxy.socks", "localhost");
+    m_prefs.setIntPref("network.proxy.socks_port", 9050);
+    m_prefs.setIntPref("network.proxy.socks_version", 5);
+    m_prefs.setBoolPref("network.proxy.share_proxy_settings", false);
+    if (m_socks_pref_exists) {
+        m_prefs.setBoolPref("network.proxy.socks_remote_dns", true);
+    }
+    m_prefs.setIntPref("network.proxy.type", 1);
 }
 
 function torbutton_update_status(nMode) {
     var sPrefix;
+    var label;
+    var tooltip;
 
-    torbutton_log(1, 'called update_status('+nMode+')');
+    torbutton_log(2, 'called update_status('+nMode+')');
     if (nMode == 0) {
         if (m_toolbutton) {
+            tooltip = m_stringbundle.GetStringFromName("torbutton.button.tooltip.disabled");
             m_toolbutton.setAttribute('tbstatus', 'off');
-            m_toolbutton.setAttribute('tooltiptext', m_stringbundle.GetStringFromName("torbutton.button.tooltip.disabled"));
+            m_toolbutton.setAttribute('tooltiptext', tooltip);
         }
 
-        m_statuspanel.style.color = "#F00";
-        m_statuspanel.setAttribute('label', m_stringbundle.GetStringFromName("torbutton.panel.label.disabled"));
-        m_statuspanel.setAttribute('tooltiptext', m_stringbundle.GetStringFromName("torbutton.panel.tooltip.disabled"));
+        if (window.statusbar.visible) {
+            label   = m_stringbundle.GetStringFromName("torbutton.panel.label.disabled");
+            tooltip = m_stringbundle.GetStringFromName("torbutton.panel.tooltip.disabled");
+            m_statuspanel.style.color = "#F00";
+            m_statuspanel.setAttribute('label', label);
+            m_statuspanel.setAttribute('tooltiptext', tooltip);
+        }
     } else {
         if (m_toolbutton) {
+            tooltip = m_stringbundle.GetStringFromName("torbutton.button.tooltip.enabled");
             m_toolbutton.setAttribute('tbstatus', 'on');
-            m_toolbutton.setAttribute('tooltiptext', m_stringbundle.GetStringFromName("torbutton.button.tooltip.disabled"));
+            m_toolbutton.setAttribute('tooltiptext', tooltip);
         }
 
-        m_statuspanel.style.color = "#390";
-        m_statuspanel.setAttribute('label', m_stringbundle.GetStringFromName("torbutton.panel.label.enabled"));
-        m_statuspanel.setAttribute('tooltiptext', m_stringbundle.GetStringFromName("torbutton.panel.tooltip.enabled"));
+        if (window.statusbar.visible) {
+            label   = m_stringbundle.GetStringFromName("torbutton.panel.label.enabled");
+            tooltip = m_stringbundle.GetStringFromName("torbutton.panel.tooltip.enabled");
+            m_statuspanel.style.color = "#390";
+            m_statuspanel.setAttribute('label', label);
+            m_statuspanel.setAttribute('tooltiptext', tooltip);
+        }
     }
 }
 

Modified: torbutton/trunk/src/chrome/content/torbutton.xul
===================================================================
--- torbutton/trunk/src/chrome/content/torbutton.xul	2007-05-22 05:22:53 UTC (rev 10249)
+++ torbutton/trunk/src/chrome/content/torbutton.xul	2007-05-22 05:23:15 UTC (rev 10250)
@@ -19,8 +19,8 @@
         <toolbarbutton 
             id="torbutton-button" 
             class="toolbarbutton-1" 
-            tooltiptext="&torbuttonTooltip;" 
-            label="&torbuttonButton.label;"
+            tooltiptext="&torbutton.button.tooltip;" 
+            label="&torbutton.button.label;"
             oncommand="torbutton_toggle();" />
     </toolbarpalette>
 

Modified: torbutton/trunk/src/chrome/locale/en-US/torbutton.dtd
===================================================================
--- torbutton/trunk/src/chrome/locale/en-US/torbutton.dtd	2007-05-22 05:22:53 UTC (rev 10249)
+++ torbutton/trunk/src/chrome/locale/en-US/torbutton.dtd	2007-05-22 05:23:15 UTC (rev 10250)
@@ -1,2 +1,7 @@
-<!ENTITY torbuttonButton.label "TorButton">
-<!ENTITY torbuttonTooltip "Turn Tor on/off">
+<!ENTITY torbutton.prefs.title "Torbutton Preferences">
+<!ENTITY torbutton.prefs.display_panel "Display Tor proxy setting in the status bar">
+<!ENTITY torbutton.button.label "Torbutton">
+<!ENTITY torbutton.button.tooltip "Turn Tor on/off">
+
+<!-- all text below this point is not used yet and does not need to be translated -->
+<!ENTITY torbutton.prefs.prompt_before_visiting_excluded_sites "Prompt user before visiting sites in the proxy exclusion list">

Added: torbutton/trunk/src/chrome/skin/bigbutton.png
===================================================================
(Binary files differ)


Property changes on: torbutton/trunk/src/chrome/skin/bigbutton.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: torbutton/trunk/src/chrome/skin/bigbutton_gr.png
===================================================================
(Binary files differ)


Property changes on: torbutton/trunk/src/chrome/skin/bigbutton_gr.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: torbutton/trunk/src/chrome/skin/contents.rdf
===================================================================
--- torbutton/trunk/src/chrome/skin/contents.rdf	2007-05-22 05:22:53 UTC (rev 10249)
+++ torbutton/trunk/src/chrome/skin/contents.rdf	2007-05-22 05:23:15 UTC (rev 10250)
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+
+<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
+     xmlns:chrome="http://www.mozilla.org/rdf/chrome#";>
+
+    <Seq about="urn:mozilla:skin:root">
+        <li resource="urn:mozilla:skin:classic/1.0"/>
+    </Seq>
+  
+    <Description about="urn:mozilla:skin:classic/1.0">
+        <chrome:packages>
+            <Seq about="urn:mozilla:skin:classic/1.0:packages">
+                <li resource="urn:mozilla:skin:classic/1.0:torbutton"/>
+            </Seq>
+        </chrome:packages>
+    </Description>
+
+    <Seq about="urn:mozilla:stylesheets">
+        <li resource="chrome://browser/content/browser.xul"/>
+        <li resource="chrome://global/content/customizeToolbar.xul"/>
+    </Seq>
+
+    <!-- FireFox -->  
+    <Seq about="chrome://browser/content/browser.xul">
+        <li>chrome://torbutton/skin/torbutton.css</li>
+    </Seq>
+
+    <Seq about="chrome://global/content/customizeToolbar.xul">
+        <li>chrome://torbutton/skin/torbutton.css</li>
+    </Seq>
+</RDF>

Added: torbutton/trunk/src/chrome/skin/smallbutton.png
===================================================================
(Binary files differ)


Property changes on: torbutton/trunk/src/chrome/skin/smallbutton.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: torbutton/trunk/src/chrome/skin/smallbutton_gr.png
===================================================================
(Binary files differ)


Property changes on: torbutton/trunk/src/chrome/skin/smallbutton_gr.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: torbutton/trunk/src/chrome/skin/torbutton.css
===================================================================
--- torbutton/trunk/src/chrome/skin/torbutton.css	2007-05-22 05:22:53 UTC (rev 10249)
+++ torbutton/trunk/src/chrome/skin/torbutton.css	2007-05-22 05:23:15 UTC (rev 10250)
@@ -0,0 +1,18 @@
+#torbutton-button {
+  list-style-image: url("chrome://torbutton/skin/bigbutton.png");
+}
+#torbutton-button[tbstatus="on"] {
+  list-style-image: url("chrome://torbutton/skin/bigbutton_gr.png");
+}
+#torbutton-button[tbstatus="off"] {
+  list-style-image: url("chrome://torbutton/skin/bigbutton.png");
+}
+toolbar[iconsize="small"] #torbutton-button {
+  list-style-image: url("chrome://torbutton/skin/smallbutton.png");
+}
+toolbar[iconsize="small"] #torbutton-button[tbstatus="on"] {
+  list-style-image: url("chrome://torbutton/skin/smallbutton_gr.png");
+}
+toolbar[iconsize="small"] #torbutton-button[tbstatus="off"] {
+  list-style-image: url("chrome://torbutton/skin/smallbutton.png");
+}

Modified: torbutton/trunk/src/chrome.manifest
===================================================================
--- torbutton/trunk/src/chrome.manifest	2007-05-22 05:22:53 UTC (rev 10249)
+++ torbutton/trunk/src/chrome.manifest	2007-05-22 05:23:15 UTC (rev 10250)
@@ -3,5 +3,5 @@
 
 locale torbutton en-US chrome/locale/en-US/
 
-skin torbutton classic/1.0 chrome/skin/classic/
+skin torbutton classic/1.0 chrome/skin/
 style chrome://global/content/customizeToolbar.xul chrome://torbutton/skin/torbutton.css

Added: torbutton/trunk/src/defaults/preferences/torbutton.js
===================================================================
--- torbutton/trunk/src/defaults/preferences/torbutton.js	2007-05-22 05:22:53 UTC (rev 10249)
+++ torbutton/trunk/src/defaults/preferences/torbutton.js	2007-05-22 05:23:15 UTC (rev 10250)
@@ -0,0 +1,2 @@
+// pref("extensions.torbutton.prompt_before_visiting_excluded_sites",true);
+pref("extensions.torbutton.display_panel",true);

Modified: torbutton/trunk/src/install.rdf
===================================================================
--- torbutton/trunk/src/install.rdf	2007-05-22 05:22:53 UTC (rev 10249)
+++ torbutton/trunk/src/install.rdf	2007-05-22 05:23:15 UTC (rev 10250)
@@ -1,34 +1,28 @@
 <?xml version="1.0"?>
-
-<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
-     xmlns:em="http://www.mozilla.org/2004/em-rdf#";>
-
-    <Description about="urn:mozilla:install-manifest">
-        <em:creator>Scott Squires</em:creator>
-        <em:description>TorButton provides a button to easily enable or disable the tor proxy</em:description>
-        <em:id>{e0204bd5-9d31-402b-a99d-a6aa8ffebdca}</em:id>
-        <em:name>TorButton</em:name>
-        <em:version>1.0</em:version>
-
-        <em:targetApplication>
-            <Description>
-                <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
-                <em:minVersion>0.9</em:minVersion>
-                <em:maxVersion>1.5.0.1</em:maxVersion>
-            </Description>
-        </em:targetApplication>
-
-        <em:file>
-            <Description about="urn:mozilla:extension:file:torbutton.jar">
-                <em:package>content/</em:package>
-                <em:locale>locale/en-US/</em:locale>
-                <em:skin>skin/classic/</em:skin>
-            </Description>
-        </em:file>
-
-        <em:file>
-            <Description resource="urn:mozilla:extension:file:torbutton.jar"/>
-        </em:file>
-    </Description>
-
-</RDF>
+<RDF:RDF xmlns:em="http://www.mozilla.org/2004/em-rdf#";
+         xmlns:NC="http://home.netscape.com/NC-rdf#";
+         xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#";>
+  <RDF:Description RDF:about="urn:mozilla:extension:file:torbutton.jar"
+                   em:package="content/"
+                   em:locale="locale/en-US/"
+                   em:skin="skin/" />
+  <RDF:Description RDF:about="urn:mozilla:install-manifest"
+                   em:name="Torbutton"
+                   em:creator="Scott Squires"
+                   em:description="Torbutton provides a button to easily enable or disable the tor proxy"
+                   em:id="{e0204bd5-9d31-402b-a99d-a6aa8ffebdca}"
+                   em:version="1.0.1"
+                   em:homepageURL="http://zargon.hobbesnet.org/~squires/torbutton/";
+                   em:updateURL="http://zargon.hobbesnet.org/~squires/torbutton/update.rdf";
+                   em:optionsURL="chrome://torbutton/content/preferences.xul"
+                   em:aboutURL="chrome://torbutton/content/about.xul"
+                   em:iconURL="chrome://torbutton/skin/bigbutton_gr.png">
+    <em:targetApplication RDF:resource="rdf:#$QkNYY"/>
+    <em:file RDF:resource="urn:mozilla:extension:file:torbutton.jar"/>
+    <em:file RDF:resource="rdf:#$ZkNYY"/>
+  </RDF:Description>
+  <RDF:Description RDF:about="rdf:#$QkNYY"
+                   em:id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
+                   em:minVersion="0.9"
+                   em:maxVersion="1.5.0.*" />
+</RDF:RDF>