[tbb-commits] [tor-browser/tor-browser-45.3.0esr-6.5-1] fixup! Bug #4234: Use the Firefox Update Process for Tor Browser.

gk at torproject.org gk at torproject.org
Thu Aug 11 06:21:46 UTC 2016


commit 219b21731bec577b8797a8914612f0ae9e55d1ad
Author: Kathy Brade <brade at pearlcrescent.com>
Date:   Wed Aug 10 13:43:25 2016 -0400

    fixup! Bug #4234: Use the Firefox Update Process for Tor Browser.
    
    Improve the about:tbupdate page:
      Show the browser name and version in the upper right corner (bug 19835).
      Use bold text in a couple of places (bug 19336).
---
 browser/base/content/abouttbupdate/aboutTBUpdate.css | 20 ++++++++++++++++++++
 .../base/content/abouttbupdate/aboutTBUpdate.xhtml   |  4 +++-
 browser/base/content/tab-content.js                  | 13 +++++++++++++
 3 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/browser/base/content/abouttbupdate/aboutTBUpdate.css b/browser/base/content/abouttbupdate/aboutTBUpdate.css
index 489c9d2..c171c58 100644
--- a/browser/base/content/abouttbupdate/aboutTBUpdate.css
+++ b/browser/base/content/abouttbupdate/aboutTBUpdate.css
@@ -6,6 +6,20 @@ body {
   background-size: 100% 100%;
 }
 
+#torbrowser-version {
+  /* These CSS rules match the about:tor page */
+  position: fixed;
+  top: 6px;
+  right: 6px;
+  height: 30px;
+  width: 200px;
+  white-space: pre-wrap;
+  text-align: right;
+  color: #4d4d4d;
+  font-family: "Liberation Sans", Arial, Helvetica, sans-serif;
+  font-size: 14px;
+}
+
 #logo {
   background-image: url("chrome://browser/content/abouttbupdate/aboutTBUpdateLogo.png");
   height: 128px;
@@ -21,6 +35,7 @@ body {
 
 #msg-updated {
   font-size: 120%;
+  font-weight: bold;
   margin-bottom: 20px;
 }
 
@@ -28,6 +43,11 @@ body {
   margin: 0px 20px 20px 20px;
 }
 
+#changelog-heading {
+  font-weight: bold;
+  margin-bottom: 4px;
+}
+
 #changelog {
   margin-left: 20px;
   white-space: pre;
diff --git a/browser/base/content/abouttbupdate/aboutTBUpdate.xhtml b/browser/base/content/abouttbupdate/aboutTBUpdate.xhtml
index 3a29e0c..115ec40 100644
--- a/browser/base/content/abouttbupdate/aboutTBUpdate.xhtml
+++ b/browser/base/content/abouttbupdate/aboutTBUpdate.xhtml
@@ -20,6 +20,7 @@
           type="text/javascript;version=1.7"/>
 </head>
 <body dir="&locale.dir;" onload="init()">
+<div id="torbrowser-version"/>
 <div id="logo"/>
 <div id="msg">
 <div id="msg-updated">&aboutTBUpdate.updated;</div>
@@ -27,7 +28,8 @@
 </div>
 </div>
 <br clear="all"/>
-<div id="changelog-container">&aboutTBUpdate.changeLogHeading;
+<div id="changelog-container">
+<div id="changelog-heading">&aboutTBUpdate.changeLogHeading;</div>
 <div id="changelog"></div>
 </div>
 </body>
diff --git a/browser/base/content/tab-content.js b/browser/base/content/tab-content.js
index 44489a2..b0f960a 100644
--- a/browser/base/content/tab-content.js
+++ b/browser/base/content/tab-content.js
@@ -5,6 +5,11 @@
 
 /* This content script contains code that requires a tab browser. */
 
+#ifdef TOR_BROWSER_VERSION
+# Add double-quotes back on (stripped by JarMaker.py).
+#expand const TOR_BROWSER_VERSION = "__TOR_BROWSER_VERSION__";
+#endif
+
 var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
@@ -391,6 +396,14 @@ let AboutTBUpdateListener = {
     let doc = content.document;
     doc.getElementById("infolink").setAttribute("href", this.getPostUpdateURL());
     doc.getElementById("changelog").textContent = this.getChangeLogText();
+
+    const kBrandBundle = "chrome://branding/locale/brand.properties";
+    let brandBundle = Cc["@mozilla.org/intl/stringbundle;1"]
+                        .getService(Ci.nsIStringBundleService)
+                        .createBundle(kBrandBundle);
+    let productName = brandBundle.GetStringFromName("brandFullName");
+    doc.getElementById("torbrowser-version").textContent = productName + "\n"
+                                                           + TOR_BROWSER_VERSION;
   },
 
   // Extract the post update URL from this page's query string.



More information about the tbb-commits mailing list