Bug 450668: Add support for livemarks to distribution.ini. r=gavin

This commit is contained in:
Dan Mills
2008-08-25 14:22:33 -07:00
parent 022467ca43
commit 4f7b0158ca

View File

@@ -76,6 +76,14 @@ DistributionCustomizer.prototype = {
return this.__annoSvc;
},
__livemarkSvc: null,
get _livemarkSvc() {
if (!this.__livemarkSvc)
this.__livemarkSvc = Cc["@mozilla.org/browser/livemark-service;2"].
getService(Ci.nsILivemarkService);
return this.__livemarkSvc;
},
__dirSvc: null,
get _dirSvc() {
if (!this.__dirSvc)
@@ -179,6 +187,18 @@ DistributionCustomizer.prototype = {
this._bmSvc.insertSeparator(parentId, index);
break;
case "livemark":
if (iid < defaultItemId)
index = prependIndex++;
newId = this._livemarkSvc.
createLivemark(parentId,
items[iid]["title"],
this._makeURI(items[iid]["siteLink"]),
this._makeURI(items[iid]["feedLink"]),
index);
break;
case "bookmark":
default:
if (iid < defaultItemId)