Remove "Delete this page" and "Forget about this site" from livemarks.

These context menu entries should not be present on live bookmarks
because they make no sense for feed entries.
This resolves #663.
This commit is contained in:
janekptacijarabaci 2019-08-12 23:41:30 +02:00 committed by Roy Tam
commit fe68fd519c
4 changed files with 14 additions and 6 deletions

View file

@ -461,7 +461,11 @@ PlacesController.prototype = {
if (parentNode) {
if (PlacesUtils.nodeIsTagQuery(parentNode))
nodeData["tagChild"] = true;
else if (this.hasCachedLivemarkInfo(parentNode))
}
} else {
var parentNode = node.parent;
if (parentNode) {
if (this.hasCachedLivemarkInfo(parentNode))
nodeData["livemarkChild"] = true;
}
}

View file

@ -198,7 +198,7 @@
accesskey="&cmd.delete.accesskey;"
closemenu="single"
selection="link"
forcehideselection="bookmark"/>
forcehideselection="bookmark|livemarkChild"/>
<menuitem id="placesContext_deleteHost"
command="placesCmd_deleteDataHost"
label="&cmd.deleteDomainData.label;"
@ -207,7 +207,7 @@
selection="link|host"
selectiontype="single"
hideifprivatebrowsing="true"
forcehideselection="bookmark"/>
forcehideselection="bookmark|livemarkChild"/>
<menuseparator id="placesContext_deleteSeparator"/>
<menuitem id="placesContext_sortBy:name"
command="placesCmd_sortBy:name"

View file

@ -444,7 +444,11 @@ PlacesController.prototype = {
if (parentNode) {
if (PlacesUtils.nodeIsTagQuery(parentNode))
nodeData["tagChild"] = true;
else if (this.hasCachedLivemarkInfo(parentNode))
}
} else {
var parentNode = node.parent;
if (parentNode) {
if (this.hasCachedLivemarkInfo(parentNode))
nodeData["livemarkChild"] = true;
}
}

View file

@ -203,7 +203,7 @@
accesskey="&cmd.delete.accesskey;"
closemenu="single"
selection="link"
forcehideselection="bookmark"/>
forcehideselection="bookmark|livemarkChild"/>
<menuitem id="placesContext_deleteHost"
command="placesCmd_deleteDataHost"
label="&cmd.deleteDomainData.label;"
@ -212,7 +212,7 @@
selection="link|host"
selectiontype="single"
hideifprivatebrowsing="true"
forcehideselection="bookmark"/>
forcehideselection="bookmark|livemarkChild"/>
<menuseparator id="placesContext_deleteSeparator"/>
<menuitem id="placesContext_reload"
command="placesCmd_reload"