extensions.treestyletab.autoAttachSearchResultAsChildren was ignored if it is 2 and shouldOpenSearchResultAsChild is called with no argument.

This commit is contained in:
SHIMODA Hiroshi 2011-01-06 11:15:56 +09:00
parent 145e164fa2
commit f3915ced9f

View File

@ -146,11 +146,12 @@ var TreeStyleTabService = {
shouldOpenSearchResultAsChild : function TSTService_shouldOpenSearchResultAsChild(aTerm) shouldOpenSearchResultAsChild : function TSTService_shouldOpenSearchResultAsChild(aTerm)
{ {
var mode = this.getTreePref('autoAttachSearchResultAsChildren'); var mode = this.getTreePref('autoAttachSearchResultAsChildren');
if (mode == this.kSEARCH_RESULT_ATTACH_ALWAYS) if (mode == this.kSEARCH_RESULT_ATTACH_ALWAYS) {
return true; return true;
}
if (!aTerm || mode == this.kSEARCH_RESULT_DO_NOT_ATTACH) else if (!aTerm || mode == this.kSEARCH_RESULT_DO_NOT_ATTACH) {
return false; return false;
}
var w = document.commandDispatcher.focusedWindow; var w = document.commandDispatcher.focusedWindow;
if (!w || w.top != this.browser.contentWindow) if (!w || w.top != this.browser.contentWindow)