fix bug with not handling null parents correctly

This commit is contained in:
pavlov%netscape.com 2000-04-04 00:29:47 +00:00
Родитель 6a639e1cde
Коммит b58d97eecb
2 изменённых файлов: 22 добавлений и 8 удалений

Просмотреть файл

@ -119,10 +119,17 @@ nsFilePicker.prototype = {
o.filters.types = this.mFilters;
o.retvals = new Object();
this.mParentWindow.openDialog("chrome://global/content/filepicker.xul",
"",
"chrome,modal,resizeable=yes,dependent=yes",
o);
var parent;
if (this.mParentWindow) {
parent = this.mParentWindow;
} else {
parent = window;
}
parent.openDialog("chrome://global/content/filepicker.xul",
"",
"chrome,modal,resizeable=yes,dependent=yes",
o);
this.mFile = o.retvals.file;
lastDirectory = o.retvals.directory;

Просмотреть файл

@ -119,10 +119,17 @@ nsFilePicker.prototype = {
o.filters.types = this.mFilters;
o.retvals = new Object();
this.mParentWindow.openDialog("chrome://global/content/filepicker.xul",
"",
"chrome,modal,resizeable=yes,dependent=yes",
o);
var parent;
if (this.mParentWindow) {
parent = this.mParentWindow;
} else {
parent = window;
}
parent.openDialog("chrome://global/content/filepicker.xul",
"",
"chrome,modal,resizeable=yes,dependent=yes",
o);
this.mFile = o.retvals.file;
lastDirectory = o.retvals.directory;