зеркало из https://github.com/mozilla/pjs.git
Bug 393924 - Stop setting the bookmarkFeedURI annotation on livemark children. r=sspitzer.
This commit is contained in:
Родитель
6cec7f3c6a
Коммит
1aabd5577f
|
@ -445,6 +445,7 @@ PlacesController.prototype = {
|
|||
* rules:
|
||||
* "link" node is a URI
|
||||
* "bookmark" node is a bookamrk
|
||||
* "livemarkChild" node is a child of a livemark
|
||||
* "folder" node is a folder
|
||||
* "query" node is a query
|
||||
* "dynamiccontainer" node is a dynamic container
|
||||
|
@ -506,6 +507,9 @@ PlacesController.prototype = {
|
|||
var mss = PlacesUtils.microsummaries;
|
||||
if (mss.hasMicrosummary(node.itemId))
|
||||
nodeData["microsummary"] = true;
|
||||
else if (node.parent &&
|
||||
PlacesUtils.nodeIsLivemarkContainer(node.parent))
|
||||
nodeData["livemarkChild"] = true;
|
||||
}
|
||||
break;
|
||||
case Ci.nsINavHistoryResultNode.RESULT_TYPE_DAY:
|
||||
|
|
|
@ -155,7 +155,7 @@
|
|||
label="&cutCmd.label;"
|
||||
accesskey="&cutCmd.accesskey;"
|
||||
selection="separator|link|folder|mixed"
|
||||
forcehideselection="livemark/bookmarkFeedURI"/>
|
||||
forcehideselection="livemarkChild"/>
|
||||
<menuitem id="placesContext_copy"
|
||||
command="cmd_copy"
|
||||
label="©Cmd.label;"
|
||||
|
@ -172,7 +172,7 @@
|
|||
label="&deleteCmd.label;"
|
||||
accesskey="&deleteCmd.accesskey;"
|
||||
selection="host|separator|link|folder|day"
|
||||
forcehideselection="livemark/bookmarkFeedURI"/>
|
||||
forcehideselection="livemarkChild"/>
|
||||
<menuseparator id="placesContext_deleteSeparator"/>
|
||||
<menuitem id="placesContext_reload"
|
||||
command="placesCmd_reload"
|
||||
|
@ -195,7 +195,7 @@
|
|||
label="&cmd.properties.label;"
|
||||
accesskey="&cmd.properties.accesskey;"
|
||||
selection="bookmark|folder"
|
||||
forcehideselection="livemark/bookmarkFeedURI"/>
|
||||
forcehideselection="livemarkChild"/>
|
||||
</popup>
|
||||
|
||||
</overlay>
|
||||
|
|
|
@ -390,10 +390,10 @@ var PlacesUtils = {
|
|||
},
|
||||
|
||||
/**
|
||||
* Determines whether a ResultNode is a remote container registered by the
|
||||
* Determines whether a result node is a remote container registered by the
|
||||
* livemark service.
|
||||
* @param aNode
|
||||
* A NavHistory Result Node
|
||||
* A result Node
|
||||
* @returns true if the node is a livemark container item
|
||||
*/
|
||||
nodeIsLivemarkContainer: function PU_nodeIsLivemarkContainer(aNode) {
|
||||
|
@ -402,19 +402,13 @@ var PlacesUtils = {
|
|||
},
|
||||
|
||||
/**
|
||||
* Determines whether a ResultNode is a live-bookmark item
|
||||
* Determines whether a result node is a live-bookmark item
|
||||
* @param aNode
|
||||
* A NavHistory Result Node
|
||||
* A result node
|
||||
* @returns true if the node is a livemark container item
|
||||
*/
|
||||
nodeIsLivemarkItem: function PU_nodeIsLivemarkItem(aNode) {
|
||||
if (this.nodeIsBookmark(aNode)) {
|
||||
if (this.annotations
|
||||
.itemHasAnnotation(aNode.itemId, "livemark/bookmarkFeedURI"))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return aNode.parent && this.nodeIsLivemarkContainer(aNode.parent);
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -66,7 +66,6 @@ const DEFAULT_FAIL_MSG = "Live Bookmark feed failed to load.";
|
|||
const LMANNO_FEEDURI = "livemark/feedURI";
|
||||
const LMANNO_SITEURI = "livemark/siteURI";
|
||||
const LMANNO_EXPIRATION = "livemark/expiration";
|
||||
const LMANNO_BMANNO = "livemark/bookmarkFeedURI";
|
||||
|
||||
const PS_CONTRACTID = "@mozilla.org/preferences-service;1";
|
||||
const NH_CONTRACTID = "@mozilla.org/browser/nav-history-service;1";
|
||||
|
@ -551,8 +550,6 @@ LivemarkLoadListener.prototype = {
|
|||
function LS_insertLivemarkChild(folderId, uri, title) {
|
||||
var id = this._bms.insertBookmark(folderId, uri, this._bms.DEFAULT_INDEX,
|
||||
title);
|
||||
this._ans.setItemAnnotation(id, LMANNO_BMANNO, uri.spec, 0,
|
||||
this._ans.EXPIRE_NEVER);
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -49,7 +49,6 @@ _HTTP_FILES = \
|
|||
$(NULL)
|
||||
|
||||
_CHROME_FILES = \
|
||||
test_add_livemark.xul \
|
||||
test_371798.xul \
|
||||
$(NULL)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче