Bug 329743: fixes dropmarker icon not showing up on places toolbar folders on mac.

Patch by Pam Greene <pamg.bugs@gmail.com>
r=annie.sullivan@gmail.com sr=ben@mozilla.org
This commit is contained in:
annie.sullivan%gmail.com 2006-03-23 16:30:27 +00:00
Родитель 8f244f2740
Коммит 2777b1d20f
11 изменённых файлов: 72 добавлений и 8 удалений

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

@ -47,6 +47,11 @@
<?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
#ifdef MOZ_PLACES
<?xml-stylesheet href="chrome://browser/skin/places/browser-places.css"? type="text/css">
#endif
<?xml-stylesheet href="chrome://global/skin/toolbar.css" type="text/css"?>
<?xml-stylesheet href="chrome://global/skin/findBar.css" type="text/css"?>

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

@ -587,14 +587,27 @@ var PlacesController = {
},
/**
* Determines whether or not a ResultNode is a remotecontainer item or not
* Determines whether or not a ResultNode is a remotecontainer item.
* ResultNote may be either a remote container result type or a bookmark folder
* with a nonempty remoteContainerType. The remote container result node
* type is for dynamically created remote containers (i.e., for the file
* browser service where you get your folders in bookmark menus). Bookmark
* folders are marked as remote containers when some other component is
* registered as interested in them and providing some operations, in which
* case their remoteContainerType indicates which component is thus registered.
* For exmaple, the livemark service uses this mechanism.
* @param node
* A NavHistoryResultNode
* @returns true if the node is a container item, false otherwise
*/
nodeIsRemoteContainer: function PC_nodeIsRemoteContainer(node) {
const NHRN = Ci.nsINavHistoryResultNode;
return node.type == NHRN.RESULT_TYPE_REMOTE_CONTAINER;
const NHRN = Ci.nsINavHistoryResultNode;
if (node.type == NHRN.RESULT_TYPE_REMOTE_CONTAINER)
return true;
if (node.type == NHRN.RESULT_TYPE_FOLDER)
return asContainer(node).remoteContainerType != "";
return false;
},
/**

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

@ -36,7 +36,7 @@
#ifndef XP_MACOSX
context="placesContext"
#endif
/>
/>
</xul:toolbarbutton>
</xul:hbox>
<xul:toolbarbutton class="bookmark-item bookmarks-toolbar-customize"
@ -125,6 +125,11 @@
button = document.createElementNS(XULNS, "toolbarbutton");
button.setAttribute("type", "menu");
button.setAttribute("container", "true");
if (PlacesController.nodeIsRemoteContainer(child)) {
if (asContainer(child).remoteContainerType == "@mozilla.org/browser/livemark-service;1") {
button.setAttribute("livemark", "true");
}
}
var popup = document.createElementNS(XULNS, "menupopup");
popup.setAttribute("type", "places");
// This is set here and not in the XBL constructor for the menu because

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

@ -249,10 +249,11 @@ interface nsINavHistoryContainerResultNode : nsINavHistoryResultNode
/**
* This is a string representing the remote container API service that is
* responsible for this container. It is empty if there is none. This can
* be set for bookmark folders which have been registered, and also for
* RESULT_TYPE_REMOTE_CONTAINER nodes which have been dynamically generated
* by the remote container API.
* responsible for this container. It is empty if there is none. The
* container may be a RESULT_TYPE_REMOTE_CONTAINER node that has been
* dynamically generated by the remote container API. It may also be a
* bookmark folder (RESULT_TYPE_FOLDER) for which some service (such as
* livemarks) has registered to provide certain operations.
*/
readonly attribute AUTF8String remoteContainerType;

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

@ -151,6 +151,8 @@ toolbarbutton.bookmark-item .toolbarbutton-text {
padding-top: 1px;
}
/* Image locations for these toolbar icons are overridden in places/browser-places.css in Places-enabled builds.
Those styles can be merged into these once the pre-Places bookmark system is no longer needed. */
.bookmark-item > .toolbarbutton-menu-dropmarker {
list-style-image: url("chrome://browser/skin/bookmarks/folderarrow.png");
height: 16px !important;

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

@ -31,6 +31,7 @@ classic.jar:
skin/classic/browser/Toolbar.png
#ifdef MOZ_PLACES
skin/classic/browser/places/places.css (places/places.css)
skin/classic/browser/places/browser-places.css (places/browser-places.css)
skin/classic/browser/places/defaultFavicon.png (places/defaultFavicon.png)
skin/classic/browser/places/query.png (places/query.png)
skin/classic/browser/places/bookmarksMenu.png (places/bookmarksMenu.png)
@ -39,6 +40,10 @@ classic.jar:
skin/classic/browser/places/placesIcon.png (places/placesIcon.png)
skin/classic/browser/places/toolbarDropMarker.png (places/toolbarDropMarker.png)
skin/classic/browser/places/folderDragOver.png (places/folderDragOver.png)
skin/classic/browser/places/folderDropArrow.png (places/folderDropArrow.png)
skin/classic/browser/places/folderDropHoverArrow.png (places/folderDropHoverArrow.png)
skin/classic/browser/places/livemarkFolder.png (places/livemarkFolder.png)
skin/classic/browser/places/livemarkFolderHover.png (places/livemarkFolderHover.png)
skin/classic/browser/places/bookmarkProperties.css (places/bookmarkProperties.css)
#else
skin/classic/browser/bookmarks/addBookmark.css (bookmarks/addBookmark.css)

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

@ -0,0 +1,33 @@
/* Tell the bookmarks toolbar where to find the new icons.
These settings complement and override settings in browser.css.
They should be merged into chrome://browser/skin/browser.css
when the pre-Places bookmark system is no longer needed. */
.bookmark-item > .toolbarbutton-menu-dropmarker {
list-style-image: url("chrome://browser/skin/places/folderDropArrow.png") !important;
}
.bookmark-item:hover > .toolbarbutton-menu-dropmarker, .bookmark-item[open] > .toolbarbutton-menu-dropmarker {
list-style-image: url("chrome://browser/skin/places/folderDropHoverArrow.png") !important;
}
.bookmark-item[livemark] > .toolbarbutton-menu-dropmarker {
list-style-image: url("chrome://browser/skin/places/livemarkFolder.png") !important;
}
.bookmark-item[livemark]:hover > .toolbarbutton-menu-dropmarker, .bookmark-item[livemark][open] > .toolbarbutton-menu-dropmarker {
list-style-image: url("chrome://browser/skin/places/livemarkFolderHover.png") !important;
}
.bookmark-item[livemark] .menuitem-iconic {
list-style-image: url("chrome://browser/skin/places/livemarkItem.png") !important;
}
#page-proxy-button {
list-style-image: url("chrome://browser/skin/places/defaultFavicon.png") !important;
}
.bookmark-item {
list-style-image: url("chrome://browser/skin/places/defaultFavicon.png") !important;
}

Двоичные данные
browser/themes/pinstripe/browser/places/folderDropArrow.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 220 B

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

Двоичные данные
browser/themes/pinstripe/browser/places/livemarkFolder.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 288 B

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