From 73ff76aa39fd3986207f0a2aee8cb901f4588ab0 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 23 Sep 2006 09:09:55 +0000 Subject: [PATCH] Use active window if non specified in Scholar.ProgressWindow() --- .../chromeFiles/content/scholar/xpcom/progressWindow.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/chrome/chromeFiles/content/scholar/xpcom/progressWindow.js b/chrome/chromeFiles/content/scholar/xpcom/progressWindow.js index 2eaadfff4..07c47a4f4 100644 --- a/chrome/chromeFiles/content/scholar/xpcom/progressWindow.js +++ b/chrome/chromeFiles/content/scholar/xpcom/progressWindow.js @@ -4,6 +4,13 @@ * Pass the active window into the constructor */ Scholar.ProgressWindow = function(_window){ + if (!_window){ + var _window = + Components.classes["@mozilla.org/embedcomp/window-watcher;1"]. + getService(Components.interfaces.nsIWindowWatcher). + activeWindow; + } + var _progressWindow = null; var _windowLoaded = false; var _windowLoading = false; @@ -21,6 +28,7 @@ Scholar.ProgressWindow = function(_window){ this.fade = fade; this.kill = kill; + function show() { if(_windowLoading || _windowLoaded) { // already loading or loaded return false;