This commit is contained in:
chanial%noos.fr 2003-04-23 15:05:10 +00:00
Родитель 3f7db604b7
Коммит 352cc766af
11 изменённых файлов: 12 добавлений и 123 удалений

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

@ -33,7 +33,6 @@ classic.jar:
skin/classic/browser/Throbber.png (skin/Throbber.png)
skin/classic/browser/Toolbar-small.png (skin/Toolbar-small.png)
skin/classic/browser/Toolbar.png (skin/Toolbar.png)
skin/classic/browser/bookmarks-menuicons.png (skin/bookmarks-menuicons.png)
skin/classic/browser/lock-insecure.gif (skin/lock-insecure.gif)
skin/classic/browser/lock-mixed.gif (skin/lock-mixed.gif)

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

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

@ -144,15 +144,6 @@ menuitem.bookmark-item {
-moz-image-region: rect(16px, 32px, 32px, 16px) !important;
}
.groupmark-item {
width: 16px;
height: 16px;
margin: 0px 2px;
padding: 1px 3px 1px 2px;
list-style-image: url("chrome://browser/skin/bookmarks-menuicons.png") !important;
-moz-image-region: rect(0px 16px 16px 0px);
}
/* ::::: primary toolbar buttons ::::: */
.toolbarbutton-1 {

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

@ -290,13 +290,6 @@ var BookmarksCommand = {
"bm_delete", "bm_separator",
"bm_properties"];
break;
case "FolderGroup":
commands = ["bm_open", "bm_expandfolder", "bm_separator",
"bm_newfolder", "bm_separator",
"bm_cut", "bm_copy", "bm_paste", "bm_separator",
"bm_delete", "bm_separator",
"bm_properties"];
break;
case "PersonalToolbarFolder":
commands = ["bm_newfolder", "bm_separator",
"bm_cut", "bm_copy", "bm_paste", "bm_separator",
@ -526,7 +519,7 @@ var BookmarksCommand = {
}
else if (type == "Bookmark" || type == "")
this.openOneBookmark(aSelection.item[i].Value, aTargetBrowser, aDS);
else if (type == "FolderGroup" || type == "Folder" || type == "PersonalToolbarFolder")
else if (type == "Folder" || type == "PersonalToolbarFolder")
this.openGroupBookmark(aSelection.item[i].Value, aTargetBrowser);
}
},
@ -1087,18 +1080,10 @@ var BookmarksUtils = {
if (type == "Folder") {
if (this.isPersonalToolbarFolder(aResource))
type = "PersonalToolbarFolder";
else if (this.isFolderGroup(aResource))
type = "FolderGroup";
}
return type;
},
/////////////////////////////////////////////////////////////////////////////
// Returns true if aResource is a folder group
isFolderGroup: function (aResource) {
return this.getProperty(aResource, NC_NS+"FolderGroup") == "true";
},
/////////////////////////////////////////////////////////////////////////////
// Returns true if aResource is the Personal Toolbar Folder
isPersonalToolbarFolder: function (aResource) {
@ -1151,15 +1136,12 @@ var BookmarksUtils = {
/////////////////////////////////////////////////////////////////////////////
// Returns a cloned folder a aFolder (with a different uri). folderType and
// other properties are recursively dropped except the 'folder group' one.
// other properties are recursively dropped
cloneFolder: function (aFolder)
{
var rName = this.getProperty(aFolder, NC_NS+"Name");
var newFolder;
if (this.isFolderGroup(aFolder))
newFolder = BMSVC.createGroup(rName);
else
newFolder = BMSVC.createFolder(rName);
newFolder = BMSVC.createFolder(rName);
// Now need to append kiddies.
try {
@ -1206,8 +1188,7 @@ var BookmarksUtils = {
if (item == "NC:BookmarksRoot")
isImmutable = true;
else if (type != "Bookmark" && type != "BookmarkSeparator" &&
type != "Folder" && type != "FolderGroup" &&
type != "PersonalToolbarFolder")
type != "Folder" && type != "PersonalToolbarFolder")
isImmutable = true;
else if (parent) {
var parentProtocol = parent.Value.split(":")[0];
@ -1287,19 +1268,13 @@ var BookmarksUtils = {
// don't insert items in an invalid container
// 'file:' and 'find:' items have a 'Bookmark' type
var type = BookmarksUtils.resolveType(aFolder);
if (type != "Folder" && type != "FolderGroup" && type != "PersonalToolbarFolder")
if (type != "Folder" && type != "PersonalToolbarFolder")
return false;
// bail if we just check the container
if (!aSelection)
return true;
// don't insert folders in a group folder except for 'file:' pseudo folders
if (type == "FolderGroup")
for (var i=0; i<aSelection.length; ++i)
if (aSelection.isContainer[i] && aSelection.protocol[i] != "file")
return false;
// check that the selected folder is not the selected item nor its child
if (this.isContainerChildOrSelf(aFolder, aSelection))
return false;

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

@ -51,7 +51,6 @@ var BookmarksMenu = {
element = document.createElementNS(XUL_NS, "menuitem");
element.setAttribute("id", "openintabs-menuitem")
element.setAttribute("label", BookmarksUtils.getLocaleString("cmd_bm_openfolder"));
//element.setAttribute("class", "groupmark-item menuitem-iconic bookmark-item");
element.setAttribute("accesskey", BookmarksUtils.getLocaleString("cmd_bm_openfolder_accesskey"));
element.setAttribute("oncommand", "BookmarksMenu.loadBookmark(event,event.target.parentNode.parentNode,this.database)");
aTarget.appendChild(element);
@ -77,8 +76,7 @@ var BookmarksMenu = {
{
var rParent = RDF.GetResource(aTarget.parentNode.id)
var type = BookmarksUtils.resolveType(rParent);
if (type != "Folder" && type != "FolderGroup" &&
type != "PersonalToolbarFolder")
if (type != "Folder" && type != "PersonalToolbarFolder")
return false;
var count = 0;
if (!aTarget.hasChildNodes())
@ -222,7 +220,6 @@ var BookmarksMenu = {
return (type == "BookmarkSeparator" ||
type == "Bookmark" ||
type == "Folder" ||
type == "FolderGroup" ||
type == "PersonalToolbarFolder" ||
aURI == "bookmarks-ptf")
},
@ -232,7 +229,7 @@ var BookmarksMenu = {
isBTContainer: function (aTarget)
{
return aTarget.localName == "menu" || (aTarget.localName == "toolbarbutton" &&
(aTarget.getAttribute("container") == "true" || aTarget.getAttribute("group") == "true"));
(aTarget.getAttribute("container") == "true"));
},
/////////////////////////////////////////////////////////////////////////
@ -419,8 +416,7 @@ var BookmarksMenuDNDObserver = {
// a drag start is fired when leaving an open toolbarbutton(type=menu)
// (see bug 143031)
if (this.isContainer(target) &&
target.getAttribute("group") != "true") {
if (this.isContainer(target)) {
if (this.isPlatformNotSupported)
return;
if (!aEvent.shiftKey && !aEvent.altKey && !aEvent.ctrlKey)
@ -616,8 +612,7 @@ var BookmarksMenuDNDObserver = {
return;
// Load the current menu
if (this.mCurrentDropPosition == BookmarksUtils.DROP_ON &&
this.isContainer(aTarget) &&
aTarget.getAttribute("group") != "true")
this.isContainer(aTarget))
aTarget.lastChild.showPopup(aTarget);
},

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

@ -521,7 +521,7 @@
}
var selection = this._selection;
if (selection.type[0] != "FolderGroup" && selection.isContainer[0]) {
if (selection.isContainer[0]) {
if (this.clickCount == 1 && !modifKey) {
this.treeBoxObject.view.toggleOpenState(row);
if (selection.protocol[0] != "file")
@ -835,21 +835,6 @@
</treeitem>
</treechildren>
</rule>
<rule nc:FolderGroup="true">
<treechildren>
<treeitem uri="rdf:*">
<treerow properties="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type rdf:http://home.netscape.com/NC-rdf#loading rdf:http://home.netscape.com/WEB-rdf#status">
<treecell properties="group" label="rdf:http://home.netscape.com/NC-rdf#Name" />
<treecell label="rdf:http://home.netscape.com/NC-rdf#URL" />
<treecell label="rdf:http://home.netscape.com/NC-rdf#ShortcutURL" />
<treecell label="rdf:http://home.netscape.com/NC-rdf#Description" />
<treecell label="rdf:http://home.netscape.com/NC-rdf#BookmarkAddDate" />
<treecell label="rdf:http://home.netscape.com/WEB-rdf#LastModifiedDate" />
<treecell label="rdf:http://home.netscape.com/WEB-rdf#LastVisitDate"/>
</treerow>
</treeitem>
</treechildren>
</rule>
<rule>
<treechildren>
<treeitem uri="rdf:*">
@ -945,15 +930,6 @@
</treeitem>
</treechildren>
</rule>
<rule nc:FolderGroup="true">
<treechildren>
<treeitem uri="rdf:*">
<treerow properties="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type rdf:http://home.netscape.com/NC-rdf#loading rdf:http://home.netscape.com/WEB-rdf#status">
<treecell properties="group hidetwisty" label="rdf:http://home.netscape.com/NC-rdf#Name" />
</treerow>
</treeitem>
</treechildren>
</rule>
<rule>
<treechildren>
<treeitem uri="rdf:*">

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

@ -65,8 +65,7 @@ function updateOK()
url = BookmarksUtils.getProperty(selection.item[i], NC_NS+"URL", ds)
if (url)
gUrls.push(url);
} else if (type == "Folder" || type == "PersonalToolbarFolder" ||
type == "FolderGroup") {
} else if (type == "Folder" || type == "PersonalToolbarFolder") {
RDFC.Init(ds, selection.item[i]);
var children = RDFC.GetElements();
while (children.hasMoreElements()) {

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

@ -20,7 +20,6 @@
description_Bookmark = %brandShortName% can remember web page locations for you. Type the page name and location in the fields below, then click OK. Select the page from the Bookmarks menu or your Bookmarks Sidebar tab to visit the page.
description_Folder = %brandShortName% can organize your bookmarks into specific folders. Type the folder name and an optional comment below, then click OK.
description_FolderGroup = %brandShortName% can bookmark a group of web pages. Type a group name and an optional comment in the field below, then click OK. Select the group from the Bookmark menu or your Bookmarks Sidebar tab to open each page in a separate Navigator tab.
description_PersonalToolbarFolder = Folders and bookmarks in this folder appear on the Bookmarks Toolbar.
description_BookmarkSeparator = %brandShortName% can organize your bookmarks by putting separators between them. Type an optional separator name below, then click OK.
description_NewBookmarkFolder = Newly created bookmarks will be stored here by default.

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

@ -61,10 +61,6 @@ interface nsIBookmarksService : nsISupports
nsIRDFResource createFolderInContainer(in wstring aName, in nsIRDFResource aParentFolder,
in long aIndex);
nsIRDFResource createGroup(in wstring aName);
nsIRDFResource createGroupInContainer(in wstring aName, in nsIRDFResource aParentFolder,
in long aIndex);
nsIRDFResource createBookmark(in wstring aName,
in string aURL,
in wstring aShortcutURL,

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

@ -100,7 +100,6 @@ nsIRDFResource *kNC_BookmarksRoot;
nsIRDFResource *kNC_Description;
nsIRDFResource *kNC_Folder;
nsIRDFResource *kNC_FolderType;
nsIRDFResource *kNC_FolderGroup;
nsIRDFResource *kNC_IEFavorite;
nsIRDFResource *kNC_IEFavoriteFolder;
nsIRDFResource *kNC_Name;
@ -236,8 +235,6 @@ bm_AddRefGlobals()
&kNC_Folder);
gRDF->GetResource(NS_LITERAL_CSTRING(NC_NAMESPACE_URI "FolderType"),
&kNC_FolderType);
gRDF->GetResource(NS_LITERAL_CSTRING(NC_NAMESPACE_URI "FolderGroup"),
&kNC_FolderGroup);
gRDF->GetResource(NS_LITERAL_CSTRING(NC_NAMESPACE_URI "IEFavorite"),
&kNC_IEFavorite);
gRDF->GetResource(NS_LITERAL_CSTRING(NC_NAMESPACE_URI "IEFavoriteFolder"),
@ -342,7 +339,6 @@ bm_ReleaseGlobals()
NS_IF_RELEASE(kNC_Description);
NS_IF_RELEASE(kNC_Folder);
NS_IF_RELEASE(kNC_FolderType);
NS_IF_RELEASE(kNC_FolderGroup);
NS_IF_RELEASE(kNC_IEFavorite);
NS_IF_RELEASE(kNC_IEFavoriteFolder);
NS_IF_RELEASE(kNC_IEFavoritesRoot);
@ -583,7 +579,6 @@ static const char kNameEquals[] = "NAME=\"";
static const char kHREFEquals[] = "HREF=\"";
static const char kTargetEquals[] = "TARGET=\"";
static const char kAddDateEquals[] = "ADD_DATE=\"";
static const char kFolderGroupEquals[] = "FOLDER_GROUP=\"";
static const char kLastVisitEquals[] = "LAST_VISIT=\"";
static const char kLastModifiedEquals[] = "LAST_MODIFIED=\"";
static const char kLastCharsetEquals[] = "LAST_CHARSET=\"";
@ -1107,8 +1102,7 @@ BookmarkParser::gBookmarkHeaderFieldTable[] =
{ kIDEquals, NC_NAMESPACE_URI "ID", nsnull, BookmarkParser::ParseResource, nsnull },
{ kAddDateEquals, NC_NAMESPACE_URI "BookmarkAddDate", nsnull, BookmarkParser::ParseDate, nsnull },
{ kLastModifiedEquals, WEB_NAMESPACE_URI "LastModifiedDate", nsnull, BookmarkParser::ParseDate, nsnull },
{ kFolderGroupEquals, NC_NAMESPACE_URI "FolderGroup", nsnull, BookmarkParser::ParseLiteral, nsnull },
// Note: these last three are specially handled
// Note: these last two are specially handled
{ kNewBookmarkFolderEquals, kURINC_NewBookmarkFolder, nsnull, BookmarkParser::ParseLiteral, nsnull },
{ kNewSearchFolderEquals, kURINC_NewSearchFolder, nsnull, BookmarkParser::ParseLiteral, nsnull },
{ kPersonalToolbarFolderEquals, kURINC_PersonalToolbarFolder, nsnull, BookmarkParser::ParseLiteral, nsnull },
@ -2655,28 +2649,6 @@ nsBookmarksService::CreateFolderInContainer(const PRUnichar* aName,
return rv;
}
NS_IMETHODIMP
nsBookmarksService::CreateGroup(const PRUnichar* aName,
nsIRDFResource** aResult)
{
nsresult rv;
rv = CreateFolderInContainer(aName, nsnull, nsnull, aResult);
if (NS_SUCCEEDED(rv))
rv = mInner->Assert(*aResult, kNC_FolderGroup, kTrueLiteral, PR_TRUE);
return rv;
}
NS_IMETHODIMP
nsBookmarksService::CreateGroupInContainer(const PRUnichar* aName,
nsIRDFResource* aParentFolder, PRInt32 aIndex,
nsIRDFResource** aResult)
{
nsresult rv = CreateGroup(aName, aResult);
if (NS_SUCCEEDED(rv))
rv = InsertResource(*aResult, aParentFolder, aIndex);
return rv;
}
NS_IMETHODIMP
nsBookmarksService::CreateBookmark(const PRUnichar* aName,
const char* aURL,
@ -5169,15 +5141,6 @@ nsBookmarksService::WriteBookmarksContainer(nsIRDFDataSource *ds,
if (NS_FAILED(rv)) break;
}
if (NS_SUCCEEDED(rv = mInner->HasArcOut(child, kNC_FolderGroup, &hasType)) &&
(hasType == PR_TRUE))
{
rv = strm->Write(kSpace, sizeof(kSpace)-1, &dummy);
rv |= strm->Write(kFolderGroupEquals, sizeof(kFolderGroupEquals)-1, &dummy);
rv |= strm->Write(kTrueEnd, sizeof(kTrueEnd)-1, &dummy);
if (NS_FAILED(rv)) break;
}
// output ID
const char *id = nsnull;
rv = child->GetValueConst(&id);

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

@ -278,10 +278,6 @@ treechildren:-moz-tree-image(Name, open) {
-moz-image-region: rect(16px, 32px, 32px, 16px);
}
treechildren:-moz-tree-twisty(group, hidetwisty) {
list-style-image: none;
}
treechildren:-moz-tree-image(Name, separator) {
list-style-image: none;
width: 0px !important;