Fix for 106326 - better handling of IE favorites. Adding support for one-time import of

IE favorites in addition to dynamic root which is now off by default.
Also update the nsIBookmarkService API to support IDL naming conventions, and enhance API
with utility methods requested and required by clients.
r=rjc, sr=hyatt
This commit is contained in:
ben%netscape.com 2007-05-05 04:35:27 +00:00
Родитель 09c9ce7e9d
Коммит 21bbb0c3ab
3 изменённых файлов: 15 добавлений и 2 удалений

Просмотреть файл

@ -234,7 +234,7 @@ function onOK()
catch (e) {
}
kBMS.AddBookmarkToFolder(url, rFolder, gFld_Name.value, gBookmarkCharset);
kBMS.createBookmarkEx(gFld_Name.value, url, gBookmarkCharset, rFolder, -1);
}
}

Просмотреть файл

@ -24,6 +24,7 @@
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/sidebar/sidebarListView.css" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/bookmarks/bookmarksWindow.css" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/content/bookmarks/bookmarks.css" type="text/css"?>

Просмотреть файл

@ -97,4 +97,16 @@ function sendBookmarksLink()
{
var outliner = document.getElementById("bookmarks-view");
outliner.sendLink();
}
}
function importIEFavorites()
{
var bookmarksView = document.getElementById("bookmarks-view");
var RDFS = bookmarksView.rdf;
var BMDS = bookmarksView.bookmarksDS;
var BMSvc = BMDS.QueryInterface(Components.interfaces.nsIBookmarksService);
var favFolder = BMSvc.createFolder("Imported IE Favorites", RDFS.GetResource("NC:BookmarksRoot"));
BMSvc.importSystemBookmarks(favFolder)
}