From 42e8ddcb3497f2c8f62b326fc785963e244e5db4 Mon Sep 17 00:00:00 2001 From: "ben%netscape.com" Date: Sat, 19 May 2001 03:33:21 +0000 Subject: [PATCH] Forgot to make history window set its windowtype to history:searchresults when the window is opened in search mode. r=matt, sr=blake git-svn-id: svn://10.0.0.236/trunk@95506 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpfe/components/history/resources/history.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/mozilla/xpfe/components/history/resources/history.js b/mozilla/xpfe/components/history/resources/history.js index 081e7a27be0..e9d54320961 100644 --- a/mozilla/xpfe/components/history/resources/history.js +++ b/mozilla/xpfe/components/history/resources/history.js @@ -53,9 +53,16 @@ function HistoryInit() { gGlobalHistory = Components.classes["@mozilla.org/browser/global-history;1"].getService(Components.interfaces.nsIBrowserHistory); - if ("arguments" in window && window.arguments && window.arguments.length >= 1) { + if ("arguments" in window && window.arguments[0] && window.arguments.length >= 1) { // We have been supplied a resource URI to root the tree on - setRoot(window.arguments[0]); + var uri = window.arguments[0]; + setRoot(uri); + if (uri.substring(0,5) == "find:") { + // Update the windowtype so that future searches are directed + // there and the window is not re-used for bookmarks. + var windowNode = document.getElementById("history-window"); + windowNode.setAttribute("windowtype", "history:searchresults"); + } } var children = document.getElementById('treechildren-bookmarks');