aboutsummaryrefslogtreecommitdiffstats
path: root/lib/prompts.js
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2011-03-02 00:12:52 +0100
committerMatěj Cepl <mcepl@redhat.com>2011-03-02 00:12:52 +0100
commit52bcf6e79eb3085b598a9ca0d21f60879a0e3706 (patch)
tree3bcddc3dfaa9f6ad7afbd0cf31f09d6bceb8e208 /lib/prompts.js
parent9e6ca915c304b08e60f6dfa453475045ef438736 (diff)
downloadbugzilla-triage-52bcf6e79eb3085b598a9ca0d21f60879a0e3706.tar.gz
Yes, we can have window object in main script!
Diffstat (limited to 'lib/prompts.js')
-rw-r--r--lib/prompts.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/prompts.js b/lib/prompts.js
index d4a5293..ed9b3e5 100644
--- a/lib/prompts.js
+++ b/lib/prompts.js
@@ -97,9 +97,10 @@ exports.promptYesNoCancel = function promptOKNoCancel(prompt) {
* documentation is https://developer.mozilla.org/en/NsIFilePicker
*/
exports.promptFileOpenPicker = function promptFilePicker (win) {
+ var window = require("window-utils").activeWindow;
var fp = Cc["@mozilla.org/filepicker;1"]
.createInstance(Ci.nsIFilePicker);
- fp.init(win, "JSON File Open", Ci.nsIFilePicker.modeOpen);
+ fp.init(window, "JSON File Open", Ci.nsIFilePicker.modeOpen);
fp.appendFilter("JSON files", "*.json");
fp.appendFilters(Ci.nsIFilePicker.filterAll);
fp.filterIndex = 0;