diff --git a/gfx/src/nsDeviceContext.cpp b/gfx/src/nsDeviceContext.cpp index ec7253ebedd..83038f506c2 100644 --- a/gfx/src/nsDeviceContext.cpp +++ b/gfx/src/nsDeviceContext.cpp @@ -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; diff --git a/intl/uconv/src/nsCharsetAliasImp.cpp b/intl/uconv/src/nsCharsetAliasImp.cpp index 7aeff517d89..efb7c4d0656 100644 --- a/intl/uconv/src/nsCharsetAliasImp.cpp +++ b/intl/uconv/src/nsCharsetAliasImp.cpp @@ -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 ); } //-------------------------------------------------------------- diff --git a/intl/uconv/src/nsMacCharset.cpp b/intl/uconv/src/nsMacCharset.cpp index 951ad838ec4..f6a407f5445 100644 --- a/intl/uconv/src/nsMacCharset.cpp +++ b/intl/uconv/src/nsMacCharset.cpp @@ -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 ); diff --git a/intl/uconv/src/nsUNIXCharset.cpp b/intl/uconv/src/nsUNIXCharset.cpp index c4192c186f2..6a0a94e9585 100644 --- a/intl/uconv/src/nsUNIXCharset.cpp +++ b/intl/uconv/src/nsUNIXCharset.cpp @@ -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 ) diff --git a/intl/uconv/src/nsWinCharset.cpp b/intl/uconv/src/nsWinCharset.cpp index efa69b9e2e6..0394398b223 100644 --- a/intl/uconv/src/nsWinCharset.cpp +++ b/intl/uconv/src/nsWinCharset.cpp @@ -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 ); diff --git a/mailnews/addrbook/resources/content/addressbook.xul b/mailnews/addrbook/resources/content/addressbook.xul index 9eb56aaaa25..9ee70466278 100644 --- a/mailnews/addrbook/resources/content/addressbook.xul +++ b/mailnews/addrbook/resources/content/addressbook.xul @@ -90,7 +90,7 @@ diff --git a/mailnews/addrbook/resources/content/selectaddress.xul b/mailnews/addrbook/resources/content/selectaddress.xul index 3aded6aa72d..5a69b3f0781 100644 --- a/mailnews/addrbook/resources/content/selectaddress.xul +++ b/mailnews/addrbook/resources/content/selectaddress.xul @@ -67,7 +67,7 @@ Rights Reserved. diff --git a/netwerk/protocol/resource/src/nsResourceProtocolHandler.cpp b/netwerk/protocol/resource/src/nsResourceProtocolHandler.cpp index 6f8b9bc9b1e..9026bbc62a6 100644 --- a/netwerk/protocol/resource/src/nsResourceProtocolHandler.cpp +++ b/netwerk/protocol/resource/src/nsResourceProtocolHandler.cpp @@ -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 * diff --git a/network/module/nsNetService.cpp b/network/module/nsNetService.cpp index 567ade9a660..e408413a612 100644 --- a/network/module/nsNetService.cpp +++ b/network/module/nsNetService.cpp @@ -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) diff --git a/profile/resources/navFinishPreg.xul b/profile/resources/navFinishPreg.xul index c2c0b580f3b..b142c06cae6 100644 --- a/profile/resources/navFinishPreg.xul +++ b/profile/resources/navFinishPreg.xul @@ -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) { diff --git a/profile/resources/pm.xul b/profile/resources/pm.xul index 4b9769a9f0b..a113a4781d5 100644 --- a/profile/resources/pm.xul +++ b/profile/resources/pm.xul @@ -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"); diff --git a/rdf/resources/customize.xul b/rdf/resources/customize.xul index fefb78702a1..8035c07b924 100644 --- a/rdf/resources/customize.xul +++ b/rdf/resources/customize.xul @@ -1,7 +1,7 @@ - + @@ -11,7 +11,7 @@ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onload="Init();"> - + diff --git a/rdf/resources/sidebar-browser.rdf b/rdf/resources/sidebar-browser.rdf index 286505a9f6d..e69de29bb2d 100644 --- a/rdf/resources/sidebar-browser.rdf +++ b/rdf/resources/sidebar-browser.rdf @@ -1,44 +0,0 @@ - - - - - - -]> - - - - - - - &sidebar.whats-related.label; - resource://res/samples/related-panel.xul - resource://res/samples/related-panel-cust.xul - - - - - &sidebar.flash.label; - resource://res/rdf/flash.xul - resource://res/rdf/flash-cust.xul - 5em - - - - - &sidebar.tinderbox.label; - http://cvs-mirror.mozilla.org/webtools/tinderbox/SeaMonkey/panel.html - - - - - &sidebar.bookmarks.label; - resource://res/samples/bm-panel.xul - resource://res/samples/bm-panel-cust.xul - - - - diff --git a/rdf/resources/sidebar-browser.xul b/rdf/resources/sidebar-browser.xul index c0c8d769cee..cadd00c1d21 100644 --- a/rdf/resources/sidebar-browser.xul +++ b/rdf/resources/sidebar-browser.xul @@ -16,7 +16,7 @@ onload="Init('resource:/res/rdf/sidebar-browser.rdf', 'NC:BrowserSidebarRoot');" align="vertical"> - + &sidebar.title.label; diff --git a/rdf/resources/sidebar-registry.rdf b/rdf/resources/sidebar-registry.rdf index 79908deed4d..0de4dc11cdb 100644 --- a/rdf/resources/sidebar-registry.rdf +++ b/rdf/resources/sidebar-registry.rdf @@ -16,14 +16,14 @@ Headlines http://my.netscape.com/topstories_subchannel.tmpl - resource://res/samples/related-panel-cust.xul + resource:/res/samples/related-panel-cust.xul Local News http://my.netscape.com/localnews_content.tmpl - resource://res/rdf/flash-cust.xul + resource:/res/rdf/flash-cust.xul diff --git a/rdf/resources/sidebar.js b/rdf/resources/sidebar.js index 65e9d539dd7..e69de29bb2d 100644 --- a/rdf/resources/sidebar.js +++ b/rdf/resources/sidebar.js @@ -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); - } -} - diff --git a/suite/browser/navigator.js b/suite/browser/navigator.js index ca6dcadc894..a207e99cc38 100644 --- a/suite/browser/navigator.js +++ b/suite/browser/navigator.js @@ -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); } } diff --git a/suite/common/bookmarks/bookmarks.js b/suite/common/bookmarks/bookmarks.js index b1dfb967c9a..9312f4d428e 100644 --- a/suite/common/bookmarks/bookmarks.js +++ b/suite/common/bookmarks/bookmarks.js @@ -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 { diff --git a/webshell/embed/ActiveX/MozillaBrowser.cpp b/webshell/embed/ActiveX/MozillaBrowser.cpp index b9dca866f8d..5e5566a66a1 100644 --- a/webshell/embed/ActiveX/MozillaBrowser.cpp +++ b/webshell/embed/ActiveX/MozillaBrowser.cpp @@ -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; diff --git a/xpfe/AppCores/src/nsBrowserAppCore.cpp b/xpfe/AppCores/src/nsBrowserAppCore.cpp index 574717465ff..9890cb042dc 100644 --- a/xpfe/AppCores/src/nsBrowserAppCore.cpp +++ b/xpfe/AppCores/src/nsBrowserAppCore.cpp @@ -1803,7 +1803,7 @@ nsBrowserAppCore::DoDialog() window = nsnull; nsCOMPtr 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 diff --git a/xpfe/browser/resources/content/navigator.js b/xpfe/browser/resources/content/navigator.js index ca6dcadc894..a207e99cc38 100644 --- a/xpfe/browser/resources/content/navigator.js +++ b/xpfe/browser/resources/content/navigator.js @@ -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); } } diff --git a/xpfe/browser/samples/dexparammaster.xul b/xpfe/browser/samples/dexparammaster.xul index af68d557480..2e388afaa10 100644 --- a/xpfe/browser/samples/dexparammaster.xul +++ b/xpfe/browser/samples/dexparammaster.xul @@ -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); } diff --git a/xpfe/browser/src/navigator-test1.xul b/xpfe/browser/src/navigator-test1.xul index 5b8cb01ce10..e03358f66e5 100644 --- a/xpfe/browser/src/navigator-test1.xul +++ b/xpfe/browser/src/navigator-test1.xul @@ -137,7 +137,7 @@ } } if (toolkitCore) { - toolkitCore.ShowWindow("resource://res/rdf/bookmarks.xul",window); + toolkitCore.ShowWindow("resource:/res/rdf/bookmarks.xul",window); } } diff --git a/xpfe/components/bookmarks/resources/bookmarks.js b/xpfe/components/bookmarks/resources/bookmarks.js index b1dfb967c9a..9312f4d428e 100644 --- a/xpfe/components/bookmarks/resources/bookmarks.js +++ b/xpfe/components/bookmarks/resources/bookmarks.js @@ -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 { diff --git a/xpinstall/notifier/SoftwareUpdate.js b/xpinstall/notifier/SoftwareUpdate.js index 82f27632f5c..3f63a654d4b 100644 --- a/xpinstall/notifier/SoftwareUpdate.js +++ b/xpinstall/notifier/SoftwareUpdate.js @@ -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() { diff --git a/xpinstall/res/xpistatus.xul b/xpinstall/res/xpistatus.xul index e012eb10f66..d6e94f136d8 100644 --- a/xpinstall/res/xpistatus.xul +++ b/xpinstall/res/xpistatus.xul @@ -1,5 +1,5 @@ - +