Bug #217093 --> fix find in this message for the branch (this patch would break firebird if it was checked into the trunk.

This commit is contained in:
scott%scott-macgregor.org 2003-08-30 05:44:41 +00:00
Родитель 4e4a6a1884
Коммит b4abee05d9
1 изменённых файлов: 15 добавлений и 3 удалений

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

@ -28,6 +28,7 @@
var dialog; // Quick access to document/form elements.
var gFindInst; // nsIWebBrowserFind that we're going to use
var gFindInstData; // use this to update the find inst data
function initDialogObject()
{
@ -87,10 +88,15 @@ function onLoad()
initDialogObject();
// get the find instance
var finder = window.arguments[0];
var arg0 = window.arguments[0];
if (arg0 instanceof window.opener.nsFindInstData) {
gFindInstData = arg0;
gFindInst = gFindInstData.webBrowserFind;
} else {
// If the dialog was opened from window.find(), findInst will be an
// nsISupports interface, so QueryInterface anyway to nsIWebBrowserFind.
gFindInst = finder.QueryInterface(Components.interfaces.nsIWebBrowserFind);
// nsISupports interface, so QueryInterface anyway to nsIWebBrowserFind
gFindInst = arg0.QueryInterface(Components.interfaces.nsIWebBrowserFind);
}
fillDialog();
doEnabling();
@ -107,6 +113,12 @@ function onUnload()
function onAccept()
{
if (gFindInstData && gFindInst != gFindInstData.webBrowserFind)
{
gFindInstData.init();
gFindInst = gFindInstData.webBrowserFind;
}
// Transfer dialog contents to the find service.
saveFindData();