Replaced resource:// with resource:/ to be more compliant with our parsing rules.

This commit is contained in:
gagan%netscape.com 1999-07-21 11:48:56 +00:00
Родитель 6883bf1a64
Коммит 20c0996ab2
26 изменённых файлов: 30 добавлений и 236 удалений

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

@ -375,7 +375,7 @@ NS_IMETHODIMP DeviceContextImpl::LoadIconImage(PRInt32 aId, nsIImage*& aImage)
// Build the URL string
char url[128];
sprintf(url, "resource://res/gfx/icon_%d.gif", aId);
sprintf(url, "resource:/res/gfx/icon_%d.gif", aId);
// Use a sync net context
ilINetContext* netContext;

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

@ -62,7 +62,7 @@ nsCharsetAlias2::nsCharsetAlias2()
{
NS_INIT_REFCNT();
PR_AtomicIncrement(&g_InstanceCount);
nsAutoString propertyURL("resource://res/charsetalias.properties");
nsAutoString propertyURL("resource:/res/charsetalias.properties");
mDelegate = new nsURLProperties( propertyURL );
}
//--------------------------------------------------------------

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

@ -46,7 +46,7 @@ nsMacCharset::nsMacCharset()
{
NS_INIT_REFCNT();
PR_AtomicIncrement(&g_InstanceCount);
nsAutoString propertyURL("resource://res/maccharset.properties");
nsAutoString propertyURL("resource:/res/maccharset.properties");
nsURLProperties *info = new nsURLProperties( propertyURL );

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

@ -52,7 +52,7 @@ nsUNIXCharset::nsUNIXCharset()
char* locale = setlocale(LC_CTYPE, NULL);
if(locale)
{
nsAutoString propertyURL("resource://res/unixcharset.properties");
nsAutoString propertyURL("resource:/res/unixcharset.properties");
nsURLProperties *info = new nsURLProperties( propertyURL );
if( info )

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

@ -45,7 +45,7 @@ nsWinCharset::nsWinCharset()
{
NS_INIT_REFCNT();
PR_AtomicIncrement(&g_InstanceCount);
nsAutoString propertyURL("resource://res/wincharset.properties");
nsAutoString propertyURL("resource:/res/wincharset.properties");
nsURLProperties *info = new nsURLProperties( propertyURL );

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

@ -90,7 +90,7 @@
<html:script language="JavaScript" src="chrome://addressbook/content/editcard.js"/>
<!--
<html:script language="JavaScript" src="chrome://messenger/content/commandglue.js"/>
<html:script language="JavaScript" src="resource://res/samples/DumpDOM.js"/>
<html:script language="JavaScript" src="resource:/res/samples/DumpDOM.js"/>
-->
<menubar>
<menu id="fileMenu" name="&fileMenu.label;">

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

@ -67,7 +67,7 @@ Rights Reserved.
<html:script language="JavaScript" src="chrome://addressbook/content/resultPane.js"/>
<html:script language="JavaScript" src="chrome://messengercompose/content/MsgComposeCommands.js"/>
<!--
<html:script language="JavaScript" src="resource://res/samples/DumpDOM.js"/>
<html:script language="JavaScript" src="resource:/res/samples/DumpDOM.js"/>
-->
<!-- Thin box across top, show names containing & stop, search buttons -->
<box align="horizontal" style="width:100%; padding:0px; padding-top:2px; padding-bottom:2px">

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

@ -144,7 +144,7 @@ nsResourceProtocolHandler::NewURI(const char *aSpec, nsIURI *aBaseURI,
}
/*
* Rewrite "resource://" URLs into file: URLs with the path of the
* Rewrite "resource:/" URLs into file: URLs with the path of the
* executable prepended to the file path...
*/
static char *

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

@ -1490,7 +1490,7 @@ extern "C" void net_ReleaseContext(MWContext *context)
/*
* Rewrite "resource://" URLs into file: URLs with the path of the
* Rewrite "resource:/" URLs into file: URLs with the path of the
* executable prepended to the file path...
*/
char *mangleResourceIntoFileURL(const char* aResourceFileName)

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

@ -45,7 +45,7 @@
dump("Inside the Exit Wizard function...\n");
parent.frames[0].commit();
parent.Finish();
parent.location.replace("resource://res/profile/preg.html");
parent.location.replace("resource:/res/profile/preg.html");
//var toolkitCore = XPAppCoresManager.Find("toolkitCore");
//if (!toolkitCore) {

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

@ -19,7 +19,7 @@ var currProfile = "";
function CreateProfile()
{
// Need to call CreateNewProfile xuls
// var win = window.openDialog('resource://res/profile/cpwManager.xul', 'Creator', 'chrome');
// var win = window.openDialog('resource:/res/profile/cpwManager.xul', 'Creator', 'chrome');
dump("\ngot here\n");
//this.location.replace(this.location);
this.location.replace("resource:/res/profile/cpwManager.xul");

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

@ -1,7 +1,7 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://sidebar/skin/" type="text/css"?>
<?xml-stylesheet href="resource://res/rdf/customize.css" type="text/css"?>
<?xml-stylesheet href="resource:/res/rdf/customize.css" type="text/css"?>
<!DOCTYPE window>
@ -11,7 +11,7 @@
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="Init();">
<html:script src="resource://res/rdf/customize.js" />
<html:script src="resource:/res/rdf/customize.js" />
<box align="vertical" flex="100%" id="main-box">

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

@ -1,44 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE RDF
[
<!ENTITY sidebar.whats-related.label "What's Related">
<!ENTITY sidebar.flash.label "Flashes">
<!ENTITY sidebar.tinderbox.label "Tinderbox">
<!ENTITY sidebar.bookmarks.label "Bookmarks">
]>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:NC="http://home.netscape.com/NC-rdf#">
<RDF:Seq about="NC:BrowserSidebarRoot">
<RDF:li>
<RDF:Description ID="whats-related">
<NC:title>&sidebar.whats-related.label;</NC:title>
<NC:content>resource://res/samples/related-panel.xul</NC:content>
<NC:customize>resource://res/samples/related-panel-cust.xul</NC:customize>
</RDF:Description>
</RDF:li>
<RDF:li>
<RDF:Description ID="flash">
<NC:title>&sidebar.flash.label;</NC:title>
<NC:content>resource://res/rdf/flash.xul</NC:content>
<NC:customize>resource://res/rdf/flash-cust.xul</NC:customize>
<NC:height>5em</NC:height>
</RDF:Description>
</RDF:li>
<RDF:li>
<RDF:Description ID="tinderbox">
<NC:title>&sidebar.tinderbox.label;</NC:title>
<NC:content>http://cvs-mirror.mozilla.org/webtools/tinderbox/SeaMonkey/panel.html</NC:content>
</RDF:Description>
</RDF:li>
<RDF:li>
<RDF:Description ID="bookmarks">
<NC:title>&sidebar.bookmarks.label;</NC:title>
<NC:content>resource://res/samples/bm-panel.xul</NC:content>
<NC:customize>resource://res/samples/bm-panel-cust.xul</NC:customize>
</RDF:Description>
</RDF:li>
</RDF:Seq>
</RDF:RDF>

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

@ -16,7 +16,7 @@
onload="Init('resource:/res/rdf/sidebar-browser.rdf',
'NC:BrowserSidebarRoot');" align="vertical">
<html:script src="resource://res/rdf/sidebar.js" />
<html:script src="resource:/res/rdf/sidebar.js" />
<box id="sidebox" align="vertical" flex="100%">
<box class="sidebartitle">
<html:div class="sidebartitlelabel">&sidebar.title.label;</html:div>

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

@ -16,14 +16,14 @@
<RDF:Description ID="Headlines">
<NC:title>Headlines</NC:title>
<NC:content>http://my.netscape.com/topstories_subchannel.tmpl</NC:content>
<NC:customize>resource://res/samples/related-panel-cust.xul</NC:customize>
<NC:customize>resource:/res/samples/related-panel-cust.xul</NC:customize>
</RDF:Description>
</RDF:li>
<RDF:li>
<RDF:Description ID="Local News">
<NC:title>Local News</NC:title>
<NC:content>http://my.netscape.com/localnews_content.tmpl</NC:content>
<NC:customize>resource://res/rdf/flash-cust.xul</NC:customize>
<NC:customize>resource:/res/rdf/flash-cust.xul</NC:customize>
</RDF:Description>
</RDF:li>
<RDF:li>

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

@ -1,162 +0,0 @@
/* -*- Mode: Java; tab-width: 2; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// the rdf service
var RDF = Components.classes['component://netscape/rdf/rdf-service'].getService();
RDF = RDF.QueryInterface(Components.interfaces.nsIRDFService);
var sidebar = new Object;
function Init(sidebar_db, sidebar_resource)
{
// Initialize the Sidebar
sidebar.db = sidebar_db;
sidebar.resource = sidebar_resource;
var registry;
try {
// First try to construct a new one and load it
// synchronously. nsIRDFService::GetDataSource() loads RDF/XML
// asynchronously by default.
registry = Components.classes['component://netscape/rdf/datasource?name=xml-datasource'].createInstance();
registry = registry.QueryInterface(Components.interfaces.nsIRDFDataSource);
var remote = registry.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);
remote.Init(sidebar.db); // this will throw if it's already been opened and registered.
// read it in synchronously.
remote.Refresh(true);
}
catch (ex) {
// if we get here, then the RDF/XML has been opened and read
// once. We just need to grab the datasource.
registry = RDF.GetDataSource(sidebar.db);
}
// Create a 'container' wrapper around the sidebar.resources
// resource so we can use some utility routines that make access a
// bit easier.
var sb_datasource = Components.classes['component://netscape/rdf/container'].createInstance();
sb_datasource = sb_datasource.QueryInterface(Components.interfaces.nsIRDFContainer);
sb_datasource.Init(registry, RDF.GetResource(sidebar.resource));
var sidebox = document.getElementById('sidebox');
// Now enumerate all of the flash datasources.
var enumerator = sb_datasource.GetElements();
while (enumerator.HasMoreElements()) {
var service = enumerator.GetNext();
service = service.QueryInterface(Components.interfaces.nsIRDFResource);
var new_panel = createPanel(registry, service);
if (new_panel) {
sidebox.appendChild(new_panel);
}
}
}
function createPanel(registry, service) {
var panel_title = getAttr(registry, service, 'title');
var panel_content = getAttr(registry, service, 'content');
var panel_height = getAttr(registry, service, 'height');
var box = document.createElement('box');
var iframe = document.createElement('html:iframe');
var iframeId = iframe.getAttribute('id');
var panelbar = createPanelTitle(panel_title, iframeId);
box.setAttribute('align', 'vertical');
iframe.setAttribute('src', panel_content);
if (panel_height) {
var height_style = 'height:' + panel_height + ';';
iframe.setAttribute('style', height_style);
iframe.setAttribute('save_height', height_style);
}
box.appendChild(panelbar);
box.appendChild(iframe);
return box;
}
function createPanelTitle(titletext, id)
{
var panelbar = document.createElement('box');
var title = document.createElement('titledbutton');
var spring = document.createElement('spring');
title.setAttribute('value', titletext);
title.setAttribute('class', 'borderless paneltitle');
title.setAttribute('onclick', 'resize("'+id+'")');
spring.setAttribute('flex', '100%');
panelbar.setAttribute('class', 'panelbar');
panelbar.appendChild(title);
panelbar.appendChild(spring);
return panelbar;
}
function getAttr(registry,service,attr_name) {
var attr = registry.GetTarget(service,
RDF.GetResource('http://home.netscape.com/NC-rdf#' + attr_name),
true);
if (attr)
attr = attr.QueryInterface(
Components.interfaces.nsIRDFLiteral);
if (attr)
attr = attr.Value;
return attr;
}
function resize(id) {
var box = document.getElementById('sidebox');
var iframe = document.getElementById(id);
if (iframe.getAttribute('display') == 'none') {
var height_style = iframe.getAttribute('save_height');
iframe.setAttribute('style', height_style + 'visibility:visible');
iframe.setAttribute('display','block');
} else {
iframe.setAttribute('style', 'height:0px; visibility:hidden');
iframe.setAttribute('display','none');
}
}
function customize() {
var newWin = window.openDialog('resource://res/rdf/customize.xul','New','chrome', sidebar.db, sidebar.resource);
return newWin;
}
function dumpTree(node, depth) {
var indent = "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | + ";
var kids = node.childNodes;
dump(indent.substr(indent.length - depth*2));
// Print your favorite attributes here
dump(node.nodeName)
dump(" "+node.getAttribute('id'));
dump("\n");
for (var ii=0; ii < kids.length; ii++) {
dumpTree(kids[ii], depth + 1);
}
}

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

@ -549,7 +549,7 @@
}
}
if (toolkitCore) {
toolkitCore.ShowWindow("resource://res/samples/bookmarks.xul",window);
toolkitCore.ShowWindow("resource:/res/samples/bookmarks.xul",window);
}
}
@ -563,7 +563,7 @@
}
}
if (toolkitCore) {
toolkitCore.ShowWindow("resource://res/samples/history.xul",window);
toolkitCore.ShowWindow("resource:/res/samples/history.xul",window);
}
}

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

@ -31,7 +31,7 @@ function BookmarkProperties()
var type = select_list[0].getAttribute('type');
if (type != "http://home.netscape.com/NC-rdf#BookmarkSeparator")
{
var props = window.open("resource://res/samples/bm-props.xul", "BookmarkProperties", "chrome");
var props = window.open("resource:/res/samples/bm-props.xul", "BookmarkProperties", "chrome");
props.BookmarkURL = select_list[0].getAttribute("id");
}
} else {

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

@ -43,7 +43,7 @@ extern "C" void NS_SetupRegistry();
static const std::string c_szPrefsFile = "prefs50.js";
static const std::string c_szPrefsHomePage = "browser.startup.homepage";
static const std::string c_szDefaultPage = "resource://res/MozillaControl.html";
static const std::string c_szDefaultPage = "resource:/res/MozillaControl.html";
BOOL CMozillaBrowser::m_bRegistryInitialized = FALSE;

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

@ -1803,7 +1803,7 @@ nsBrowserAppCore::DoDialog()
window = nsnull;
nsCOMPtr<nsIURI> urlObj;
char * urlstr = "resource://res/samples/Password.html";
char * urlstr = "resource:/res/samples/Password.html";
#ifndef NECKO
rv = NS_NewURL(getter_AddRefs(urlObj), urlstr);
#else

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

@ -549,7 +549,7 @@
}
}
if (toolkitCore) {
toolkitCore.ShowWindow("resource://res/samples/bookmarks.xul",window);
toolkitCore.ShowWindow("resource:/res/samples/bookmarks.xul",window);
}
}
@ -563,7 +563,7 @@
}
}
if (toolkitCore) {
toolkitCore.ShowWindow("resource://res/samples/history.xul",window);
toolkitCore.ShowWindow("resource:/res/samples/history.xul",window);
}
}

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

@ -18,13 +18,13 @@
// show a nonmodal dialog, sending parameters as part of the URL
function MakeURLDialog() {
var newWin = window.open("resource://res/samples/dexparamdialog.xul?remind=true;prompt=Give me your money and convertible bonds", "New", "chrome");
var newWin = window.open("resource:/res/samples/dexparamdialog.xul?remind=true;prompt=Give me your money and convertible bonds", "New", "chrome");
return newWin;
}
// show a nonmodal dialog, sending parameters as part of the function call
function MakeParamDialog() {
var newWin = window.openDialog("resource://res/samples/dexparamdialog.xul",
var newWin = window.openDialog("resource:/res/samples/dexparamdialog.xul",
"New", "chrome", {remind:true, prompt:"Give me your money and convertible bonds"});
return newWin;
}
@ -33,7 +33,7 @@
function ModalDialog() {
var toolkitCore = GetToolkitCore();
if (toolkitCore)
toolkitCore.ShowModalDialog("resource://res/samples/dexparamdialog.xul",
toolkitCore.ShowModalDialog("resource:/res/samples/dexparamdialog.xul",
window);
}

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

@ -137,7 +137,7 @@
}
}
if (toolkitCore) {
toolkitCore.ShowWindow("resource://res/rdf/bookmarks.xul",window);
toolkitCore.ShowWindow("resource:/res/rdf/bookmarks.xul",window);
}
}

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

@ -31,7 +31,7 @@ function BookmarkProperties()
var type = select_list[0].getAttribute('type');
if (type != "http://home.netscape.com/NC-rdf#BookmarkSeparator")
{
var props = window.open("resource://res/samples/bm-props.xul", "BookmarkProperties", "chrome");
var props = window.open("resource:/res/samples/bm-props.xul", "BookmarkProperties", "chrome");
props.BookmarkURL = select_list[0].getAttribute("id");
}
} else {

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

@ -17,7 +17,7 @@
}
// the location of the flash registry.
var localSoftwareUpdateRegistry = 'resource://res/rdf/SoftwareUpdates.rdf';
var localSoftwareUpdateRegistry = 'resource:/res/rdf/SoftwareUpdates.rdf';
function Init()
{

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

@ -1,5 +1,5 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome:/global/skin/xul.css" type="text/css"?>
<?xml-stylesheet href="chrome://global/skin/xul.css" type="text/css"?>
<?xml-stylesheet href="resource:/res/xpinstall/xpistatus.css" type="text/css"?>
<!DOCTYPE window