Index: browser/base/content/browser-places.js
===================================================================
RCS file: /cvsroot/mozilla/browser/base/content/browser-places.js,v
retrieving revision 1.32
diff -u -8 -p -r1.32 browser-places.js
--- browser/base/content/browser-places.js 27 Mar 2007 00:52:58 -0000 1.32
+++ browser/base/content/browser-places.js 15 May 2007 02:39:21 -0000
@@ -284,30 +284,39 @@ var BookmarksEventHandler = {
* menuitem to the bottom of the popup.
* @param event
* DOMEvent for popupshowing
*/
onPopupShowing: function BM_onPopupShowing(event) {
var target = event.target;
if (target.localName == "menupopup" && target.id != "bookmarksMenuPopup") {
- // Show "Open All in Tabs" menuitem if there are at least
- // two menuitems with places result nodes, and "Open (Feed Name)"
- // if it's a livemark with a siteURI.
+ // Add the "Open All in Tabs" menuitem if there are
+ // at least two menuitems with places result nodes.
+ // Add the "Open (Feed Name)" menuitem if it's a livemark with a siteURI.
var numNodes = 0;
var hasMultipleEntries = false;
var hasFeedHomePage = false;
var currentChild = target.firstChild;
- while (currentChild && numNodes < 2) {
- if (currentChild.node && currentChild.localName == "menuitem")
+ while (currentChild) {
+ if (currentChild.localName == "menuitem" && currentChild.node)
numNodes++;
+
+ // If the menuitem already exists, do nothing.
+ if (currentChild.getAttribute("openInTabs") == "true")
+ return;
+ if (currentChild.hasAttribute("siteURI"))
+ return;
+
currentChild = currentChild.nextSibling;
}
- if (numNodes > 1)
+
+ if (numNodes > 1)
hasMultipleEntries = true;
+
var button = target.parentNode;
if (button.getAttribute("livemark") == "true" &&
button.hasAttribute("siteURI"))
hasFeedHomePage = true;
if (hasMultipleEntries || hasFeedHomePage) {
var separator = document.createElement("menuseparator");
target.appendChild(separator);
Index: browser/components/places/content/menu.xml
===================================================================
RCS file: /cvsroot/mozilla/browser/components/places/content/menu.xml,v
retrieving revision 1.67
diff -u -8 -p -r1.67 menu.xml
--- browser/components/places/content/menu.xml 22 Mar 2007 23:43:56 -0000 1.67
+++ browser/components/places/content/menu.xml 15 May 2007 02:39:21 -0000
@@ -42,741 +42,862 @@
xmlns="http://www.mozilla.org/xbl"
xmlns:xbl="http://www.mozilla.org/xbl"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
Index: browser/components/places/content/toolbar.xml
===================================================================
RCS file: /cvsroot/mozilla/browser/components/places/content/toolbar.xml,v
retrieving revision 1.80
diff -u -8 -p -r1.80 toolbar.xml
--- browser/components/places/content/toolbar.xml 10 May 2007 08:05:21 -0000 1.80
+++ browser/components/places/content/toolbar.xml 15 May 2007 02:39:21 -0000
@@ -106,53 +106,46 @@
PlacesUtils.annotations.removeObserver(this.genericAnnoObserver);
]]>
-
+
-
+
document.getAnonymousElementByAttribute(this, "class", "toolbar-drop-indicator-bar")
document.getAnonymousElementByAttribute(this, "class", "chevron")
null
null
null
-
- null
-
null
@@ -191,17 +184,18 @@
-
+
-
+
- 0
-
-
+