Minefield 3.7a4preにおいて、一度も展開していないブックマークフォルダの内容をタブで開けない問題を修正( http://piro.sakura.ne.jp/cgi-bin/bbs.cgi?2663

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@6582 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2010-04-07 13:48:25 +00:00
parent 35004c6408
commit cd0b4b3594

View File

@ -166,10 +166,12 @@ var TreeStyleTabBookmarksService = {
if ('getContainerNodeWithOptions' in PlacesUtils) { // Firefox 3.5 or later if ('getContainerNodeWithOptions' in PlacesUtils) { // Firefox 3.5 or later
root = PlacesUtils.getContainerNodeWithOptions(root, false, true); root = PlacesUtils.getContainerNodeWithOptions(root, false, true);
} }
root = root.QueryInterface(Components.interfaces.nsINavHistoryContainerResultNode);
var oldViewer = root.parentResult.viewer; var oldViewer = root.parentResult.viewer;
var wasOpen = root.containerOpen; var wasOpen = root.containerOpen;
if (!wasOpen) { if (!wasOpen) {
root.parentResult.viewer = null; if (oldViewer)
root.parentResult.viewer = null;
root.containerOpen = true; root.containerOpen = true;
} }
for (let i = 0, maxi = root.childCount; i < maxi; ++i) for (let i = 0, maxi = root.childCount; i < maxi; ++i)
@ -179,7 +181,8 @@ var TreeStyleTabBookmarksService = {
} }
if (!wasOpen) { if (!wasOpen) {
root.containerOpen = false; root.containerOpen = false;
root.parentResult.viewer = oldViewer; if (oldViewer)
root.parentResult.viewer = oldViewer;
} }
return ids; return ids;
}, },