Skip to content
Permalink
Browse files
Fixes #11728. Added warning dialog in case Transparent Torification i…
…s enabled.
  • Loading branch information
viggyprabhu committed Oct 19, 2014
1 parent 89f7713 commit 67f95be528c31ca194ec4a3762aa9f055599ec9f
Showing with 60 additions and 0 deletions.
  1. +8 −0 chrome/content/overlay.js
  2. +18 −0 chrome/content/transparenttorificationwarning.js
  3. +29 −0 chrome/content/transparenttorificationwarning.xul
  4. +5 −0 chrome/locale/en/torbirdy.dtd
@@ -70,6 +70,14 @@
myPanel.style.color = "red";
}
prefs.setBoolPref("extensions.torbirdy.whonix_run", false);

//Show warning to user if Transparent Torification is configured, refer Bug #11728
if(type === 3)
{
window.open("chrome://castironthunderbirdclub/content/transparenttorificationwarning.xul",
"TransparentTorificationWarningWindow",
"chrome, dialog, centerscreen, resizable=no");
}
}
else {
myPanel.label = strbundle.getString("torbirdy.enabled.disabled");
@@ -0,0 +1,18 @@
if (!org) var org = {};
if (!org.torbirdy) org.torbirdy = {};

if (!org.torbirdy.transparenttorificationwarning) org.torbirdy.transparenttorificationwarning = new function() {
var pub = {};

pub.onLoad = function() {

};

pub.onPrefs = function() {
window.open("chrome://castironthunderbirdclub/content/preferences.xul",
"Preferences",
"chrome, dialog, centerscreen, resizable=no");
};

return pub;
}
@@ -0,0 +1,29 @@
<?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-transparenttorification-warning"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&torbirdy.transparenttorificationwarning.title;"
buttons="accept,cancel"
buttonlabelcancel="&torbirdy.transparenttorificationwarning.ignore.button;"
ondialogcancel="window.close();"
buttonlabelaccept="&torbirdy.transparenttorificationwarning.prefs.button;"
ondialogaccept="return org.torbirdy.transparenttorificationwarning.onPrefs();"
onload="return org.torbirdy.transparenttorificationwarning.onLoad();">

<script type="application/x-javascript"
src="chrome://castironthunderbirdclub/content/transparenttorificationwarning.js">
</script>

<stringbundleset id="stringbundleset">
<stringbundle id="torbirdy-strings-transparenttorificationwarning" src="chrome://castironthunderbirdclub/locale/torbirdy.properties"/>
</stringbundleset>

<vbox flex="1" pack="start">
<description id="torbirdy-transparenttorification-warning" style="white-space: pre-wrap; width: 400px"></description>
<label value="&torbirdy.transparenttorificationwarning.label;" style="color:red"/>
</vbox>

</dialog>
@@ -61,3 +61,8 @@
<!ENTITY torbirdy.panel.preferences.label "Open TorBirdy Preferences">

<!ENTITY torbirdy.firstrun.title "TorBirdy First-Run">

<!ENTITY torbirdy.transparenttorificationwarning.title "Transparent Torification Warning!!!">
<!ENTITY torbirdy.transparenttorificationwarning.prefs.button "No, Open TorBirdy Preferences">
<!ENTITY torbirdy.transparenttorificationwarning.ignore.button "Yes, Ignore it!">
<!ENTITY torbirdy.transparenttorificationwarning.label "You have configured Torbirdy to work in Transparent Torification mode. Are you sure you want to continue with this settings?">

1 comment on commit 67f95be

@azadi

This comment has been minimized.

Copy link
Contributor

@azadi azadi commented on 67f95be Oct 23, 2014

Thanks for the patch. This is fine except for a few modifications. I will commit it shortly and update this ticket.

Please sign in to comment.