commit 73ff76aa39fd3986207f0a2aee8cb901f4588ab0
parent 27d1d63bfc676673395a90ffe5bf9b650068b31d
Author: Dan Stillman <dstillman@zotero.org>
Date: Sat, 23 Sep 2006 09:09:55 +0000
Use active window if non specified in Scholar.ProgressWindow()
Diffstat:
1 file changed, 8 insertions(+), 0 deletions(-)
diff --git 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;