aboutsummaryrefslogtreecommitdiffstats
path: root/lib/prompts.js
diff options
context:
space:
mode:
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;