mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
Persist the search window's x, y, width & height attributes.
This commit is contained in:
parent
e283df1a25
commit
22f38a062e
@ -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 );
|
||||
}
|
||||
|
@ -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;">
|
||||
|
Loading…
Reference in New Issue
Block a user