Persist the search window's x, y, width & height attributes.

This commit is contained in:
rjc%netscape.com 1999-09-15 13:42:06 +00:00
parent e283df1a25
commit 22f38a062e
2 changed files with 22 additions and 3 deletions

View File

@ -55,3 +55,21 @@ function getSearchText()
{
return(gSearchStr);
}
function doUnload()
{
// Get the current window position/size.
var x = window.screenX;
var y = window.screenY;
var h = window.outerHeight;
var w = window.outerWidth;
// Store these into the window attributes (for persistence).
var win = document.getElementById( "search-window" );
win.setAttribute( "x", x );
win.setAttribute( "y", y );
win.setAttribute( "height", h );
win.setAttribute( "width", w );
}

View File

@ -22,11 +22,12 @@
]>
<window title="&window.title.label;" style="width: 100%; height: 100%" width="500" height="400" align="vertical"
<window id="search-window" title="&window.title.label;"
width="500" height="400" x="20" y="20" persist="width height x y" align="vertical"
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="loadPage(window.arguments[0], window.arguments[1])" >
onload="loadPage(window.arguments[0], window.arguments[1])" onunload="doUnload()" >
<menubar>
<menu value="&menu.file.label;">