[tor-commits] [tor-launcher/master] Make error alerts children of network settings dialog (if it is open).

brade at torproject.org brade at torproject.org
Wed Apr 17 18:19:02 UTC 2013


commit 1600617412e36522429ecc60095fad62b90a4870
Author: Kathy Brade <brade at torproject.org>
Date:   Wed Apr 17 14:18:02 2013 -0400

    Make error alerts children of network settings dialog (if it is open).
---
 src/chrome/content/network-settings.xul |    1 +
 src/modules/tl-util.jsm                 |    4 +++-
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/chrome/content/network-settings.xul b/src/chrome/content/network-settings.xul
index 06e817b..6e6c882 100644
--- a/src/chrome/content/network-settings.xul
+++ b/src/chrome/content/network-settings.xul
@@ -14,6 +14,7 @@
 <dialog id="TorNetworkSettings"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         title="&torsettings.dialog.title;"
+        windowtype="TorLauncher:NetworkSettings"
         persist="screenX screenY"
         buttons="accept,cancel,extra1"
         buttonlabelextra1="&torsettings.copyLog;"
diff --git a/src/modules/tl-util.jsm b/src/modules/tl-util.jsm
index 0de2f05..67cbfcd 100644
--- a/src/modules/tl-util.jsm
+++ b/src/modules/tl-util.jsm
@@ -36,7 +36,9 @@ let TorLauncherUtil =  // Public
       {
         var wm = Cc["@mozilla.org/appshell/window-mediator;1"]
                    .getService(Ci.nsIWindowMediator);
-        aParentWindow = wm.getMostRecentWindow("navigator:browser");
+        aParentWindow = wm.getMostRecentWindow("TorLauncher:NetworkSettings");
+        if (!aParentWindow)
+          aParentWindow = wm.getMostRecentWindow("navigator:browser");
       }
 
       var ps = Cc["@mozilla.org/embedcomp/prompt-service;1"]



More information about the tor-commits mailing list