mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 07:15:46 +00:00
bug 56680 - use a xul <stringbundle/> instead of including the strres.js code
first pass through prefs, more to come later. r=jag, sr=alecf
This commit is contained in:
parent
a226f2157d
commit
c30db46848
@ -25,7 +25,7 @@
|
|||||||
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-advanced.dtd" >
|
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-advanced.dtd" >
|
||||||
|
|
||||||
<window xmlns:html="http://www.w3.org/1999/xhtml"
|
<window xmlns:html="http://www.w3.org/1999/xhtml"
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
class="color-dialog"
|
class="color-dialog"
|
||||||
align="vertical" title="&window.title;"
|
align="vertical" title="&window.title;"
|
||||||
onload="parent.initPanel(panel);">
|
onload="parent.initPanel(panel);">
|
||||||
@ -49,10 +49,10 @@
|
|||||||
|
|
||||||
]]>
|
]]>
|
||||||
</script>
|
</script>
|
||||||
|
<!-- XXX: Replace strres.js when prefutilities is converted -->
|
||||||
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
|
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
|
||||||
<script type="application/x-javascript" src="chrome://communicator/content/pref/prefutilities.js"/>
|
<script type="application/x-javascript" src="chrome://communicator/content/pref/prefutilities.js"/>
|
||||||
|
|
||||||
|
|
||||||
<box class="box-smallheader" title="&lHeader;"/>
|
<box class="box-smallheader" title="&lHeader;"/>
|
||||||
|
|
||||||
<titledbox orient="vertical" id="advancedSettings">
|
<titledbox orient="vertical" id="advancedSettings">
|
||||||
|
@ -35,8 +35,9 @@
|
|||||||
title="&editType.label;"
|
title="&editType.label;"
|
||||||
onload="Startup();">
|
onload="Startup();">
|
||||||
|
|
||||||
|
<stringbundle id="bundle_prefApplications"
|
||||||
|
src="chrome://communicator/locale/pref/pref-applications.properties"/>
|
||||||
<script type="application/x-javascript" src="chrome://communicator/content/pref/overrideHandler.js"/>
|
<script type="application/x-javascript" src="chrome://communicator/content/pref/overrideHandler.js"/>
|
||||||
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
|
|
||||||
<script type="application/x-javascript" src="chrome://global/content/nsJSComponentManager.js"/>
|
<script type="application/x-javascript" src="chrome://global/content/nsJSComponentManager.js"/>
|
||||||
<script type="application/x-javascript">
|
<script type="application/x-javascript">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
@ -47,13 +48,10 @@
|
|||||||
var gAskBeforeOpen = null;
|
var gAskBeforeOpen = null;
|
||||||
var gIcon = null;
|
var gIcon = null;
|
||||||
var gContentType = null;
|
var gContentType = null;
|
||||||
|
var gPrefApplicationsBundle = null;
|
||||||
var gBundle = null;
|
|
||||||
|
|
||||||
var gOldMIME = null;
|
var gOldMIME = null;
|
||||||
|
|
||||||
var gOldDesc = null;
|
var gOldDesc = null;
|
||||||
|
|
||||||
var gOldExtensions = null;
|
var gOldExtensions = null;
|
||||||
|
|
||||||
function Startup()
|
function Startup()
|
||||||
@ -68,7 +66,7 @@
|
|||||||
gAppPath = document.getElementById("appPath");
|
gAppPath = document.getElementById("appPath");
|
||||||
gAskBeforeOpen = document.getElementById("askBeforeOpen");
|
gAskBeforeOpen = document.getElementById("askBeforeOpen");
|
||||||
|
|
||||||
gBundle = srGetStrBundle("chrome://communicator/locale/pref/pref-applications.properties");
|
gPrefApplicationsBundle = document.getElementById("bundle_prefApplications");
|
||||||
|
|
||||||
var handlerInfo = window.arguments[0];
|
var handlerInfo = window.arguments[0];
|
||||||
|
|
||||||
@ -116,8 +114,8 @@
|
|||||||
filePicker = filePicker.QueryInterface(Components.interfaces.nsIFilePicker);
|
filePicker = filePicker.QueryInterface(Components.interfaces.nsIFilePicker);
|
||||||
if (filePicker) {
|
if (filePicker) {
|
||||||
const FP = Components.interfaces.nsIFilePicker
|
const FP = Components.interfaces.nsIFilePicker
|
||||||
var windowTitle = gBundle.GetStringFromName("chooseHandler");
|
var windowTitle = gPrefApplicationsBundle.getString("chooseHandler");
|
||||||
var programsFilter = gBundle.GetStringFromName("programsFilter");
|
var programsFilter = gPrefApplicationsBundle.getString("programsFilter");
|
||||||
filePicker.init(window, windowTitle, FP.modeOpen);
|
filePicker.init(window, windowTitle, FP.modeOpen);
|
||||||
if (navigator.platform == "Win32")
|
if (navigator.platform == "Win32")
|
||||||
filePicker.appendFilter(programsFilter, "*.exe; *.com");
|
filePicker.appendFilter(programsFilter, "*.exe; *.com");
|
||||||
@ -157,8 +155,8 @@
|
|||||||
if (gMIMEField.value != gOldMIME) {
|
if (gMIMEField.value != gOldMIME) {
|
||||||
var exists = mimeHandlerExists(gMIMEField.value);
|
var exists = mimeHandlerExists(gMIMEField.value);
|
||||||
if (exists) {
|
if (exists) {
|
||||||
var titleMsg = gBundle.GetStringFromName("handlerExistsTitle");
|
var titleMsg = gPrefApplicationsBundle.getString("handlerExistsTitle");
|
||||||
var dialogMsg = gBundle.GetStringFromName("handlerExists");
|
var dialogMsg = gPrefApplicationsBundle.getString("handlerExists");
|
||||||
dialogMsg = dialogMsg.replace(/%mime%/g, gMIMEField.value);
|
dialogMsg = dialogMsg.replace(/%mime%/g, gMIMEField.value);
|
||||||
var commonDialogService = nsJSComponentManager.getService("@mozilla.org/appshell/commonDialogs;1",
|
var commonDialogService = nsJSComponentManager.getService("@mozilla.org/appshell/commonDialogs;1",
|
||||||
"nsICommonDialogs");
|
"nsICommonDialogs");
|
||||||
|
@ -1,6 +1,15 @@
|
|||||||
|
|
||||||
var gNewTypeRV = null;
|
var gNewTypeRV = null;
|
||||||
var gUpdateTypeRV = null;
|
var gUpdateTypeRV = null;
|
||||||
|
var gTree = null;
|
||||||
|
var gDS = null;
|
||||||
|
var gPrefApplicationsBundle = null;
|
||||||
|
|
||||||
|
var gExtensionField = null;
|
||||||
|
var gMIMETypeField = null;
|
||||||
|
var gHandlerField = null;
|
||||||
|
var gEditButton = null;
|
||||||
|
var gRemoveButton = null;
|
||||||
|
|
||||||
function newType()
|
function newType()
|
||||||
{
|
{
|
||||||
@ -14,8 +23,8 @@ function newType()
|
|||||||
|
|
||||||
function removeType()
|
function removeType()
|
||||||
{
|
{
|
||||||
var titleMsg = gBundle.GetStringFromName("removeHandlerTitle");
|
var titleMsg = gPrefApplicationsBundle.getString("removeHandlerTitle");
|
||||||
var dialogMsg = gBundle.GetStringFromName("removeHandler");
|
var dialogMsg = gPrefApplicationsBundle.getString("removeHandler");
|
||||||
dialogMsg = dialogMsg.replace(/%n/g, "\n");
|
dialogMsg = dialogMsg.replace(/%n/g, "\n");
|
||||||
var commonDialogService = nsJSComponentManager.getService("@mozilla.org/appshell/commonDialogs;1",
|
var commonDialogService = nsJSComponentManager.getService("@mozilla.org/appshell/commonDialogs;1",
|
||||||
"nsICommonDialogs");
|
"nsICommonDialogs");
|
||||||
@ -38,20 +47,10 @@ function editType()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var gTree = null;
|
|
||||||
var gDS = null;
|
|
||||||
var gBundle = null;
|
|
||||||
|
|
||||||
var gExtensionField = null;
|
|
||||||
var gMIMETypeField = null;
|
|
||||||
var gHandlerField = null;
|
|
||||||
var gEditButton = null;
|
|
||||||
var gRemoveButton = null;
|
|
||||||
|
|
||||||
function Startup()
|
function Startup()
|
||||||
{
|
{
|
||||||
// set up the string bundle
|
// set up the string bundle
|
||||||
gBundle = srGetStrBundle("chrome://communicator/locale/pref/pref-applications.properties");
|
gPrefApplicationsBundle = document.getElementById("bundle_prefApplications");
|
||||||
|
|
||||||
// set up the elements
|
// set up the elements
|
||||||
gTree = document.getElementById("appTree");
|
gTree = document.getElementById("appTree");
|
||||||
@ -92,9 +91,11 @@ function selectApplication()
|
|||||||
|
|
||||||
// figure out how this type is handled
|
// figure out how this type is handled
|
||||||
if (handlerOverride.handleInternal == "true")
|
if (handlerOverride.handleInternal == "true")
|
||||||
gHandlerField.setAttribute("value", gBundle.GetStringFromName("handleInternally"));
|
gHandlerField.setAttribute("value",
|
||||||
|
gPrefApplicationsBundle.getString("handleInternally"));
|
||||||
else if (handlerOverride.saveToDisk == "true")
|
else if (handlerOverride.saveToDisk == "true")
|
||||||
gHandlerField.setAttribute("value", gBundle.GetStringFromName("saveToDisk"));
|
gHandlerField.setAttribute("value",
|
||||||
|
gPrefApplicationsBundle.getString("saveToDisk"));
|
||||||
else
|
else
|
||||||
gHandlerField.setAttribute("value", handlerOverride.appDisplayName);
|
gHandlerField.setAttribute("value", handlerOverride.appDisplayName);
|
||||||
|
|
||||||
|
@ -28,16 +28,17 @@
|
|||||||
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-applications.dtd" >
|
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-applications.dtd" >
|
||||||
|
|
||||||
<window xmlns:html="http://www.w3.org/1999/xhtml"
|
<window xmlns:html="http://www.w3.org/1999/xhtml"
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
class="color-dialog"
|
class="color-dialog"
|
||||||
style="-moz-user-focus: ignore;"
|
style="-moz-user-focus: ignore;"
|
||||||
title="&window.title;" align="vertical"
|
title="&window.title;" align="vertical"
|
||||||
onload="parent.initPanel('chrome://communicator/content/pref/pref-applications.xul');">
|
onload="parent.initPanel('chrome://communicator/content/pref/pref-applications.xul');">
|
||||||
|
|
||||||
|
<stringbundle id="bundle_prefApplications"
|
||||||
|
src="chrome://communicator/locale/pref/pref-applications.properties"/>
|
||||||
<script type="application/x-javascript" src="chrome://communicator/content/pref/pref-applications.js"/>
|
<script type="application/x-javascript" src="chrome://communicator/content/pref/pref-applications.js"/>
|
||||||
<script type="application/x-javascript" src="chrome://communicator/content/pref/overrideHandler.js"/>
|
<script type="application/x-javascript" src="chrome://communicator/content/pref/overrideHandler.js"/>
|
||||||
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
|
|
||||||
<script type="application/x-javascript" src="chrome://global/content/nsJSComponentManager.js"/>
|
<script type="application/x-javascript" src="chrome://global/content/nsJSComponentManager.js"/>
|
||||||
|
|
||||||
<box class="box-smallheader" title="&lHeader;"/>
|
<box class="box-smallheader" title="&lHeader;"/>
|
||||||
@ -83,16 +84,16 @@
|
|||||||
</box>
|
</box>
|
||||||
|
|
||||||
<box orient="vertical">
|
<box orient="vertical">
|
||||||
<button id="newTypeButton"
|
<button id="newTypeButton"
|
||||||
value="&newTypeButton.label;" accesskey="&newTypeButton.accesskey;"
|
value="&newTypeButton.label;" accesskey="&newTypeButton.accesskey;"
|
||||||
oncommand="newType();"/>
|
oncommand="newType();"/>
|
||||||
<button id="editButton"
|
<button id="editButton"
|
||||||
value="&editButton.label;" accesskey="&editButton.accesskey;"
|
value="&editButton.label;" accesskey="&editButton.accesskey;"
|
||||||
oncommand="editType();"/>
|
oncommand="editType();"/>
|
||||||
<button id="removeButton"
|
<button id="removeButton"
|
||||||
value="&removeButton.label;" accesskey="&removeButton.accesskey;"
|
value="&removeButton.label;" accesskey="&removeButton.accesskey;"
|
||||||
oncommand="removeType();"/>
|
oncommand="removeType();"/>
|
||||||
</box>
|
</box>
|
||||||
</titledbox>
|
</titledbox>
|
||||||
|
|
||||||
<titledbox orient="vertical">
|
<titledbox orient="vertical">
|
||||||
|
@ -1,24 +1,23 @@
|
|||||||
function prefCacheSelectFolder()
|
function prefCacheSelectFolder()
|
||||||
{
|
{
|
||||||
bundle = srGetStrBundle("chrome://communicator/locale/pref/prefutilities.properties");
|
var prefutilitiesBundle = document.getElementById("bundle_prefutilities");
|
||||||
var folderField = document.getElementById("browserCacheDirectory");
|
var folderField = document.getElementById("browserCacheDirectory");
|
||||||
var file = getFileOrFolderSpec( bundle.GetStringFromName("cachefolder"), true );
|
var file = getFileOrFolderSpec(prefutilitiesBundle.getString("cachefolder"),
|
||||||
|
true);
|
||||||
if ( file && file != -1 )
|
if ( file && file != -1 )
|
||||||
folderField.value = file.unicodePath;
|
folderField.value = file.unicodePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
function prefClearMemCache()
|
function prefClearMemCache()
|
||||||
{
|
{
|
||||||
dump("prefClearMemCache \n");
|
var cache = Components.classes['@mozilla.org/network/cache;1?name=manager'].getService();
|
||||||
var cache = Components.classes['@mozilla.org/network/cache;1?name=manager'].getService();
|
var cacheService = cache.QueryInterface( Components.interfaces.nsINetDataCacheManager);
|
||||||
var cacheService = cache.QueryInterface( Components.interfaces.nsINetDataCacheManager);
|
cacheService.clear( 2 );
|
||||||
cacheService.clear( 2 );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function prefClearDiskCache()
|
function prefClearDiskCache()
|
||||||
{
|
{
|
||||||
dump("prefClearDiskCache \n");
|
var cache = Components.classes['@mozilla.org/network/cache;1?name=manager'].getService();
|
||||||
var cache = Components.classes['@mozilla.org/network/cache;1?name=manager'].getService();
|
var cacheService = cache.QueryInterface( Components.interfaces.nsINetDataCacheManager);
|
||||||
var cacheService = cache.QueryInterface( Components.interfaces.nsINetDataCacheManager);
|
cacheService.clear( 12 );
|
||||||
cacheService.clear( 12 );
|
|
||||||
}
|
}
|
||||||
|
@ -25,10 +25,10 @@
|
|||||||
|
|
||||||
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-cache.dtd" >
|
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-cache.dtd" >
|
||||||
<window xmlns:html="http://www.w3.org/1999/xhtml"
|
<window xmlns:html="http://www.w3.org/1999/xhtml"
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
class="color-dialog"
|
class="color-dialog"
|
||||||
orient="vertical" title="&title.label;"
|
orient="vertical" title="&title.label;"
|
||||||
onload="parent.initPanel('chrome://communicator/content/pref/pref-cache.xul');">
|
onload="parent.initPanel('chrome://communicator/content/pref/pref-cache.xul');">
|
||||||
|
|
||||||
<script type="application/x-javascript">
|
<script type="application/x-javascript">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
@ -36,6 +36,9 @@
|
|||||||
]]>
|
]]>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<stringbundle id="bundle_prefutilities"
|
||||||
|
src="chrome://communicator/locale/pref/prefutilities.properties"/>
|
||||||
|
<!-- XXX: Replace strres.js when prefutilities is converted -->
|
||||||
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
|
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
|
||||||
<script type="application/x-javascript" src="chrome://communicator/content/pref/prefutilities.js"/>
|
<script type="application/x-javascript" src="chrome://communicator/content/pref/prefutilities.js"/>
|
||||||
<script type="application/x-javascript" src="chrome://communicator/content/pref/pref-cache.js"/>
|
<script type="application/x-javascript" src="chrome://communicator/content/pref/pref-cache.js"/>
|
||||||
@ -83,7 +86,7 @@
|
|||||||
<separator class="thin"/>
|
<separator class="thin"/>
|
||||||
|
|
||||||
<html>&docCache;</html>
|
<html>&docCache;</html>
|
||||||
<box orient="vertical" autostretch="never" class="indent">
|
<box orient="vertical" autostretch="never" class="indent">
|
||||||
<radiogroup id="browserCacheCheckDocFrequency" orient="vertical" autostretch="never"
|
<radiogroup id="browserCacheCheckDocFrequency" orient="vertical" autostretch="never"
|
||||||
pref="true" preftype="int" prefstring="browser.cache.check_doc_frequency"
|
pref="true" preftype="int" prefstring="browser.cache.check_doc_frequency"
|
||||||
prefattribute="data">
|
prefattribute="data">
|
||||||
|
@ -16,7 +16,7 @@ var fontTypes = ["serif","sans-serif", /*"cursive", "fantasy",*/"monospace"];
|
|||||||
var variableSize, fixedSize, languageList;
|
var variableSize, fixedSize, languageList;
|
||||||
var languageData = [];
|
var languageData = [];
|
||||||
var currentLanguage;
|
var currentLanguage;
|
||||||
var bundle;
|
var gPrefutilitiesBundle;
|
||||||
|
|
||||||
// manual data retrieval function for PrefWindow
|
// manual data retrieval function for PrefWindow
|
||||||
function GetFields()
|
function GetFields()
|
||||||
@ -98,13 +98,13 @@ function Startup()
|
|||||||
fixedSize = document.getElementById( "sizeMono" );
|
fixedSize = document.getElementById( "sizeMono" );
|
||||||
languageList = document.getElementById( "selectLangs" );
|
languageList = document.getElementById( "selectLangs" );
|
||||||
|
|
||||||
bundle = srGetStrBundle("chrome://communicator/locale/pref/prefutilities.properties");
|
gPrefutilitiesBundle = document.getElementById("bundle_prefutilities");
|
||||||
|
|
||||||
// register our ok callback function
|
// register our ok callback function
|
||||||
parent.hPrefWindow.registerOKCallbackFunc( saveFontPrefs );
|
parent.hPrefWindow.registerOKCallbackFunc( saveFontPrefs );
|
||||||
|
|
||||||
// eventually we should detect the default language and select it by default
|
// eventually we should detect the default language and select it by default
|
||||||
selectLanguage();
|
selectLanguage();
|
||||||
}
|
}
|
||||||
|
|
||||||
function listElement( aListID )
|
function listElement( aListID )
|
||||||
@ -143,7 +143,8 @@ listElement.prototype =
|
|||||||
if( faces[i] == "" )
|
if( faces[i] == "" )
|
||||||
{
|
{
|
||||||
this.listElement.setAttribute( "data", faces[i] );
|
this.listElement.setAttribute( "data", faces[i] );
|
||||||
this.listElement.setAttribute( "value", bundle.GetStringFromName("nofontsforlang") );
|
this.listElement.setAttribute("value",
|
||||||
|
gPrefutilitiesBundle.getString("nofontsforlang"));
|
||||||
this.listElement.setAttribute( "disabled", "true" );
|
this.listElement.setAttribute( "disabled", "true" );
|
||||||
gNoFontsForThisLang = true; // hack, hack hack!
|
gNoFontsForThisLang = true; // hack, hack hack!
|
||||||
}
|
}
|
||||||
@ -255,7 +256,7 @@ function saveState()
|
|||||||
}
|
}
|
||||||
|
|
||||||
function selectLanguage()
|
function selectLanguage()
|
||||||
{
|
{
|
||||||
// save current state
|
// save current state
|
||||||
saveState();
|
saveState();
|
||||||
|
|
||||||
|
@ -32,7 +32,10 @@
|
|||||||
orient="vertical"
|
orient="vertical"
|
||||||
onload="parent.initPanel('chrome://communicator/content/pref/pref-fonts.xul');">
|
onload="parent.initPanel('chrome://communicator/content/pref/pref-fonts.xul');">
|
||||||
|
|
||||||
|
<stringbundle id="bundle_prefutilities"
|
||||||
|
src="chrome://communicator/locale/pref/prefutilities.properties"/>
|
||||||
<script type="application/x-javascript" src="chrome://communicator/content/pref/pref-fonts.js"/>
|
<script type="application/x-javascript" src="chrome://communicator/content/pref/pref-fonts.js"/>
|
||||||
|
<!-- XXX: Replace strres.js when prefutilities is converted -->
|
||||||
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
|
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
|
||||||
<script type="application/x-javascript" src="chrome://communicator/content/pref/prefutilities.js"/>
|
<script type="application/x-javascript" src="chrome://communicator/content/pref/prefutilities.js"/>
|
||||||
|
|
||||||
|
@ -27,11 +27,12 @@
|
|||||||
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-history.dtd" >
|
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-history.dtd" >
|
||||||
|
|
||||||
<window debug="false" xmlns:html="http://www.w3.org/1999/xhtml"
|
<window debug="false" xmlns:html="http://www.w3.org/1999/xhtml"
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
class="color-dialog"
|
class="color-dialog"
|
||||||
orient="vertical" title="&title.label;"
|
orient="vertical" title="&title.label;"
|
||||||
onload="parent.initPanel('chrome://communicator/content/pref/pref-history.xul');">
|
onload="parent.initPanel('chrome://communicator/content/pref/pref-history.xul');">
|
||||||
|
|
||||||
|
<!-- XXX: Replace strres.js when prefutilities is converted -->
|
||||||
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
|
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
|
||||||
<script type="application/x-javascript" src="chrome://communicator/content/pref/prefutilities.js"/>
|
<script type="application/x-javascript" src="chrome://communicator/content/pref/prefutilities.js"/>
|
||||||
<script type="application/x-javascript" src="chrome://global/content/nsJSComponentManager.js"/>
|
<script type="application/x-javascript" src="chrome://global/content/nsJSComponentManager.js"/>
|
||||||
@ -77,7 +78,7 @@
|
|||||||
|
|
||||||
<!-- history -->
|
<!-- history -->
|
||||||
<titledbox orient="vertical">
|
<titledbox orient="vertical">
|
||||||
<title><text value="&header3.label;"/></title>
|
<title><text value="&header3.label;"/></title>
|
||||||
<html>&historyPages.label;</html>
|
<html>&historyPages.label;</html>
|
||||||
<box autostretch="never">
|
<box autostretch="never">
|
||||||
<text class="label" value="&pageHis.label;" accesskey="&pageHis.accesskey;" for="histDay"/>
|
<text class="label" value="&pageHis.label;" accesskey="&pageHis.accesskey;" for="histDay"/>
|
||||||
@ -93,7 +94,7 @@
|
|||||||
|
|
||||||
<!-- no honey, I haven't been viewing porn, honest! -->
|
<!-- no honey, I haven't been viewing porn, honest! -->
|
||||||
<titledbox orient="vertical">
|
<titledbox orient="vertical">
|
||||||
<title><text value="&locationBarHistory.label;"/></title>
|
<title><text value="&locationBarHistory.label;"/></title>
|
||||||
<box autostretch="never">
|
<box autostretch="never">
|
||||||
<html flex="1">&clearLocationBar.label;</html>
|
<html flex="1">&clearLocationBar.label;</html>
|
||||||
<box autostretch="never" halign="right">
|
<box autostretch="never" halign="right">
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
style="width: 25em;height: 25em;">
|
style="width: 25em;height: 25em;">
|
||||||
|
|
||||||
<script type="application/x-javascript" src="pref-languages.js"/>
|
<script type="application/x-javascript" src="pref-languages.js"/>
|
||||||
|
<!-- XXX: Replace strres.js when pref-languages is converted -->
|
||||||
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
|
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
|
||||||
|
|
||||||
<keyset id="keyset"/>
|
<keyset id="keyset"/>
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
onload="Init();" orient="vertical">
|
onload="Init();" orient="vertical">
|
||||||
|
|
||||||
<script type="application/x-javascript" src="chrome://communicator/content/pref/pref-languages.js"/>
|
<script type="application/x-javascript" src="chrome://communicator/content/pref/pref-languages.js"/>
|
||||||
|
<!-- XXX: Replace strres.js when prefutilities (and pref-languages) is converted -->
|
||||||
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
|
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
|
||||||
<script type="application/x-javascript" src="chrome://communicator/content/pref/prefutilities.js"/>
|
<script type="application/x-javascript" src="chrome://communicator/content/pref/prefutilities.js"/>
|
||||||
<script type="application/x-javascript">
|
<script type="application/x-javascript">
|
||||||
@ -80,7 +81,7 @@
|
|||||||
oncommand="RemoveActiveLanguage();"/>
|
oncommand="RemoveActiveLanguage();"/>
|
||||||
</box>
|
</box>
|
||||||
</box>
|
</box>
|
||||||
</titledbox>
|
</titledbox>
|
||||||
<titledbox orient="vertical" autostretch="never">
|
<titledbox orient="vertical" autostretch="never">
|
||||||
<title value="&languages.customize.Charset.grouplabel;"/>
|
<title value="&languages.customize.Charset.grouplabel;"/>
|
||||||
<box autostretch="never">
|
<box autostretch="never">
|
||||||
|
@ -84,6 +84,7 @@
|
|||||||
|
|
||||||
]]>
|
]]>
|
||||||
</script>
|
</script>
|
||||||
|
<!-- XXX: Replace strres.js when prefutilities is converted -->
|
||||||
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
|
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
|
||||||
<script type="application/x-javascript" src="chrome://communicator/content/pref/prefutilities.js"/>
|
<script type="application/x-javascript" src="chrome://communicator/content/pref/prefutilities.js"/>
|
||||||
|
|
||||||
|
@ -28,11 +28,12 @@
|
|||||||
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-navigator.dtd" >
|
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-navigator.dtd" >
|
||||||
|
|
||||||
<window debug="false" xmlns:html="http://www.w3.org/1999/xhtml"
|
<window debug="false" xmlns:html="http://www.w3.org/1999/xhtml"
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
class="color-dialog"
|
class="color-dialog"
|
||||||
orient="vertical" title="&title.label;"
|
orient="vertical" title="&title.label;"
|
||||||
onload="parent.initPanel('chrome://communicator/content/pref/pref-navigator.xul');">
|
onload="parent.initPanel('chrome://communicator/content/pref/pref-navigator.xul');">
|
||||||
|
|
||||||
|
<!-- XXX: Replace strres.js when prefutilities is converted -->
|
||||||
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
|
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
|
||||||
<script type="application/x-javascript" src="chrome://communicator/content/pref/prefutilities.js"/>
|
<script type="application/x-javascript" src="chrome://communicator/content/pref/prefutilities.js"/>
|
||||||
<script type="application/x-javascript" src="chrome://global/content/nsJSComponentManager.js"/>
|
<script type="application/x-javascript" src="chrome://global/content/nsJSComponentManager.js"/>
|
||||||
@ -49,7 +50,7 @@
|
|||||||
|
|
||||||
<!-- navigator starts with -->
|
<!-- navigator starts with -->
|
||||||
<titledbox>
|
<titledbox>
|
||||||
<title value="&navRadio;"/>
|
<title value="&navRadio;"/>
|
||||||
|
|
||||||
<radiogroup id="startupPage" autostretch="never" orient="vertical"
|
<radiogroup id="startupPage" autostretch="never" orient="vertical"
|
||||||
pref="true" preftype="int" prefstring="browser.startup.page"
|
pref="true" preftype="int" prefstring="browser.startup.page"
|
||||||
@ -63,7 +64,7 @@
|
|||||||
|
|
||||||
<!-- homepage specification -->
|
<!-- homepage specification -->
|
||||||
<titledbox orient="vertical">
|
<titledbox orient="vertical">
|
||||||
<title value="&header2.label;"/>
|
<title value="&header2.label;"/>
|
||||||
<html>&homePageIntro.label;</html>
|
<html>&homePageIntro.label;</html>
|
||||||
<box autostretch="never">
|
<box autostretch="never">
|
||||||
<text class="label" value="&location.label;" accesskey="&location.accesskey;" for="browserStartupHomepage"/>
|
<text class="label" value="&location.label;" accesskey="&location.accesskey;" for="browserStartupHomepage"/>
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
function showManualProxyConfig()
|
function showManualProxyConfig()
|
||||||
{
|
{
|
||||||
var manualRow = document.getElementById("manual-proxy");
|
var manualRow = document.getElementById("manual-proxy");
|
||||||
bundle = srGetStrBundle("chrome://pref/locale/prefutilities.properties");
|
var prefutilitiesBundle = document.getElementById("bundle_prefutilities");
|
||||||
var viewHideButton = document.getElementById("viewhideManual");
|
var viewHideButton = document.getElementById("viewhideManual");
|
||||||
if( manualRow.style.display == "none" ) {
|
if( manualRow.style.display == "none" ) {
|
||||||
viewHideButton.value = bundle.GetStringFromName("hiderow");
|
viewHideButton.value = prefutilitiesBundle.getString("hiderow");
|
||||||
manualRow.style.display = "inherit";
|
manualRow.style.display = "inherit";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
viewHideButton.value = bundle.GetStringFromName("viewrow");
|
viewHideButton.value = prefutilitiesBundle.getString("viewrow");
|
||||||
manualRow.style.display = "none"
|
manualRow.style.display = "none"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,15 +36,18 @@
|
|||||||
<script type="application/x-javascript">
|
<script type="application/x-javascript">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
var _elementIDs = ["networkProxyType",
|
var _elementIDs = ["networkProxyType",
|
||||||
"networkProxyFTP", "networkProxyFTP_Port",
|
"networkProxyFTP", "networkProxyFTP_Port",
|
||||||
"networkProxyGopher", "networkProxyGopher_Port",
|
"networkProxyGopher", "networkProxyGopher_Port",
|
||||||
"networkProxyHTTP", "networkProxyHTTP_Port",
|
"networkProxyHTTP", "networkProxyHTTP_Port",
|
||||||
"networkProxySSL", "networkProxySSL_Port",
|
"networkProxySSL", "networkProxySSL_Port",
|
||||||
"networkProxySOCKS", "networkProxySOCKS_Port",
|
"networkProxySOCKS", "networkProxySOCKS_Port",
|
||||||
"networkProxyNone", "networkProxyAutoconfigURL"];
|
"networkProxyNone", "networkProxyAutoconfigURL"];
|
||||||
]]>
|
]]>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<stringbundle id="bundle_prefutilities"
|
||||||
|
src="chrome://pref/locale/prefutilities.properties"/>
|
||||||
|
<!-- XXX: Replace strres.js when prefutilities is converted -->
|
||||||
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
|
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
|
||||||
<script type="application/x-javascript" src="chrome://communicator/content/pref/prefutilities.js"/>
|
<script type="application/x-javascript" src="chrome://communicator/content/pref/prefutilities.js"/>
|
||||||
<script type="application/x-javascript" src="chrome://communicator/content/pref/pref-proxies.js"/>
|
<script type="application/x-javascript" src="chrome://communicator/content/pref/pref-proxies.js"/>
|
||||||
@ -119,7 +122,7 @@
|
|||||||
<textfield id="networkProxySOCKS_Port" pref="true" preftype="int" prefstring="network.proxy.socks_port"
|
<textfield id="networkProxySOCKS_Port" pref="true" preftype="int" prefstring="network.proxy.socks_port"
|
||||||
prefattribute="value" size="5"/>
|
prefattribute="value" size="5"/>
|
||||||
</box>
|
</box>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<text class="label" value="&noproxy.label;" accesskey="&noproxy.accesskey;" for="networkProxyNone"/>
|
<text class="label" value="&noproxy.label;" accesskey="&noproxy.accesskey;" for="networkProxyNone"/>
|
||||||
<textfield id="networkProxyNone" pref="true" preftype="string" prefstring="network.proxy.no_proxies_on"
|
<textfield id="networkProxyNone" pref="true" preftype="string" prefstring="network.proxy.no_proxies_on"
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
Rights Reserved.
|
Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Blake Ross <blakeross@telocity.com>
|
Blake Ross <blakeross@telocity.com>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
|
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
|
||||||
@ -34,17 +34,18 @@
|
|||||||
|
|
||||||
<window xmlns:html="http://www.w3.org/1999/xhtml"
|
<window xmlns:html="http://www.w3.org/1999/xhtml"
|
||||||
class="color-dialog"
|
class="color-dialog"
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
title="&title.label;"
|
title="&title.label;"
|
||||||
orient="vertical"
|
orient="vertical"
|
||||||
onload="parent.initPanel('chrome://communicator/content/pref/pref-smart_browsing.xul');">
|
onload="parent.initPanel('chrome://communicator/content/pref/pref-smart_browsing.xul');">
|
||||||
|
|
||||||
<script type="application/x-javascript" src="chrome://global/content/strres.js" />
|
<stringbundle id="bundle_region"
|
||||||
|
src="chrome://global-region/locale/region.properties"/>
|
||||||
<script type="application/x-javascript">
|
<script type="application/x-javascript">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
|
||||||
var _elementIDs = ["browserRelatedDisabledForDomains", "addDomain", "browserGoBrowsingEnabled", "browserAutoCompleteEnabled"];
|
var _elementIDs = ["browserRelatedDisabledForDomains", "addDomain",
|
||||||
|
"browserGoBrowsingEnabled", "browserAutoCompleteEnabled"];
|
||||||
|
|
||||||
function Startup()
|
function Startup()
|
||||||
{
|
{
|
||||||
@ -150,9 +151,8 @@
|
|||||||
function moreInfo()
|
function moreInfo()
|
||||||
{
|
{
|
||||||
var browserURL = null;
|
var browserURL = null;
|
||||||
var bundle = srGetStrBundle("chrome://global-region/locale/region.properties");
|
var regionBundle = document.getElementById("bundle_region");
|
||||||
if (bundle)
|
var smartBrowsingURL = regionBundle.getString("smartBrowsingURL");
|
||||||
var smartBrowsingURL = bundle.GetStringFromName("smartBrowsingURL");
|
|
||||||
if (smartBrowsingURL) {
|
if (smartBrowsingURL) {
|
||||||
try {
|
try {
|
||||||
var prefs = Components.classes["@mozilla.org/preferences;1"];
|
var prefs = Components.classes["@mozilla.org/preferences;1"];
|
||||||
@ -180,7 +180,7 @@
|
|||||||
<box class="box-smallheader" title="&lHeader;"/>
|
<box class="box-smallheader" title="&lHeader;"/>
|
||||||
|
|
||||||
<titledbox orient="vertical">
|
<titledbox orient="vertical">
|
||||||
<title><text value="&whatsRelated.label;"/></title>
|
<title><text value="&whatsRelated.label;"/></title>
|
||||||
|
|
||||||
<html id="doNotAcceptText">&doNotDecp.label;</html>
|
<html id="doNotAcceptText">&doNotDecp.label;</html>
|
||||||
|
|
||||||
@ -219,7 +219,7 @@
|
|||||||
</titledbox>
|
</titledbox>
|
||||||
|
|
||||||
<titledbox orient="vertical">
|
<titledbox orient="vertical">
|
||||||
<title><text value="&internetKeywordsHeader.label;"/></title>
|
<title><text value="&internetKeywordsHeader.label;"/></title>
|
||||||
|
|
||||||
<html>&internetKeywordsDescription.label;</html>
|
<html>&internetKeywordsDescription.label;</html>
|
||||||
|
|
||||||
@ -234,17 +234,13 @@
|
|||||||
</titledbox>
|
</titledbox>
|
||||||
|
|
||||||
<titledbox orient="vertical">
|
<titledbox orient="vertical">
|
||||||
<title><text value="&autoCompleteHeader.label;"/></title>
|
<title><text value="&autoCompleteHeader.label;"/></title>
|
||||||
|
<html>&autoCompleteDescription.label;</html>
|
||||||
<html>&autoCompleteDescription.label;</html>
|
<box autostretch="never">
|
||||||
|
<checkbox id="browserAutoCompleteEnabled" value="&autoCompleteEnabled.label;" accesskey="&autoCompleteEnabled.accesskey;"
|
||||||
<box autostretch="never">
|
pref="true" preftype="bool" prefstring="browser.urlbar.autocomplete.enabled"
|
||||||
<checkbox id="browserAutoCompleteEnabled" value="&autoCompleteEnabled.label;" accesskey="&autoCompleteEnabled.accesskey;"
|
prefattribute="checked"/>
|
||||||
pref="true" preftype="bool" prefstring="browser.urlbar.autocomplete.enabled"
|
<spring flex="1"/>
|
||||||
prefattribute="checked"/>
|
</box>
|
||||||
<spring flex="1"/>
|
</titledbox>
|
||||||
</box>
|
|
||||||
|
|
||||||
</titledbox>
|
|
||||||
|
|
||||||
</window>
|
</window>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// Theme Selector
|
// Theme Selector
|
||||||
// ( 05/09/2000, Ben Goodger <ben@netscape.com> )
|
// ( 05/09/2000, Ben Goodger <ben@netscape.com> )
|
||||||
|
|
||||||
var bundle = srGetStrBundle("chrome://communicator/locale/pref/prefutilities.properties");
|
var gPrefutilitiesBundle;
|
||||||
|
|
||||||
const DEBUG_USE_PROFILE = true;
|
const DEBUG_USE_PROFILE = true;
|
||||||
|
|
||||||
@ -16,6 +16,7 @@ catch(e) {}
|
|||||||
|
|
||||||
function Startup()
|
function Startup()
|
||||||
{
|
{
|
||||||
|
gPrefutilitiesBundle = document.getElementById("bundle_prefutilities");
|
||||||
var tree = document.getElementById( "skinsTree" );
|
var tree = document.getElementById( "skinsTree" );
|
||||||
var theSkinKids = document.getElementById("theSkinKids");
|
var theSkinKids = document.getElementById("theSkinKids");
|
||||||
if (theSkinKids.hasChildNodes() && theSkinKids.firstChild)
|
if (theSkinKids.hasChildNodes() && theSkinKids.firstChild)
|
||||||
@ -77,15 +78,15 @@ function themeSelect()
|
|||||||
description.removeChild(description.firstChild);
|
description.removeChild(description.firstChild);
|
||||||
description.appendChild(descText);
|
description.appendChild(descText);
|
||||||
var applyButton = document.getElementById("applySkin");
|
var applyButton = document.getElementById("applySkin");
|
||||||
var uninstallButton = document.getElementById("uninstallSkin");
|
var uninstallButton = document.getElementById("uninstallSkin");
|
||||||
var applyLabel = bundle.GetStringFromName("applyThemePrefix");
|
var applyLabel = gPrefutilitiesBundle.getString("applyThemePrefix");
|
||||||
var uninstallLabel = bundle.GetStringFromName("uninstallThemePrefix");
|
var uninstallLabel = gPrefutilitiesBundle.getString("uninstallThemePrefix");
|
||||||
applyLabel = applyLabel.replace(/%theme_name%/, themeName);
|
applyLabel = applyLabel.replace(/%theme_name%/, themeName);
|
||||||
uninstallLabel = uninstallLabel.replace(/%theme_name%/, themeName);
|
uninstallLabel = uninstallLabel.replace(/%theme_name%/, themeName);
|
||||||
applyButton.value = applyLabel;
|
applyButton.value = applyLabel;
|
||||||
uninstallButton.value = uninstallLabel;
|
uninstallButton.value = uninstallLabel;
|
||||||
var locType = selectedItem.getAttribute("loctype");
|
var locType = selectedItem.getAttribute("loctype");
|
||||||
uninstallButton.disabled = (locType == "install");
|
uninstallButton.disabled = (locType == "install");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,7 +35,8 @@
|
|||||||
onload="Startup()"
|
onload="Startup()"
|
||||||
orient="vertical">
|
orient="vertical">
|
||||||
|
|
||||||
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
|
<stringbundle id="bundle_prefutilities"
|
||||||
|
src="chrome://communicator/locale/pref/prefutilities.properties"/>
|
||||||
<script type="application/x-javascript" src="chrome://communicator/content/pref/pref-themes.js"/>
|
<script type="application/x-javascript" src="chrome://communicator/content/pref/pref-themes.js"/>
|
||||||
<script type="application/x-javascript" src="chrome://global/content/nsJSComponentManager.js"/>
|
<script type="application/x-javascript" src="chrome://global/content/nsJSComponentManager.js"/>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user