home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.swcp.com
/
ftp.swcp.com.zip
/
ftp.swcp.com
/
mac
/
mozilla-macos9-1.3.1.sea.bin
/
Mozilla1.3.1
/
Chrome
/
comm.jar
/
content
/
communicator
/
bookmarks
/
pref-bookmarks.xul
< prev
Wrap
Extensible Markup Language
|
2003-06-08
|
5KB
|
117 lines
<?xml version="1.0"?>
<!--
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
Contributor(s):
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE page [
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
%brandDTD;
<!ENTITY % prefBookmarkDTD SYSTEM "chrome://communicator/locale/bookmarks/pref-bookmarks.dtd">
%prefBookmarkDTD;
]>
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="parent.initPanel('chrome://communicator/content/bookmarks/pref-bookmarks.xul');"
headertitle="&lHeader;">
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["enableAutoFile", "showExtendedData"];
var gCreateInFolder = "NC:NewBookmarkFolder";
function Startup ()
{
const kDisplay = document.getElementById("defaultFolder");
const kRDFSvcContractID = "@mozilla.org/rdf/rdf-service;1";
const kRDFSvcIID = Components.interfaces.nsIRDFService;
const kRDFSvc = Components.classes[kRDFSvcContractID].getService(kRDFSvcIID);
const kBMDS = kRDFSvc.GetDataSource("rdf:bookmarks");
const krDefaultFolder = kRDFSvc.GetResource("NC:NewBookmarkFolder");
const krType = kRDFSvc.GetResource("http://www.w3.org/1999/02/22-rdf-syntax-ns#type");
const krFolder = kRDFSvc.GetResource("http://home.netscape.com/NC-rdf#Folder");
const isFolder = kBMDS.HasAssertion(krDefaultFolder, krType, krFolder, true);
const krNameArc = kRDFSvc.GetResource("http://home.netscape.com/NC-rdf#Name");
if (!isFolder) {
const krRoot = kRDFSvc.GetResource("NC:BookmarksRoot");
gCreateInFolder = "NC:BookmarksRoot";
}
var rName = kBMDS.GetTarget(isFolder ? krDefaultFolder : krRoot, krNameArc, true);
rName = rName.QueryInterface(Components.interfaces.nsIRDFLiteral);
kDisplay.value = rName.Value;
}
function chooseDefaultFolder ()
{
var rv = { selectedFolder: null };
openDialog("chrome://communicator/content/bookmarks/addBookmark.xul", "",
"centerscreen,chrome,dialog=no,resizable=no",
null, null, gCreateInFolder, null, "selectFolder", rv);
if (rv && rv.selectedFolder) {
const kRDFSvcContractID = "@mozilla.org/rdf/rdf-service;1";
const kRDFSvcIID = Components.interfaces.nsIRDFService;
const kRDFSvc = Components.classes[kRDFSvcContractID].getService(kRDFSvcIID);
const kBMDS = kRDFSvc.GetDataSource("rdf:bookmarks");
const krDefaultFolder = kRDFSvc.GetResource(rv.selectedFolder);
const krNameArc = kRDFSvc.GetResource("http://home.netscape.com/NC-rdf#Name");
rName = kBMDS.GetTarget(krDefaultFolder, krNameArc, true);
rName = rName.QueryInterface(Components.interfaces.nsIRDFLiteral);
document.getElementById("defaultFolder").value = rName.Value;
}
}
]]>
</script>
<groupbox>
<caption label="&filingBookmarks.label;"/>
<description flex="1">&autoFile.label;</description>
<hbox align="center">
<checkbox id="enableAutoFile" label="&enableAutoFile.label;"
preftype="bool" prefstring="browser.bookmarks.add_without_dialog"
prefattribute="checked"/>
</hbox>
<separator/>
<description flex="1">&defaultFolder.label;</description>
<hbox align="center">
<textbox readonly="true" id="defaultFolder" crop="right" flex="1"/>
<button label="&chooseDefaultFolder.label;" accesskey="&chooseDefaultFolder.accesskey;"
oncommand="chooseDefaultFolder();"
id="browser.bookmarks.choosefolder" preftype="bool"
prefstring="pref.browser.homepage.disable_button.choose_folder" prefattribute="disabled"/>
</hbox>
</groupbox>
<groupbox>
<caption label="&extendedDataViews.label;"/>
<vbox align="start">
<description>&extendedDataExplanation.label;</description>
<checkbox id="showExtendedData" label="&showExtendedData.label;"
accesskey="&showExtendedData.accesskey;"
preftype="bool" prefstring="browser.bookmarks.show_extended_data"
prefattribute="checked"/>
</vbox>
</groupbox>
</page>