[tor-commits] [torbirdy/master] Remove redundant code for displaying first-run dialog

sukhbir at torproject.org sukhbir at torproject.org
Fri Aug 31 12:44:43 UTC 2018


commit 9d81a38f8340a655141a4b14b62078d2c562648e
Author: Sukhbir Singh <sukhbir at torproject.org>
Date:   Thu Aug 30 16:39:23 2018 -0400

    Remove redundant code for displaying first-run dialog
    
    In 25113d0, we added support for displaying information about TorBirdy
    after it was installed and running for the first time. It was suggested
    that this may confuse the users so it was disabled in dfb1dc8.  This
    commit removes the obsolete code instead of just disabling the
    preference.
---
 chrome/content/firstruninfo.js       | 19 -------------------
 chrome/content/firstruninfo.xul      | 25 -------------------------
 chrome/content/overlay.js            |  8 --------
 chrome/locale/en/torbirdy.dtd        |  2 --
 chrome/locale/en/torbirdy.properties |  3 ---
 defaults/preferences/prefs.js        |  1 -
 6 files changed, 58 deletions(-)

diff --git a/chrome/content/firstruninfo.js b/chrome/content/firstruninfo.js
deleted file mode 100644
index cecae4a..0000000
--- a/chrome/content/firstruninfo.js
+++ /dev/null
@@ -1,19 +0,0 @@
-if (!org) var org = {};
-if (!org.torbirdy) org.torbirdy = {};
-
-if (!org.torbirdy.firstrun) org.torbirdy.firstrun = new function() {
-  var pub = {};
-
-  pub.onLoad = function() {
-    var strings = document.getElementById("torbirdy-strings-firstrun");
-
-    var description = document.getElementById("torbirdy-firstrun-info");
-    description.textContent = strings.getString("torbirdy.firstrun");
-
-    var torbirdyWebsite = strings.getString("torbirdy.website");
-    var website = document.getElementById("torbirdy-website");
-    website.value = torbirdyWebsite;
-  };
-
-  return pub;
-};
diff --git a/chrome/content/firstruninfo.xul b/chrome/content/firstruninfo.xul
deleted file mode 100644
index 17fd73a..0000000
--- a/chrome/content/firstruninfo.xul
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
-
-<!DOCTYPE overlay SYSTEM "chrome://castironthunderbirdclub/locale/torbirdy.dtd">
-
-<dialog id="castironthunderbird-firstrun-info" 
-        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-        title="&torbirdy.firstrun.title;"
-        buttons="accept"
-        onload="return org.torbirdy.firstrun.onLoad();"
-        ondialogaccept="window.close();">
-
-   <script type="application/javascript"
-     src="chrome://castironthunderbirdclub/content/firstruninfo.js"></script>
-
-   <stringbundleset id="stringbundleset">
-     <stringbundle id="torbirdy-strings-firstrun" src="chrome://castironthunderbirdclub/locale/torbirdy.properties"/>
-   </stringbundleset>
-
-   <vbox flex="1" pack="start">
-     <description id="torbirdy-firstrun-info" style="white-space: pre-wrap; width: 400px"></description>
-     <textbox id="torbirdy-website" readonly="true" />
-   </vbox>
-
-</dialog>
diff --git a/chrome/content/overlay.js b/chrome/content/overlay.js
index f0c0304..e590827 100644
--- a/chrome/content/overlay.js
+++ b/chrome/content/overlay.js
@@ -15,14 +15,6 @@
 
   window.TorBirdy = {
     onLoad: function() {
-      var infoRun = "extensions.torbirdy.info_run";
-      if (prefs.getBoolPref(infoRun)) {
-        window.open("chrome://castironthunderbirdclub/content/firstruninfo.xul",
-                    "FirstRunWindow",
-                    "chrome, dialog, centerscreen, resizable=no");
-        prefs.setBoolPref(infoRun, false);
-      }
-
       // Check if we are running Whonix.
       var whonix = false;
       if (env.exists("WHONIX")) {
diff --git a/chrome/locale/en/torbirdy.dtd b/chrome/locale/en/torbirdy.dtd
index c88803a..330b377 100644
--- a/chrome/locale/en/torbirdy.dtd
+++ b/chrome/locale/en/torbirdy.dtd
@@ -56,5 +56,3 @@
 <!ENTITY torbirdy.panel.usejondo.label "Use JonDo (Premium)">
 <!ENTITY torbirdy.panel.usewhonix.label "Use Whonix">
 <!ENTITY torbirdy.panel.preferences.label "Open TorBirdy Preferences">
-
-<!ENTITY torbirdy.firstrun.title "TorBirdy First-Run">
diff --git a/chrome/locale/en/torbirdy.properties b/chrome/locale/en/torbirdy.properties
index 4f645eb..0bc5db6 100644
--- a/chrome/locale/en/torbirdy.properties
+++ b/chrome/locale/en/torbirdy.properties
@@ -13,6 +13,3 @@ torbirdy.email.prompt=TorBirdy has disabled Thunderbird's auto-configuration wiz
 torbirdy.email.advanced=Please note that changing the advanced settings of TorBirdy is NOT recommended.\n\nYou should only continue if you are sure of what you are doing.
 torbirdy.email.advanced.nextwarning=Show this warning next time
 torbirdy.email.advanced.title=TorBirdy Advanced Settings
-
-torbirdy.firstrun=You are now running TorBirdy.\n\nTo help protect your anonymity, TorBirdy will enforce the Thunderbird settings it has set, preventing them from being changed by you or by any add-on. There are some settings that can be changed and those are accessed through TorBirdy's preferences dialog. When TorBirdy is uninstalled or disabled, all settings that it changes are reset to their default values (the values prior to TorBirdy's install).\n\nIf you are a new user, it is recommended that you read through the TorBirdy website to understand what we are trying to accomplish with TorBirdy for our users.
-torbirdy.website=https://trac.torproject.org/projects/tor/wiki/torbirdy
diff --git a/defaults/preferences/prefs.js b/defaults/preferences/prefs.js
index ea316d3..f4d92c9 100644
--- a/defaults/preferences/prefs.js
+++ b/defaults/preferences/prefs.js
@@ -8,7 +8,6 @@ pref("extensions.torbirdy.enigmail.confirmemail", false);
 pref("extensions.torbirdy.gpg_already_torified", false);
 pref("extensions.torbirdy.timezone", true);
 pref("extensions.torbirdy.whonix_run", true);
-pref("extensions.torbirdy.info_run", false);
 pref("extensions.torbirdy.emailwizard", false);
 pref("extensions.torbirdy.fetchall", false);
 pref("extensions.torbirdy.defaultprotocol", 0); // 0 - POP3, 1 - IMAP





More information about the tor-commits mailing list