Adding content for chrome directory

This commit is contained in:
matt%netscape.com 1999-07-01 22:56:04 +00:00
Родитель 472ddb1331
Коммит fa69fc1e17
21 изменённых файлов: 4501 добавлений и 0 удалений

835
suite/browser/navigator.js Normal file
Просмотреть файл

@ -0,0 +1,835 @@
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; 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.
*/
var appCore = null;
var prefwindow = null;
var appCoreName = "";
var defaultStatus = "default status text";
var debugSecurity = false; // Set this true to enable Security chrome testing.
function Startup()
{
dump("Doing Startup...\n");
dump("Creating browser app core\n");
appCore = new BrowserAppCore();
if (appCore != null) {
dump("BrowserAppCore has been created.\n");
appCoreName = "BrowserAppCore." + ( new Date() ).getTime().toString();
appCore.Init( appCoreName );
appCore.setWebShellWindow(window);
appCore.setToolbarWindow(window);
tryToSetContentWindow();
}
}
function onLoadWithArgs() {
// See if Startup has been run.
if ( appCore ) {
// See if load in progress (loading default page).
if ( document.getElementById("Browser:Throbber").getAttribute("busy") == "true" ) {
dump( "Stopping load of default initial page\n" );
appCore.stop();
}
dump( "Loading page specified on ShowWindowWithArgs\n" );
appCore.loadInitialPage();
} else {
// onLoad handler timing is not correct yet.
dump( "onLoadWithArgs not needed yet\n" );
}
}
function tryToSetContentWindow() {
if ( window.frames[0].frames[1] ) {
dump("Setting content window\n");
appCore.setContentWindow( window.frames[0].frames[1] );
// Have browser app core load appropriate initial page.
var pref = Components.classes['component://netscape/preferences'];
// if all else fails, use trusty "about:" as the start page
var startpage = "about:";
if (pref) {
pref = pref.getService();
}
if (pref) {
pref = pref.QueryInterface(Components.interfaces.nsIPref);
}
if (pref) {
// from mozilla/modules/libpref/src/init/all.js
// 0 = blank
// 1 = home (browser.startup.homepage)
// 2 = last
// 3 = splash (browser.startup.splash)
choice = pref.GetIntPref("browser.startup.page");
switch (choice) {
case 0:
startpage = "about:blank";
break;
case 1:
startpage = pref.CopyCharPref("browser.startup.homepage");
break;
case 2:
var history = Components.classes['component://netscape/browser/global-history'];
if (history) {
history = history.getService();
}
if (history) {
history = history.QueryInterface(Components.interfaces.nsIGlobalHistory);
}
if (history) {
startpage = history.GetLastPageVisted();
}
break;
case 3:
startpage = pref.CopyCharPref("browser.startup.splash");
break;
default:
startpage = "about:";
}
}
document.getElementById("args").setAttribute("value", startpage);
appCore.loadInitialPage();
} else {
// Try again.
dump("Scheduling later attempt to set content window\n");
window.setTimeout( "tryToSetContentWindow()", 100 );
}
}
function Translate(src, dest)
{
var service = "http://levis.alis.com:8081";
service += "?AlisSourceLang=" + src;
service += "&AlisTargetLang=" + dest;
service += "&AlisMTEngine=SSI";
service += "&AlisTargetURI=" + window.frames[0].frames[1].location.href;
window.frames[0].frames[1].location.href = service;
}
function RefreshUrlbar()
{
//Refresh the urlbar bar
document.getElementById('urlbar').value = window.frames[0].frames[1].location.href;
}
function BrowserBack()
{
// Get a handle to the back-button
var bb = document.getElementById("canGoBack");
// If the button is disabled, don't bother calling in to Appcore
if ( (bb.getAttribute("disabled")) == "true" )
return;
if (appCore != null) {
dump("Going Back\n");
appCore.back();
} else {
dump("BrowserAppCore has not been created!\n");
}
}
function BrowserForward()
{
// Get a handle to the back-button
var fb = document.getElementById("canGoForward");
// If the button is disabled, don't bother calling in to Appcore
if ( (fb.getAttribute("disabled")) == "true" )
return;
if (appCore != null) {
dump("Going Forward\n");
appCore.forward();
} else {
dump("BrowserAppCore has not been created!\n");
}
}
function BrowserSetForward()
{
var forwardBElem = document.getElementById("canGoForward");
if (!forwardBElem) {
dump("Couldn't obtain handle to forward Broarcast element\n");
return;
}
var canForward = forwardBElem.getAttribute("disabled");
var fb = document.getElementById("forward-button");
if (!fb) {
dump("Could not obtain handle to forward button\n");
return;
}
// Enable/Disable the Forward button
if (canForward == "true") {
fb.setAttribute("disabled", "true");
}
else {
fb.setAttribute("disabled", "");
}
// Enable/Disable the Forward menu
var fm = document.getElementById("menuitem-forward");
if (!fm) {
dump("Couldn't obtain menu item Forward\n");
return;
}
// Enable/Disable the Forward Menuitem
if (canForward == "true") {
fm.setAttribute("disabled", "true");
}
else {
dump("Setting forward menu item enabled\n");
fm.setAttribute("disabled", "");
}
}
function BrowserCanStop() {
var stop = document.getElementById("canStop");
if ( stop ) {
var stopDisabled = stop.getAttribute("disabled");
var stopButton = document.getElementById( "stop-button" );
if ( stopButton ) {
if ( stopDisabled == "true") {
stopButton.setAttribute( "disabled", "true" );
} else {
stopButton.setAttribute( "disabled", "" );
}
}
}
}
function BrowserStop() {
// Get a handle to the "canStop" broadcast id
var stopBElem = document.getElementById("canStop");
if (!stopBElem) {
dump("Couldn't obtain handle to stop Broadcast element\n");
return;
}
var canStop = stopBElem.getAttribute("disabled");
var sb = document.getElementById("stop-button");
if (!sb) {
dump("Could not obtain handle to stop button\n");
return;
}
// If the stop button is currently disabled, just return
if ((sb.getAttribute("disabled")) == "true") {
return;
}
//Stop button has just been pressed. Disable it.
sb.setAttribute("disabled", "true");
// Get a handle to the stop menu item.
var sm = document.getElementById("menuitem-stop");
if (!sm) {
dump("Couldn't obtain menu item Stop\n");
} else {
// Disable the stop menu-item.
sm.setAttribute("disabled", "true");
}
//Call in to BrowserAppcore to stop the current loading
if (appCore != null) {
dump("Going to Stop\n");
appCore.stop();
} else {
dump("BrowserAppCore has not been created!\n");
}
}
function BrowserSetBack()
{
var backBElem = document.getElementById("canGoBack");
if (!backBElem) {
dump("Couldn't obtain handle to back Broadcast element\n");
return;
}
var canBack = backBElem.getAttribute("disabled");
var bb = document.getElementById("back-button");
if (!bb) {
dump("Could not obtain handle to back button\n");
return;
}
// Enable/Disable the Back button
if (canBack == "true") {
bb.setAttribute("disabled", "true");
}
else {
bb.setAttribute("disabled", "");
}
// Enable/Disable the Back menu
var bm = document.getElementById("menuitem-back");
if (!bm) {
dump("Couldn't obtain menu item Back\n");
return;
}
// Enable/Disable the Back Menuitem
if (canBack == "true") {
bm.setAttribute("disabled", "true");
}
else {
dump("Setting Back menuitem to enabled\n");
bm.setAttribute("disabled", "");
}
}
function BrowserHome()
{
window.frames[0].frames[1].home();
RefreshUrlbar();
}
function OpenBookmarkURL(node)
{
if (node.getAttribute('container') == "true") {
return false;
}
url = node.getAttribute('id');
// Ignore "NC:" urls.
if (url.substring(0, 3) == "NC:") {
return false;
}
window.frames[0].frames[1].location.href = url;
RefreshUrlbar();
}
function BrowserNewWindow()
{
if (appCore != null) {
dump("Opening New Window\n");
appCore.newWindow();
} else {
dump("BrowserAppCore has not been created!\n");
}
}
function BrowserNewEditorWindow()
{
core = XPAppCoresManager.Find("toolkitCore");
if ( !core ) {
core = new ToolkitCore();
if ( core ) {
core.Init("toolkitCore");
}
}
if ( core ) {
core.ShowWindowWithArgs( "chrome://editor/content", window, "chrome://editor/content/EditorInitPage.html" );
} else {
dump("Error; can't create toolkitCore\n");
}
}
function BrowserNewTextEditorWindow()
{
core = XPAppCoresManager.Find("toolkitCore");
if ( !core ) {
core = new ToolkitCore();
if ( core ) {
core.Init("toolkitCore");
}
}
if ( core ) {
core.ShowWindowWithArgs( "chrome://editor/content/TextEditorAppShell.xul", window, "chrome://editor/content/EditorInitPagePlain.html" );
} else {
dump("Error; can't create toolkitCore\n");
}
}
function BrowserEditPage(url)
{
core = XPAppCoresManager.Find("toolkitCore");
if ( !core ) {
core = new ToolkitCore();
if ( core ) {
core.Init("toolkitCore");
}
}
if ( core ) {
core.ShowWindowWithArgs( "chrome://editor/content", window, url);
} else {
dump("Error; can't create toolkitCore\n");
}
}
function BrowserOpenWindow()
{
core = XPAppCoresManager.Find("toolkitCore");
if ( !core ) {
core = new ToolkitCore();
if ( core ) {
core.Init("toolkitCore");
}
}
if ( core ) {
//core.ShowWindowWithArgs( "chrome:/navigator/content/openLocation.xul", window, appCoreName );
var name = appCoreName.replace( /\./, /\_/ );
// Note: Use width/height one less than actual so resizing occurs.
// This bypasses bug whereby dialog contents don't appear
// till the dialog is resized.
window.openDialog( "chrome:/navigator/chrome/openLocation.xul", name+"_openLocation", "chrome,width=419,height=189", appCoreName );
} else {
dump("Error; can't create toolkitCore\n");
}
}
function OpenFile(url) {
// This is invoked from the browser app core.
core = XPAppCoresManager.Find("toolkitCore");
if ( !core ) {
core = new ToolkitCore();
if ( core ) {
core.Init("toolkitCore");
}
}
if ( core ) {
core.ShowWindowWithArgs( "chrome://navigator/content/navigator.xul", window, url );
} else {
dump("Error; can't create toolkitCore\n");
}
}
function BrowserCopy()
{
if (appCore != null) {
dump("Copying\n");
appCore.copy();
} else {
dump("BrowserAppCore has not been created!\n");
}
}
function BrowserAddBookmark(url,title)
{
var bmks = Components.classes["component://netscape/browser/bookmarks-service"].getService();
bmks = bmks.QueryInterface(Components.interfaces.nsIBookmarksService);
bmks.AddBookmark(url, title);
}
function BrowserEditBookmarks()
{
var toolkitCore = XPAppCoresManager.Find("toolkitCore");
if (!toolkitCore) {
toolkitCore = new ToolkitCore();
if (toolkitCore) {
toolkitCore.Init("toolkitCore");
}
}
if (toolkitCore) {
toolkitCore.ShowWindow("resource://res/samples/bookmarks.xul",window);
}
}
function OpenHistoryView()
{
var toolkitCore = XPAppCoresManager.Find("toolkitCore");
if (!toolkitCore) {
toolkitCore = new ToolkitCore();
if (toolkitCore) {
toolkitCore.Init("toolkitCore");
}
}
if (toolkitCore) {
toolkitCore.ShowWindow("resource://res/samples/history.xul",window);
}
}
function BrowserPrintPreview()
{
// Borrowing this method to show how to
// dynamically change icons
dump("BrowserPrintPreview\n");
if (appCore != null) {
dump("Changing Icons\n");
appCore.printPreview();
} else {
dump("BrowserAppCore has not been created!\n");
}
}
function BrowserPrint()
{
// Borrowing this method to show how to
// dynamically change icons
if (appCore != null) {
appCore.print();
}
}
function BrowserSetDefaultCharacterSet(aCharset)
{
if (appCore != null) {
appCore.SetDocumentCharset(aCharset);
window.frames[0].frames[1].location.reload();
} else {
dump("BrowserAppCore has not been created!\n");
}
}
function BrowserClose()
{
dump("BrowserClose\n");
// Currently window.close doesn't work unless the window was opened from JS
// window.close();
core = XPAppCoresManager.Find("toolkitCore");
if ( !core ) {
core = new ToolkitCore();
if ( core ) {
core.Init("toolkitCore");
}
}
if ( core ) {
core.CloseWindow( window );
} else {
dump("Error can't create toolkitCore\n");
}
}
function BrowserExit()
{
if (appCore != null) {
dump("Exiting\n");
appCore.exit();
} else {
dump("BrowserAppCore has not been created!\n");
}
}
function BrowserFind() {
if (appCore != null) {
appCore.find();
} else {
dump("BrowserAppCore has not been created!\n");
}
}
function BrowserFindAgain() {
if (appCore != null) {
appCore.findNext();
} else {
dump("BrowserAppCore has not been created!\n");
}
}
function BrowserLoadURL()
{
if (appCore == null)
{
dump("BrowserAppCore has not been initialized\n");
return;
}
// rjc: added support for URL shortcuts (3/30/1999)
try {
var bmks = Components.classes["component://netscape/browser/bookmarks-service"].getService();
bmks = bmks.QueryInterface(Components.interfaces.nsIBookmarksService);
var shortcutURL = bmks.FindShortcut(document.getElementById('urlbar').value);
dump("FindShortcut: in='" + document.getElementById('urlbar').value + "' out='" + shortcutURL + "'\n");
if ((shortcutURL != null) && (shortcutURL != "")) {
document.getElementById('urlbar').value = shortcutURL;
}
}
catch (ex) {
// stifle any exceptions so we're sure to load the URL.
}
appCore.loadUrl(document.getElementById('urlbar').value);
}
function WalletEditor()
{
if (appCore != null) {
dump("Wallet Editor\n");
appCore.walletEditor(window);
} else {
dump("BrowserAppCore has not been created!\n");
}
}
function WalletSafeFillin()
{
if (appCore != null) {
dump("Wallet Safe Fillin\n");
appCore.walletPreview(window, window.frames[0].frames[1]);
} else {
dump("BrowserAppCore has not been created!\n");
}
}
function WalletChangePassword()
{
if (appCore != null) {
dump("Wallet Change Password\n");
appCore.walletChangePassword();
} else {
dump("BrowserAppCore has not been created!\n");
}
}
function WalletQuickFillin()
{
if (appCore != null) {
dump("Wallet Quick Fillin\n");
appCore.walletQuickFillin(window.frames[0].frames[1]);
} else {
dump("BrowserAppCore has not been created!\n");
}
}
function WalletSamples()
{
if (appCore != null) {
dump("Wallet Samples\n");
appCore.walletSamples();
} else {
dump("BrowserAppCore has not been created!\n");
}
}
function SignonViewer()
{
if (appCore != null) {
dump("Signon Viewer\n");
appCore.signonViewer(window);
} else {
dump("BrowserAppCore has not been created!\n");
}
}
function CookieViewer()
{
if (appCore != null) {
dump("Cookie Viewer\n");
appCore.cookieViewer(window);
} else {
dump("BrowserAppCore has not been created!\n");
}
}
function OpenMessenger()
{
var toolkitCore = XPAppCoresManager.Find("ToolkitCore");
if (!toolkitCore) {
toolkitCore = new ToolkitCore();
if (toolkitCore) {
toolkitCore.Init("ToolkitCore");
}
}
if (toolkitCore) {
toolkitCore.ShowWindow("chrome://messenger/content/",
window);
}
}
function OpenAddressbook()
{
var toolkitCore = XPAppCoresManager.Find("ToolkitCore");
if (!toolkitCore) {
toolkitCore = new ToolkitCore();
if (toolkitCore) {
toolkitCore.Init("ToolkitCore");
}
}
if (toolkitCore) {
toolkitCore.ShowWindow("chrome://addressbook/content/",
window);
}
}
function MsgNewMessage()
{
var toolkitCore = XPAppCoresManager.Find("ToolkitCore");
if (!toolkitCore) {
toolkitCore = new ToolkitCore();
if (toolkitCore) {
toolkitCore.Init("ToolkitCore");
}
}
if (toolkitCore) {
toolkitCore.ShowWindow("chrome://messengercompose/content/",
window);
}
}
function DoPreferences()
{
if (!prefwindow)
{
prefwindow = Components.classes['component://netscape/prefwindow'].createInstance(Components.interfaces.nsIPrefWindow);
}
prefwindow.showWindow("navigator.js", window, "chrome://pref/content/pref-appearance.xul");
}
function BrowserViewSource()
{
var toolkitCore = XPAppCoresManager.Find("ToolkitCore");
if (!toolkitCore) {
toolkitCore = new ToolkitCore();
if (toolkitCore) {
toolkitCore.Init("ToolkitCore");
}
}
if (toolkitCore) {
var url = window.frames[0].frames[1].location;
dump("Opening view of source for" + url + "\n");
toolkitCore.ShowWindowWithArgs("chrome:/navigator/content/viewSource.xul", window, url);
}
}
function OpenEditor()
{
var toolkitCore = XPAppCoresManager.Find("ToolkitCore");
if (!toolkitCore) {
toolkitCore = new ToolkitCore();
if (toolkitCore) {
toolkitCore.Init("ToolkitCore");
}
}
if (toolkitCore) {
toolkitCore.ShowWindowWithArgs("chrome://editor/content/EditorAppShell.xul",window,"chrome://editor/content/EditorInitPage.html");
}
}
var bindCount = 0;
function onStatus() {
var status = document.getElementById("Browser:Status");
if ( status ) {
var text = status.getAttribute("value");
if ( text == "" ) {
text = defaultStatus;
}
var statusText = document.getElementById("statusText");
if ( statusText ) {
statusText.setAttribute( "value", text );
}
} else {
dump("Can't find status broadcaster!\n");
}
}
function onSecurity() {
var security = document.getElementById("Browser:Security");
var indicator = document.getElementById("security-box");
var icon = document.getElementById("security-button");
if ( security.getAttribute("secure") == "true" ) {
indicator.setAttribute("class","secure");
icon.setAttribute("class","secure");
} else {
indicator.setAttribute("class","insecure");
icon.setAttribute("class","insecure");
}
}
function securityOn() {
// Set debugSecurity (at top of file) to turn this code on.
if ( !debugSecurity ) {
return;
}
var security = document.getElementById("Browser:Security");
if ( security.getAttribute("secure") == "false" ) {
security.setAttribute("secure","true");
}
}
function securityOff() {
var security = document.getElementById("Browser:Security");
if ( security.getAttribute("secure") == "true" ) {
security.setAttribute("secure","false");
}
}
function doTests() {
// Turn security on.
securityOn();
}
var startTime = 0;
function onProgress() {
var throbber = document.getElementById("Browser:Throbber");
var meter = document.getElementById("Browser:LoadingProgress");
if ( throbber && meter ) {
var busy = throbber.getAttribute("busy");
if ( busy == "true" ) {
mode = "undetermined";
if ( !startTime ) {
startTime = (new Date()).getTime();
}
} else {
mode = "normal";
}
meter.setAttribute("mode",mode);
if ( mode == "normal" ) {
var status = document.getElementById("Browser:Status");
if ( status ) {
var elapsed = ( (new Date()).getTime() - startTime ) / 1000;
var msg = "Document: Done (" + elapsed + " secs)";
dump( msg + "\n" );
status.setAttribute("value",msg);
defaultStatus = msg;
}
startTime = 0;
}
}
}
function dumpProgress() {
var broadcaster = document.getElementById("Browser:LoadingProgress");
var meter = document.getElementById("meter");
dump( "bindCount=" + bindCount + "\n" );
dump( "broadcaster mode=" + broadcaster.getAttribute("mode") + "\n" );
dump( "broadcaster value=" + broadcaster.getAttribute("value") + "\n" );
dump( "meter mode=" + meter.getAttribute("mode") + "\n" );
dump( "meter value=" + meter.getAttribute("value") + "\n" );
}
function ShowWindowFromResource( node )
{
var windowManager = Components.classes['component://netscape/rdf/datasource?name=window-mediator'].getService();
dump("got window Manager \n");
var windowManagerInterface = windowManager.QueryInterface( Components.interfaces.nsIWindowMediator);
dump("got interface \n");
var desiredWindow = null;
var url = node.getAttribute('id');
dump( url +" finding \n" );
desiredWindow = windowManagerInterface.GetWindowForResource( url );
dump( "got window \n");
if ( desiredWindow )
{
dump("focusing \n");
desiredWindow.focus();
}
}

737
suite/browser/navigator.xul Normal file
Просмотреть файл

@ -0,0 +1,737 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/xul.css" type="text/css"?>
<?xml-stylesheet href="chrome://navigator/skin/" type="text/css"?>
<!DOCTYPE window
[
<!ENTITY mainWindow.title "Mozilla">
<!ENTITY mainWindow.titlemodifier "Mozilla">
<!ENTITY mainWindow.titlemodifierseperator " - ">
<!ENTITY throbber.url "http://www.mozilla.org">
<!ENTITY fileMenu.label "File">
<!ENTITY browserCmd.label "New Browser Window">
<!ENTITY newMenu.label "New">
<!ENTITY newMailCmd.label "Mail Message">
<!ENTITY newChatCmd.label "Chat Window">
<!ENTITY newBlankPageCmd.label "Blank Window">
<!ENTITY newPageFromTemplateCmd.label "Page Using Template">
<!ENTITY newPageFromDraftCmd.label "Page using Draft">
<!ENTITY openCmd.label "Open">
<!ENTITY sendPageCmd.label "Send Page">
<!ENTITY editPageCmd.label "Edit Page">
<!ENTITY offlineMenu.label "Offline">
<!ENTITY offlineGoOfflineCmd.label "Go Offline">
<!ENTITY offlineSynchronizeCmd.label "Synchronize">
<!ENTITY printSetupCmd.label "Print Setup">
<!ENTITY printPreviewCmd.label "Print Preview">
<!ENTITY printCmd.label "Print">
<!ENTITY closeCmd.label "Close">
<!ENTITY quitCmd.label "Quit">
<!ENTITY editMenu.label "Edit">
<!ENTITY undoCmd.label "Undo">
<!ENTITY redoCmd.label "Redo">
<!ENTITY cutCmd.label "Cut">
<!ENTITY copyCmd.label "Copy">
<!ENTITY pasteCmd.label "Paste">
<!ENTITY deleteCmd.label "Delete">
<!ENTITY walletMenu.label "Wallet">
<!ENTITY walletSafeFillCmd.label "Safe Form Fill">
<!ENTITY walletQuickFillCmd.label "Quick Form Fill">
<!ENTITY walletContentsCmd.label "Wallet Contents">
<!ENTITY walletDisplaySignonsCmd.label "Display Signons">
<!ENTITY walletDisplayCookiesCmd.label "Display Cookies">
<!ENTITY walletSamplesCmd.label "Samples">
<!ENTITY walletChangePasswordCmd.label "Change Password">
<!ENTITY selectAllCmd.label "Select All">
<!ENTITY preferences.label "Preferences">
<!ENTITY viewMenu.label "View">
<!ENTITY toolbarsCmd.label "Toolbars">
<!ENTITY sidebarCmd.label "Sidebar">
<!ENTITY enlargeTextSizeCmd.label "Enlarge Text Size">
<!ENTITY reduceTextSizeCmd.label "Reduce Text Size">
<!ENTITY useStyleSheetMenu.label "Use Stylesheet">
<!ENTITY useStyleSheetDefaultCmd.label "Default">
<!ENTITY useStyleSheetEasyReadingCmd.label "Easy Reading">
<!ENTITY useStyleSheetMaxInfoCmd.label "Maximum Information">
<!ENTITY useStlyleSheetBizarreCmd.label "Bizarre">
<!ENTITY reloadCmd.label "Reload">
<!ENTITY showImagesCmd.label "Show Images">
<!ENTITY stopCmd.label "Stop">
<!ENTITY pageSourceCmd.label "Page Source">
<!ENTITY pageInfoCmd.label "Page Info">
<!ENTITY translateMenu.label "Translate">
<!ENTITY translateButton.label "Translate">
<!ENTITY translateEngtoFrenCmd.label "English to French">
<!ENTITY translateEngtoGermCmd.label "English to German">
<!ENTITY translateEngtoSpanCmd.label "English to Spanish">
<!ENTITY translateFrentoEngCmd.label "French to English">
<!ENTITY translateFrentoGermCmd.label "French to German">
<!ENTITY translateFrentoSpanCmd.label "French to Spanish">
<!ENTITY translateGermtoEngCmd.label "German to English">
<!ENTITY translateGermtoFrenCmd.label "German to French">
<!ENTITY translateGermtoSpanCmd.label "German to Spanish">
<!ENTITY tanslateSpantoEngCmd.label "Spanish to English">
<!ENTITY translateSpantoFrenCmd.label "Spanish to French">
<!ENTITY translateSpantoGermCmd.label "Spanish to German">
<!ENTITY dcharMenu.label "Character Set">
<!ENTITY dcharIso1Cmd.label "ISO Latin 1 (ISO-8859-1)">
<!ENTITY dcharIso2Cmd.label "ISO Latin 2 (ISO-8859-2)">
<!ENTITY dcharIso3Cmd.label "ISO Latin 3 (ISO-8859-3)">
<!ENTITY dcharIso4Cmd.label "ISO Latin 4 (ISO-8859-4)">
<!ENTITY dcharIso9Cmd.label "ISO Latin 5 (ISO-8859-9)">
<!ENTITY dcharIso10Cmd.label "ISO Latin 6 (ISO-8859-10)">
<!ENTITY dcharIso13Cmd.label "ISO Latin 7 (ISO-8859-13)">
<!ENTITY dcharIso14Cmd.label "ISO Latin 8 (ISO-8859-14)">
<!ENTITY dcharIso15Cmd.label "ISO Latin 9 (ISO-8859-15)">
<!ENTITY dcharWinLat2Cmd.label "Windows Latin 2 (windows-1250)">
<!ENTITY dcharWinLat1Cmd.label "Windows Latin 1 (windows-1252)">
<!ENTITY dcharWinLat5Cmd.label "Windows Latin 5 (windows-1254)">
<!ENTITY dcharWinBalRimCmd.label "Windows Baltic (windows-1257)">
<!ENTITY dcharMacRomCmd.label "Macintosh Roman">
<!ENTITY dcharMacCenEuroCmd.label "Macintosh Central European">
<!ENTITY dcharMacTurCmd.label "Macintosh Turkish">
<!ENTITY dcharMacCroaCmd.label "Macintosh Croatian">
<!ENTITY dcharMacRomanianCmd.label "Macintosh Romanian">
<!ENTITY dcharMacIceCmd.label "Macintosh Icelandic">
<!ENTITY dcharJapanCmd.label "Japanese JIS (ISO-2022-JP)">
<!ENTITY dcharJapanShiftjsCmd.label "Japanese (Shift_JIS)">
<!ENTITY dcharJapanEucCmd.label "Japanese (EUC-JP)">
<!ENTITY dcharTradChiBigCmd.label "Traditional Chinese (Big5)">
<!ENTITY dcharTriChiEucCmd.label "Traditional Chinese (EUC-TW)">
<!ENTITY dcharSimpChiGbCmd.label "Simplified Chinese (GB2312)">
<!ENTITY dcharKoreanCmd.label "Korean (EUC-KR)">
<!ENTITY dcharUtf7Cmd.label "Multilingual (UTF-7)">
<!ENTITY dcharUtf8Cmd.label "Multilingual (UTF-8)">
<!ENTITY dcharIsoCyrCmd.label "ISO Cyrillic (ISO-8859-5)">
<!ENTITY dcharEcmaCyrCmd.label "ECMA Cyrillic (ISO-IR-111)">
<!ENTITY dcharDosCyrCmd.label "DOS Cyrillic (IBM866)">
<!ENTITY dcharWinCyrCmd.label "Windows Cyrillic (windows-1251)">
<!ENTITY dcharMacCyrCmd.label "Macintosh Cyrillic">
<!ENTITY dcharMacUkrCmd.label "Macintosh Ukrainian">
<!ENTITY dcharRusCmd.label "Russian (KOI8-R)">
<!ENTITY dcharUkrCmd.label "Ukrainian (KOI8-U)">
<!ENTITY dcharIsoGreekCmd.label "ISO Greek (ISO-8859-7)">
<!ENTITY dcharWinGreekCmd.label "Windows Greek (windows-1253)">
<!ENTITY dcharMacGreekCmd.label "Macintosh Greek">
<!ENTITY dcharWinVietCmd.label "Windows Vietnamese (windows-1258)">
<!ENTITY dcharVietTcnCmd.label "Vietnamese (TCVN5712)">
<!ENTITY dcharVietViCmd.label "Vietnamese (VISCII)">
<!ENTITY dcharVieVpCmd.label "Vietnamese (VPS)">
<!ENTITY dcharThaiCmd.label "Thai (TIS-620)">
<!ENTITY dcharArmCmd.label "Armenian (ARMSCII-8)">
<!ENTITY dcharIso6Cmd.label ".ISO Arabic (ISO-8859-6)">
<!ENTITY dcharIso8Cmd.label ".ISO Hebrew (ISO-8859-8)">
<!ENTITY dcharCp1255Cmd.label "Windows Hebrew (windows-1255)">
<!ENTITY dcharCp1256Cmd.label "Windows Arabic (windows-1256)">
<!ENTITY searchMenu.label "Search">
<!ENTITY findOnCmd.label "Find On this page...">
<!ENTITY findAgainCmd.label "Find Again">
<!ENTITY searchParentCmd.label "Search Parent Item...">
<!ENTITY searchParenet2Cmd.label "Search Parent2 Item">
<!ENTITY appSpecificCmd.label "App Specific">
<!ENTITY searchInternetCmd.label "Search the Internet...">
<!ENTITY searchAllMailCmd.label "Search All Mail....">
<!ENTITY searchBookmarksCmd.label "Search Bookmarks...">
<!ENTITY searchPeopleCmd.label "Search People...">
<!ENTITY searchComputerCmd.label "Search on this Computer...">
<!ENTITY goMenu.label "Go">
<!ENTITY goBackCmd.label "Back">
<!ENTITY goForwardCmd.label "Forward">
<!ENTITY goHomeCmd.label "Home">
<!ENTITY goPrev1Cmd.label "Previous Site 1">
<!ENTITY goPrev2Cmd.label "Previous Site 2">
<!ENTITY goPrevnCmd.label "Previous Site n">
<!ENTITY bookmarksMenu.label "Bookmarks">
<!ENTITY addCurPageCmd.label "Add Current Page">
<!ENTITY manBookmarksCmd.label "Manage Bookmarks...">
<!ENTITY tasksMenu.label "Tasks">
<!ENTITY navigatorCmd.label "Navigator">
<!ENTITY messengerCmd.label "Messenger">
<!ENTITY editorCmd.label "Editor">
<!ENTITY textEditorCmd.label "Plaintext Editor">
<!ENTITY manageHistoryCmd.label "Manage History">
<!ENTITY chatCmd.label "Chat">
<!ENTITY shoppingCartCmd.label "Shopping Cart">
<!ENTITY toolsMenu.label "Tools">
<!ENTITY toolsPluginsInfoCmd.label "Plugins Info">
<!ENTITY toolsJavaConsoleCmd.label "Java/JS Console">
<!ENTITY toolsServerToolsCmd.label "Server Tools">
<!ENTITY toolsJsDebuggerCmd.label "JavaScipt Debugger">
<!ENTITY securityInfo.label "Security Info">
<!ENTITY helpMenuCmd.label "Help">
<!ENTITY helpContentsCmd.label "Help Contents">
<!ENTITY howTutorialCmd.label "How to Tutorial">
<!ENTITY helpChannelCmd.label "Help Channel">
<!ENTITY softwareUpdatesCmd.label "Software Updates">
<!ENTITY technicalSupportCmd.label "Technical Support">
<!ENTITY releaseNotesCmd.label "Release Notes">
<!ENTITY aboutCommunicatorCmd.label "About Communicator Prototype">
<!ENTITY debugMenu.label "Debug">
<!ENTITY debugVerCmd.label "Verification">
<!ENTITY ver1Cmd.label "Mozilla">
<!ENTITY ver2Cmd.label "Yahoo">
<!ENTITY ver3Cmd.label "Netscape">
<!ENTITY ver4Cmd.label "Excite">
<!ENTITY ver5Cmd.label "Microsoft">
<!ENTITY ver6Cmd.label "city.net">
<!ENTITY ver7Cmd.label "Mirabilis">
<!ENTITY ver8Cmd.label "Pathfinder">
<!ENTITY ver9Cmd.label "Warner Bros.">
<!ENTITY ver10Cmd.label "CNN">
<!ENTITY ver11Cmd.label "USA Today">
<!ENTITY ver12Cmd.label "Disney">
<!ENTITY ver13Cmd.label "Hotwired">
<!ENTITY ver14Cmd.label "Hotbot">
<!ENTITY ver15Cmd.label "Frames">
<!ENTITY ver16Cmd.label "Tables">
<!ENTITY ver17Cmd.label "Applets">
<!ENTITY ver18Cmd.label "JavaScript">
<!ENTITY ver19Cmd.label "GIF Images">
<!ENTITY ver20Cmd.label "JPEG Images">
<!ENTITY ver21Cmd.label "PNG Images">
<!ENTITY ver22Cmd.label "Transparency">
<!ENTITY ver23Cmd.label "Animation">
<!ENTITY ver24Cmd.label "Larger page">
<!ENTITY ver25Cmd.label "Smaller page">
<!ENTITY viewDemoMenu.label "Viewer Demos">
<!ENTITY demo0Cmd.label "#0 Basic Styles">
<!ENTITY demo1Cmd.label "#1 CSS Styles">
<!ENTITY demo2Cmd.label "#2 Images">
<!ENTITY demo3Cmd.label "#3 Basic Tables">
<!ENTITY demo4Cmd.label "#4 Simple Tables">
<!ENTITY demo5Cmd.label "#5 More Styles">
<!ENTITY demo6Cmd.label "#6 Deeply Nested Tables">
<!ENTITY demo7Cmd.label "#7 Scaled Anim Image">
<!ENTITY demo8Cmd.label "#8 Form">
<!ENTITY demo9Cmd.label "#9 Frames">
<!ENTITY demo10Cmd.label "#10 Anim Images">
<!ENTITY demo11Cmd.label "#11 Fixed Positioning">
<!ENTITY demo12Cmd.label "#12 More Fixed Pos">
<!ENTITY demo13Cmd.label "#13 DHTML">
<!ENTITY demo14Cmd.label "#14 XML Sorting">
<!ENTITY demo15Cmd.label "#15 XML IRS">
<!ENTITY demo16Cmd.label "#16 Gfx Widgets">
<!ENTITY xptkMenu.label "XPToolkit">
<!ENTITY xptk1Cmd.label "Tri-state checkbox">
<!ENTITY xptk2Cmd.label "Toolbar">
<!ENTITY xptk3Cmd.label "Tree">
<!ENTITY xptk4Cmd.label "Dialog">
<!ENTITY xptk5Cmd.label "Dialog w/ animation">
<!ENTITY xptk6Cmd.label "Tab">
<!ENTITY xptk7Cmd.label "Beep">
<!-- Toolbar items -->
<!ENTITY backButton.label "Back">
<!ENTITY forwardButton.label "Forward">
<!ENTITY reloadButton.label "Reload">
<!ENTITY stopButton.label "Stop">
<!ENTITY printButton.label "Print">
<!-- Toolbar items -->
<!ENTITY homeButton.label "Home">
<!ENTITY netscapeButton.label "Netscape">
<!ENTITY bugzillaButton.label "Bugzilla">
<!ENTITY tinderboxButton.label "Tinderbox">
<!-- Statusbar -->
<!ENTITY notifCom.label "[Notification Component]">
<!ENTITY statusText.label "Document: Done">
<!ENTITY buildId.label "Build ID: 1999061816">
<!ENTITY security-button.label "Secure Conn">
<!-- taskbar -->
<!ENTITY webButton.label "Web">
<!ENTITY mailButton.label "Mail">
<!ENTITY chatButton.label "Chat">
<!ENTITY dayplannerButton.label "DayPlanner">
<!ENTITY shoppingButton.label "Shopping">
<!ENTITY myDeskButton.label "My Desk">
<!ENTITY openWinButton.label "Open Windows">
]>
<window id="main-window" xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="Startup()"
onunload="if (appCore) appCore.close()"
title="&mainWindow.title;" titlemodifier="&mainWindow.titlemodifier;"
titleseperator ="&mainWindow.titlemodifierseperator;" windowtype="navigator:browser">
<html:script language="javascript" src="navigator.js">
</html:script>
<popup id="translationlist">
<menu>
<menuitem name="&translateEngtoFrenCmd.label;" onclick="Translate('en', 'fr');" />
<menuitem name="&translateEngtoGermCmd.label;" onclick="Translate('en', 'de');"/>
<menuitem name="&translateEngtoSpanCmd.label;" onclick="Translate('en', 'es');"/>
<separator />
<menuitem name="&translateFrentoEngCmd.label;" onclick="Translate('fr', 'en')"/>
<menuitem name="&translateFrentoGermCmd.label;" onclick="Translate('fr', 'de')"/>
<menuitem name="&translateFrentoSpanCmd.label;" onclick="Translate('fr', 'es')"/>
<separator />
<menuitem name="&translateGermtoEngCmd.label;" onclick="Translate('de', 'en')"/>
<menuitem name="&translateGermtoFrenCmd.label;" onclick="Translate('de', 'fr')"/>
<menuitem name="&translateGermtoSpanCmd.label;" onclick="Translate('de', 'es')"/>
<separator />
<menuitem name="&tanslateSpantoEngCmd.label;" onclick="Translate('es', 'en')"/>
<menuitem name="&translateSpantoFrenCmd.label;" onclick="Translate('es', 'fr')"/>
<menuitem name="&translateSpantoGermCmd.label;" onclick="Translate('es', 'de')"/>
</menu>
</popup>
<broadcaster id="canGoBack" disabled="true"/>
<broadcaster id="canGoForward" disabled="true"/>
<broadcaster id="canReload"/>
<broadcaster id="canStop"/>
<broadcaster id="canPrint"/>
<broadcaster id="Browser:LoadingProgress"/>
<broadcaster id="Browser:Status"/>
<broadcaster id="Browser:Security" secure="false"/>
<broadcaster id="Browser:Throbber" busy="false"/>
<broadcaster id="args" value=""/>
<!-- Interim hack to transition from nsIXULWindowCallbacks/ShowWindowWithArgs -->
<broadcaster id="dialog.start" ready="false"/>
<observes element="dialog.start" attribute="ready" onchange="onLoadWithArgs()"/>
<menubar chromeclass="menubar">
<menu name="&fileMenu.label;">
<menuitem name="&browserCmd.label;" onclick="BrowserNewWindow();"/>
<menu name="New">
<menuitem name="&newMailCmd.label;" onclick="MsgNewMessage();"/>
<menuitem name="&newChatCmd.label;" onclick=""/>
<separator />
<menuitem name="&newBlankPageCmd.label;" onclick="BrowserNewEditorWindow();"/>
<menuitem name="&newPageFromTemplateCmd.label;" onclick="BrowserNewWindow();"/>
<menuitem name="&newPageFromDraftCmd.label;" onclick="BrowserNewWindow();"/>
</menu>
<menuitem name="&openCmd.label;" onclick="BrowserOpenWindow();"/>
<separator />
<menuitem name="&sendPageCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&editPageCmd.label;" onclick="BrowserEditPage(window.frames[0].frames[1].location.href);" />
<separator />
<menu name="&offlineMenu.label;">
<menuitem name="&offlineGoOfflineCmd.label;" onclick="BrowserReload();"/>
<separator />
<menuitem name="&offlineSynchronizeCmd.label;" onclick="BrowserReload();"/>
</menu>
<separator />
<menuitem name="&printSetupCmd.label;" onclick=";"/>
<menuitem name="&printPreviewCmd.label;" onclick=""/>
<menuitem name="&printCmd.label;" onclick="BrowserPrint()"/>
<separator />
<menuitem name="&closeCmd.label;" onclick="BrowserClose();"/>
<menuitem name="&quitCmd.label;" onclick="BrowserExit();"/>
</menu>
<menu name="&editMenu.label;">
<menuitem name="&undoCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&redoCmd.label;" onclick="BrowserReload();"/>
<separator />
<menuitem name="&cutCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&copyCmd.label;" onclick="BrowserCopy();"/>
<menuitem name="&pasteCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&deleteCmd.label;" onclick="BrowserReload();"/>
<separator />
<menu name="&walletMenu.label;">
<menuitem name="&walletSafeFillCmd.label;" onclick="WalletSafeFillin();"/>
<menuitem name="&walletQuickFillCmd.label;" onclick="WalletQuickFillin();"/>
<separator />
<menuitem name="&walletContentsCmd.label;" onclick="WalletEditor();"/>
<menuitem name="&walletDisplaySignonsCmd.label;" onclick="SignonViewer();"/>
<menuitem name="&walletDisplayCookiesCmd.label;" onclick="CookieViewer();"/>
<separator />
<menuitem name="&walletSamplesCmd.label;" onclick="WalletSamples();"/>
<menuitem name="&walletChangePasswordCmd.label;" onclick="WalletChangePassword();"/>
</menu>
<separator />
<menuitem name="&selectAllCmd.label;" onclick="BrowserReload();"/>
<separator />
<menuitem name="&preferences.label;" onclick="DoPreferences();"/>
</menu>
<menu name="&viewMenu.label;">
<menuitem name="&toolbarsCmd.label;" onclick="toolbar.visible=true"/>
<menuitem name="&sidebarCmd.label;" onclick="BrowserReload();"/>
<separator />
<menuitem name="&enlargeTextSizeCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&reduceTextSizeCmd.label;" onclick="BrowserReload();"/>
<separator />
<menu name="&useStyleSheetMenu.label;" onclick="BrowserReload();">
<menuitem name="&useStyleSheetDefaultCmd.label;" onclick="BrowserReload();"/>
<separator />
<menuitem name="&useStyleSheetEasyReadingCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&useStyleSheetMaxInfoCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&useStlyleSheetBizarreCmd.label;" onclick="BrowserReload();"/>
</menu>
<separator />
<menuitem name="&reloadCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&showImagesCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&stopCmd.label;" id="menuitem-stop" onclick="BrowserStop();"/>
<separator />
<menuitem name="&pageSourceCmd.label;" onclick="BrowserViewSource();"/>
<menuitem name="&pageInfoCmd.label;" onclick="BrowserReload();"/>
<separator />
<menu name="&translateMenu.label;">
<menuitem name="&translateEngtoFrenCmd.label;" onclick="Translate('en', 'fr');"/>
<menuitem name="&translateEngtoGermCmd.label;" onclick="Translate('en', 'de');"/>
<menuitem name="&translateEngtoSpanCmd.label;" onclick="Translate('en', 'es');"/>
<separator />
<menuitem name="&translateFrentoEngCmd.label; " onclick="Translate('fr', 'en');"/>
<menuitem name="&translateFrentoGermCmd.label;" onclick="Translate('fr', 'de');"/>
<menuitem name="&translateFrentoSpanCmd.label;" onclick="Translate('fr', 'es');"/>
<separator />
<menuitem name="&translateGermtoEngCmd.label;" onclick="Translate('de', 'en');"/>
<menuitem name="&translateGermtoFrenCmd.label;" onclick="Translate('de', 'fr');"/>
<menuitem name="&translateGermtoSpanCmd.label;" onclick="Translate('de', 'es');"/>
<separator />
<menuitem name="&tanslateSpantoEngCmd.label;" onclick="Translate('es', 'en');"/>
<menuitem name="&translateSpantoFrenCmd.label;" onclick="Translate('es', 'fr');"/>
<menuitem name="&translateSpantoGermCmd.label;" onclick="Translate('es', 'de');"/>
</menu>
<menu name="&dcharMenu.label;">
<menuitem name="&dcharIso1Cmd.label;" onclick="BrowserSetDefaultCharacterSet('ISO-8859-1');"/>
<menuitem name="&dcharIso2Cmd.label;" onclick="BrowserSetDefaultCharacterSet('ISO-8859-2');"/>
<menuitem name="&dcharIso3Cmd.label;" onclick="BrowserSetDefaultCharacterSet('ISO-8859-3');"/>
<menuitem name="&dcharIso4Cmd.label;" onclick="BrowserSetDefaultCharacterSet('ISO-8859-4');"/>
<menuitem name="&dcharIso9Cmd.label;" onclick="BrowserSetDefaultCharacterSet('ISO-8859-9');"/>
<menuitem name="&dcharIso10Cmd.label;" onclick="BrowserSetDefaultCharacterSet('ISO-8859-10');"/>
<menuitem name="&dcharIso13Cmd.label;" onclick="BrowserSetDefaultCharacterSet('ISO-8859-13');"/>
<menuitem name="&dcharIso14Cmd.label;" onclick="BrowserSetDefaultCharacterSet('ISO-8859-14');"/>
<menuitem name="&dcharIso15Cmd.label;" onclick="BrowserSetDefaultCharacterSet('ISO-8859-15');"/>
<menuitem name="&dcharWinLat2Cmd.label;" onclick="BrowserSetDefaultCharacterSet('windows-1250');"/>
<menuitem name="&dcharWinLat1Cmd.label;" onclick="BrowserSetDefaultCharacterSet('windows-1252');"/>
<menuitem name="&dcharWinLat5Cmd.label;" onclick="BrowserSetDefaultCharacterSet('windows-1254');"/>
<menuitem name="&dcharWinBalRimCmd.label;" onclick="BrowserSetDefaultCharacterSet('windows-1257');"/>
<menuitem name="&dcharMacRomCmd.label;" onclick="BrowserSetDefaultCharacterSet('x-mac-roman');"/>
<menuitem name="&dcharMacCenEuroCmd.label;" onclick="BrowserSetDefaultCharacterSet('x-mac-ce');"/>
<menuitem name="&dcharMacTurCmd.label;" onclick="BrowserSetDefaultCharacterSet('x-mac-turkish');"/>
<menuitem name="&dcharMacCroaCmd.label;" onclick="BrowserSetDefaultCharacterSet('x-mac-croatian');"/>
<menuitem name="&dcharMacRomanianCmd.label;" onclick="BrowserSetDefaultCharacterSet('x-mac-romanian');"/>
<menuitem name="&dcharMacIceCmd.label;" onclick="BrowserSetDefaultCharacterSet('x-mac-icelandic');"/>
<separator />
<menuitem name="&dcharJapanCmd.label;" onclick="BrowserSetDefaultCharacterSet('ISO-2022-JP');"/>
<menuitem name="&dcharJapanShiftjsCmd.label;" onclick="BrowserSetDefaultCharacterSet('Shift_JIS');"/>
<menuitem name="&dcharJapanEucCmd.label;" onclick="BrowserSetDefaultCharacterSet('EUC-JP');"/>
<separator />
<menuitem name="&dcharTradChiBigCmd.label;" onclick="BrowserSetDefaultCharacterSet('Big5');"/>
<menuitem name="&dcharTriChiEucCmd.label;" onclick="BrowserSetDefaultCharacterSet('x-euc-tw');"/>
<menuitem name="&dcharSimpChiGbCmd.label;" onclick="BrowserSetDefaultCharacterSet('GB2312');"/>
<separator />
<menuitem name="&dcharKoreanCmd.label;" onclick="BrowserSetDefaultCharacterSet('EUC-KR');"/>
<separator />
<menuitem name="&dcharUtf7Cmd.label;" onclick="BrowserSetDefaultCharacterSet('UTF-7');"/>
<menuitem name="&dcharUtf8Cmd.label;" onclick="BrowserSetDefaultCharacterSet('UTF-8');"/>
<separator />
<menuitem name="&dcharIsoCyrCmd.label;" onclick="BrowserSetDefaultCharacterSet('ISO-8859-5');"/>
<menuitem name="&dcharEcmaCyrCmd.label;" onclick="BrowserSetDefaultCharacterSet('ISO-IR-111');"/>
<menuitem name="&dcharWinCyrCmd.label;" onclick="BrowserSetDefaultCharacterSet('windows-1251');"/>
<menuitem name="&dcharDosCyrCmd.label;" onclick="BrowserSetDefaultCharacterSet('IBM866');"/>
<menuitem name="&dcharMacCyrCmd.label;" onclick="BrowserSetDefaultCharacterSet('x-mac-cyrillic');"/>
<menuitem name="&dcharMacUkrCmd.label;" onclick="BrowserSetDefaultCharacterSet('x-mac-ukrainian');"/>
<menuitem name="&dcharRusCmd.label; " onclick="BrowserSetDefaultCharacterSet('KOI8-R');"/>
<menuitem name="&dcharUkrCmd.label;" onclick="BrowserSetDefaultCharacterSet('KOI8-U');"/>
<separator />
<menuitem name="&dcharIsoGreekCmd.label;" onclick="BrowserSetDefaultCharacterSet('ISO-8859-7');"/>
<menuitem name="&dcharWinGreekCmd.label;" onclick="BrowserSetDefaultCharacterSet('windows-1253');"/>
<menuitem name="&dcharMacGreekCmd.label;" onclick="BrowserSetDefaultCharacterSet('x-mac-greek');"/>
<separator />
<menuitem name="&dcharWinVietCmd.label;" onclick="BrowserSetDefaultCharacterSet('windows-1258');"/>
<menuitem name="&dcharVietTcnCmd.label;" onclick="BrowserSetDefaultCharacterSet('x-viet-tcvn5712');"/>
<menuitem name="&dcharVietViCmd.label;" onclick="BrowserSetDefaultCharacterSet('VISCII');"/>
<menuitem name="&dcharVieVpCmd.label;" onclick="BrowserSetDefaultCharacterSet('x-viet-vps');"/>
<separator />
<menuitem name="&dcharThaiCmd.label;" onclick="BrowserSetDefaultCharacterSet('TIS-620');"/>
<separator />
<menuitem name="&dcharArmCmd.label;" onclick="BrowserSetDefaultCharacterSet('ARMSCII-8');"/>
<separator />
<menuitem name="&dcharIso6Cmd.label;" onclick="BrowserSetDefaultCharacterSet('ISO-8859-6');"/>
<menuitem name="&dcharCp1256Cmd.label;" onclick="BrowserSetDefaultCharacterSet('windows-1256');"/>
<separator />
<menuitem name="&dcharIso8Cmd.label;" onclick="BrowserSetDefaultCharacterSet('ISO-8859-8');"/>
<menuitem name="&dcharCp1255Cmd.label;" onclick="BrowserSetDefaultCharacterSet('windows-1255');"/>
</menu>
</menu>
<menu name="&searchMenu.label;">
<menuitem name="&findOnCmd.label;" onclick="BrowserFind();"/>
<menuitem name="&findAgainCmd.label;" onclick="BrowserFindAgain();"/>
<separator />
<menuitem name="&searchParentCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&searchParenet2Cmd.label;" onclick="BrowserReload();"/>
<menuitem name="&appSpecificCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&appSpecificCmd.label;" onclick="BrowserReload();"/>
<separator />
<menuitem name="&searchInternetCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&searchAllMailCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&searchBookmarksCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&searchPeopleCmd.label;" onclick="BrowserReload();"/>
<separator />
<menuitem name="&searchComputerCmd.label;" onclick="BrowserReload();"/>
</menu>
<menu name="&goMenu.label;">
<menuitem id="menuitem-back" name="&goBackCmd.label;" onclick="BrowserBack();"/>
<menuitem id="menuitem-forward" name="&goForwardCmd.label;" onclick="BrowserForward();" />
<menuitem name="&goHomeCmd.label;" onclick="BrowserHome();"/>
<separator />
<menuitem name="&goPrev1Cmd.label;" onclick="BrowserBack();"/>
<menuitem name="&goPrev2Cmd.label;" onclick="BrowserBack();"/>
<menuitem name="&goPrevnCmd.label;" onclick="BrowserBack();"/>
</menu>
<menu name="&bookmarksMenu.label;" onclick="OpenBookmarkURL(event.target)"
datasources="rdf:bookmarks rdf:files rdf:find" id="NC:BookmarksRoot">
<template>
<rule iscontainer="true">
<menu uri="..." name="rdf:http://home.netscape.com/NC-rdf#Name"/>
</rule>
<rule rdf:type="http://home.netscape.com/NC-rdf#BookmarkSeparator">
<separator uri="..." />
</rule>
<rule>
<menuitem uri="..." name="rdf:http://home.netscape.com/NC-rdf#Name" onclick="OpenBookmarkURL(event.target)" />
</rule>
</template>
<menuitem name="&addCurPageCmd.label;" onclick="BrowserAddBookmark(window.frames[0].frames[1].location.href,window.frames[0].frames[1].document.title);"/>
<menuitem name="&manBookmarksCmd.label;" onclick="BrowserEditBookmarks();"/>
<separator/>
</menu>
<menu name="&tasksMenu.label;" onclick="ShowWindowFromResource(event.target)" datasources="rdf:window-mediator" id="NC:WindowMediatorRoot" open="true" >
<menuitem name="&navigatorCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&messengerCmd.label;" onclick="OpenMessenger();" />
<menuitem name="&editorCmd.label;" onclick="OpenEditor();" />
<menuitem name="&textEditorCmd.label;" onclick="BrowserNewTextEditorWindow();" />
<menuitem name="&manageHistoryCmd.label;" onclick="OpenHistoryView();" />
<menuitem name="&chatCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&shoppingCartCmd.label;" onclick="BrowserReload();"/>
<separator />
<menu name="&toolsMenu.label;">
<menuitem name="&toolsPluginsInfoCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&toolsJavaConsoleCmd.label;" onclick="BrowserReload();" />
<menuitem name="&toolsServerToolsCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&toolsJsDebuggerCmd.label;" onclick="BrowserReload();"/>
</menu>
<separator />
<menuitem name="&securityInfo.label;" onclick="BrowserReload();"/>
<separator/>
</menu>
<menu name="&helpMenuCmd.label;">
<menuitem name="&helpContentsCmd.label;" onclick="window.frames[0].frames[1].location.href = 'http://www.mozilla.org/projects/user-docs/local/browserhelp/browsertop.html'"/>
<separator />
<menuitem name="&howTutorialCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&helpChannelCmd.label;" onclick="BrowserReload();" />
<separator />
<menuitem name="&softwareUpdatesCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&technicalSupportCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&releaseNotesCmd.label;"
onclick="window.frames[0].frames[1].location.href='http://www.mozilla.org/projects/seamonkey/release-notes/index.html'"/>
<separator />
<menuitem name="&aboutCommunicatorCmd.label;"
onclick="window.frames[0].frames[1].location.href='http://www.mozilla.org/projects/seamonkey/release-notes/index.html'"/>
</menu>
// Menu for testing.
<menu name="&debugMenu.label;">
<menu name="&debugVerCmd.label;"> // Build verification sites.
<menuitem name="&ver1Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://www.mozilla.org'"/>
<menuitem name="&ver2Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://www.yahoo.com'"/>
<menuitem name="&ver3Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://www.netscape.com'"/>
<menuitem name="&ver4Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://www.excite.com'"/>
<menuitem name="&ver5Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://www.microsoft.com'"/>
<menuitem name="&ver6Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://www.city.net'"/>
<menuitem name="&ver7Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://www.mirabilis.com'"/>
<menuitem name="&ver8Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://www.pathfinder.com/welcome'"/>
<menuitem name="&ver9Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://www.warnerbros.com/home_moz3_day.html'"/>
<menuitem name="&ver10Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://www.cnn.com'"/>
<menuitem name="&ver11Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://www.usatoday.com'"/>
<menuitem name="&ver12Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://www.disney.go.com'"/>
<menuitem name="&ver13Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://www.hotwired.com'"/>
<menuitem name="&ver14Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://www.hotbot.com'"/>
<separator />
<menuitem name="&ver15Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://slip/projects/marvin/bft/browser/bft_frame_index.html'"/>
<menuitem name="&ver16Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test6.html'"/>
<menuitem name="&ver17Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://slip/projects/marvin/bft/browser/bft_browser_applet.htm'"/>
<menuitem name="&ver18Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://www.abcnews.com'"/>
<menuitem name="&ver19Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://slip/projects/marvin/bft/browser/bft_browser_imagemap.html'"/>
<menuitem name="&ver20Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test2.html'"/>
<menuitem name="&ver21Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://www.cdrom.com/pub/png/png-MagnoliaAlpha.html'"/>
<menuitem name="&ver22Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test13.html'"/>
<menuitem name="&ver23Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test2.html'"/>
<menuitem name="&ver24Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://slip/projects/marvin/bft/browser/bft_browser_html_mix3.html'"/>
<menuitem name="&ver25Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://slip/projects/marvin/bft/browser/bft_browser_link.html'"/>
</menu>
<menu name="&viewDemoMenu.label;"> // Viewer tests.
<menuitem name="&demo0Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test0.html'"/>
<menuitem name="&demo1Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test1.html'"/>
<menuitem name="&demo2Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test2.html'"/>
<menuitem name="&demo3Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test3.html'"/>
<menuitem name="&demo4Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test4.html'"/>
<menuitem name="&demo5Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test5.html'"/>
<menuitem name="&demo6Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test6.html'"/>
<menuitem name="&demo7Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test7.html'"/>
<menuitem name="&demo8Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test8.html'"/>
<menuitem name="&demo9Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test9.html'"/>
<menuitem name="&demo10Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test10.html'"/>
<menuitem name="&demo11Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test11.html'"/>
<menuitem name="&demo12Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test12.html'"/>
<menuitem name="&demo13Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test13.html'"/>
<menuitem name="&demo14Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test14.html'"/>
<menuitem name="&demo15Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test15.html'"/>
<menuitem name="&demo16Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test16.html'"/>
</menu>
<menu name="&xptkMenu.label;"> // XPToolkit tests.
<menuitem name="&xptk1Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/checkboxTest.xul'"/>
<menuitem name="&xptk2Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/toolbarTest1.xul'"/>
<menuitem name="&xptk3Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/treeTest1.xul'"/>
<menuitem name="&xptk4Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/dexsimplemaster.xul'"/>
<menuitem name="&xptk5Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/dexanimmaster.xul'"/>
<menuitem name="&xptk6Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/tab.xul'"/>
<menuitem name="&xptk7Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/beeptest.html'"/>
</menu>
</menu>
</menubar>
<box id="outer-box" align="vertical">
<toolbox>
<toolbar class="main-bar" chromeclass="toolbar">
<titledbutton id="back-button" align="bottom" value="&backButton.label;" onclick="BrowserBack()">
<observes element="canGoBack" attribute="disabled" onChange="BrowserSetBack()"/>
</titledbutton>
<titledbutton id="forward-button" align="bottom" value="&forwardButton.label;"
onclick="BrowserForward()">
<observes element="canGoForward" attribute="disabled" onChange="BrowserSetForward()"/>
</titledbutton>
<titledbutton id="reload-button" align="bottom" value="&reloadButton.label;"
onclick="window.frames[0].frames[1].location.reload()">
<observes element="canReload" attribute="disabled"/>
</titledbutton>
<titledbutton id="stop-button" align="bottom" value="&stopButton.label;"
onclick="BrowserStop()">
<observes element="canStop" attribute="disabled" onchange="BrowserCanStop()"/>
</titledbutton>
<box align="vertical" flex="100%">
<spring flex="100%"/>
<html:input id="urlbar" type="text" chromeclass="location" style="min-width: 100px; min-height: 25px; height: 20px"
onkeyup="if (event.which == 13) { BrowserLoadURL(); }"/>
<spring flex="100%"/>
</box>
<titledbutton id="translate-button" popup="translationlist" popupanchor="bottomleft" value="&translateButton.label;" align="bottom">
</titledbutton>
<titledbutton id="print-button" align="bottom" value="&printButton.label;"
onclick="BrowserPrint()">
<observes element="canPrint" attribute="disabled"/>
</titledbutton>
<titledbutton id="Throbber" onclick="window.frames[0].frames[1].location.href='&throbber.url;'">
<observes element="Browser:Throbber" attribute="busy"/>
</titledbutton>
</toolbar>
<toolbar class="main-bar" chromeclass="toolbar" datasources="rdf:bookmarks" id="NC:PersonalToolbarFolder">
<template>
<rule iscontainer="true">
<titledbutton uri="..." src="resource:/res/rdf/folder-closed.gif" value="rdf:http://home.netscape.com/NC-rdf#Name" align="right" />
</rule>
<rule>
<titledbutton uri="..." src="resource:/res/toolbar/TB_Location.gif" value="rdf:http://home.netscape.com/NC-rdf#Name" align="right" onclick="OpenBookmarkURL(event.target)" />
</rule>
</template>
<titledbutton id="home-button" align="right" value="&homeButton.label;"
onclick="BrowserHome()"/>
<titledbutton id="netscape-button" align="right" value="&netscapeButton.label;"
onclick="window.frames[0].frames[1].location.href='http://home.netscape.com'"/>
<spring flex="100%"/>
</toolbar>
</toolbox>
<html:iframe id="content-frame" src="contentframe.xul" flex="100%" />
<box align="horizontal" id="status-bar">
<titledbutton value="&notifCom.label;" onclick="doTests()"/>
<box id="security-box" class="insecure" align="horizontal" flex="100%">
<box align="vertical" style="width:100px">
<spring flex="100%"/>
<progressmeter id="statusbar-icon" mode="normal" value="0" onclick="dumpProgress()">
<observes element="Browser:LoadingProgress" attribute="mode"/>
<observes element="Browser:Throbber" attribute="busy" onchange="onProgress()"/>
</progressmeter>
<spring flex="100%"/>
</box>
<titledbutton id="statusText" align="right" flex="100%" value="&statusText.label;" style="font-family:sans-serif;font-size:2.5mm">
<observes element="Browser:Status" attribute="value" onchange="onStatus()"/>
</titledbutton>
<spring flex="100%"/>
<titledbutton align="right" value="&buildId.label;" style="font-family:sans-serif;font-size:2.5mm;"/>
<titledbutton id="security-button" class="insecure" value="&security-button.label;" align="right" onclick="securityOff();"/>
</box>
</box>
<toolbox>
<toolbar id="taskbar" chromeclass="status">
<popup id="samplePopup">
<menu><menuitem name="Sample Item One"/><menuitem name="Sample Item Two"/></menu>
</popup>
<box align="horizontal">
<titledbutton align="left" class="popup" popup="samplePopup"
popupanchor="topleft" popupalign="bottomleft" value="&webButton.label;" />
<titledbutton align="left" class="popup" popup="samplePopup"
popupanchor="topleft" popupalign="bottomleft" value="&mailButton.label;" />
<titledbutton align="left" class="popup" popup="samplePopup"
popupanchor="topleft" popupalign="bottomleft" value="&chatButton.label;" />
</box>
<spring flex="100%"/>
<box align="horizontal">
<titledbutton align="left" class="popup" popup="samplePopup"
popupanchor="topleft" popupalign="bottomleft" value="&dayplannerButton.label;" />
<titledbutton align="left" class="popup" popup="samplePopup"
popupanchor="topleft" popupalign="bottomleft" value="&shoppingButton.label;" />
<titledbutton align="left" class="popup" popup="samplePopup"
popupanchor="topleft" popupalign="bottomleft"
value="&myDeskButton.label;" />
</box>
<spring flex="100%"/>
<box align="horizontal">
<titledbutton align="left" class="popup" value="&openWinButton.label;" />
<titledbutton align="left" id="mini-nav" value="" />
<titledbutton align="left" id="mini-mail" value="" onclick="OpenMessenger()"/>
<titledbutton align="left" id="mini-addr" value="" onclick="OpenAddressbook()"/>
<titledbutton align="left" id="mini-comp" value="" />
</box>
</toolbar>
</toolbox>
</box>
</window>

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

@ -0,0 +1,285 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/xul.css" type="text/css"?>
<?xml-stylesheet href="chrome://navigator/skin/" type="text/css"?>
<!DOCTYPE window
[
<!ENTITY mainWindow.title "Mozilla">
<!ENTITY fileMenu.label "File">
<!ENTITY browserCmd.label "New Browser Window">
<!ENTITY newMenu.label "New">
<!ENTITY newMailCmd.label "Mail Message">
<!ENTITY newChatCmd.label "Chat Window">
<!ENTITY newBlankPageCmd.label "Chat Window">
<!ENTITY newPageFromTemplateCmd.label "Page Using Template">
<!ENTITY newPageFromDraftCmd.label "Page using Draft">
<!ENTITY openCmd.label "Open">
<!ENTITY sendPageCmd.label "Send Page">
<!ENTITY offlineMenu.label "Offline">
<!ENTITY offlineGoOfflineCmd.label "Go Offline">
<!ENTITY offlineSynchronizeCmd.label "Synchronize">
<!ENTITY printSetupCmd.label "Print Setup">
<!ENTITY printPreviewCmd.label "Print Preview">
<!ENTITY printCmd.label "Print">
<!ENTITY closeCmd.label ".Close">
<!ENTITY quitCmd.label "Quit">
<!ENTITY editMenu.label "Edit">
<!ENTITY undoCmd.label "Undo">
<!ENTITY redoCmd.label "Redo">
<!ENTITY cutCmd.label "Cut">
<!ENTITY copyCmd.label "Copy">
<!ENTITY pasteCmd.label "Paste">
<!ENTITY deleteCmd.label "Delete">
<!ENTITY walletMenu.label "Wallet">
<!ENTITY walletSafeFillCmd.label "Safe Form Fill">
<!ENTITY walletQuickFillCmd.label "Quick Form Fill">
<!ENTITY walletContentsCmd.label "Wallet Contents">
<!ENTITY walletDisplaySignonsCmd.label "Display Signons">
<!ENTITY walletDisplayCookiesCmd.label "Display Cookies">
<!ENTITY walletSamplesCmd.label "Samples">
<!ENTITY walletChangePasswordCmd.label "Change Password">
<!ENTITY selectAllCmd.label "Select All">
<!ENTITY preferences.label "Preferences">
<!ENTITY viewMenu.label "View">
<!ENTITY toolbarsCmd.label "Toolbars">
<!ENTITY sidebarCmd.label "Sidebar">
<!ENTITY enlargeTextSizeCmd.label "Enlarge Text Size">
<!ENTITY reduceTextSizeCmd.label "Reduce Text Size">
<!ENTITY useStyleSheetMenu.label "Use Stylesheet">
<!ENTITY useStyleSheetDefaultCmd.label "Default">
<!ENTITY useStyleSheetEasyReadingCmd.label "Easy Reading">
<!ENTITY useStyleSheetMaximumInformationCmd.label "Maximum Information">
<!ENTITY useStlyleSheetBizarreCmd.label "Bizarre">
<!ENTITY reloadCmd.label "Reload">
<!ENTITY showImagesCmd.label "Show Images">
<!ENTITY stopCmd.label "Stop">
<!ENTITY pageSourceCmd.label "Page Source">
<!ENTITY pageInfoCmd.label "Page Info">
<!ENTITY charSetMenu.label "Character Set">
<!ENTITY charWesternCmd.label "Latin1">
<!ENTITY charJapaneseCmd.label "Japanese (ISO-2022-JP)">
<!ENTITY charShiftJisCmd.label "Shift_JIS">
<!ENTITY charEupCmd.label "EUC-JP">
<!ENTITY searchMenu.label "Search">
<!ENTITY findOnCmd.label "Find On this page...">
<!ENTITY findAgainCmd.label "Find Again">
<!ENTITY searchParentCmd.label "Search Parent Item...">
<!ENTITY searchParenet2Cmd.label "Search Parent2 Item">
<!ENTITY appSpecificCmd.label "App Specific">
<!ENTITY searchInternetCmd.label "Search the Internet...">
<!ENTITY searchAllMailCmd.label "Search All Mail....">
<!ENTITY searchBookmarksCmd.label "Search Bookmarks...">
<!ENTITY searchPeopleCmd.label "Search People...">
<!ENTITY searchComputerCmd.label "Search on this Computer...">
<!ENTITY goMenu.label "Menu">
<!ENTITY goBackCmd.label "Go Back">
<!ENTITY goForwardCmd.label "Go Forward">
<!ENTITY goHomeCmd.label "Home">
<!ENTITY tasksMenu.label "Tasks">
<!ENTITY navigatorCmd.label "Navigator">
<!ENTITY messengerCmd.label "Messenger">
<!ENTITY editorCmd.label "Editor">
<!ENTITY manageHistoryCmd.label "Manage History">
<!ENTITY chatCmd.label "Chat">
<!ENTITY shoppingCartCmd.label "Shopping Cart">
<!ENTITY toolsMenu.label "Tools">
<!ENTITY toolsPluginsInfoCmd.label "Plugins Info">
<!ENTITY toolsJavaConsoleCmd.label "Java/JS Console">
<!ENTITY toolsServerToolsCmd.label "Server Tools">
<!ENTITY toolsJavascriptDebuggerCmd.label "JavaScipt Debugger">
<!ENTITY securityInfo.label "Security Info">
<!ENTITY window1Cmd.label "Window 1">
<!ENTITY window2Cmd.label "Window 2">
<!ENTITY window3Cmd.label "Window 3">
<!ENTITY helpMenuCmd.label "Help">
<!ENTITY helpContentsCmd.label "Help Contents">
<!ENTITY howTutorialCmd.label "How to Tutorial">
<!ENTITY helpChannelCmd.label "Help Channel">
<!ENTITY softwareUpdatesCmd.label "Software Updates">
<!ENTITY technicalSupportCmd.label "Technical Support">
<!ENTITY releaseNotesCmd.label "Release Notes">
<!ENTITY aboutCommunicatorCmd.label "About Communicator Prototype">
]>
<window id="main-window" xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onunload="if (appCore) appCore.close()"
title="Mozilla">
<html:script src="navigator.js"></html:script>
<html:script src="viewsource.js"></html:script>
<broadcaster id="args" value="http://www.mozilla.org/"/>
<broadcaster id="canPrint"/>
<broadcaster id="canGoBack" disabled="true"/>
<broadcaster id="Browser:LoadingProgress"/>
<broadcaster id="Browser:Status"/>
<broadcaster id="Browser:OnStartBinding"/>
<broadcaster id="Browser:OnStopBinding"/>
<broadcaster id="Browser:Throbber" busy="false"/>
<!-- Interim hack to transition from nsIXULWindowCallbacks/ShowWindowWithArgs -->
<broadcaster id="dialog.start" ready="false"/>
<observes element="dialog.start" attribute="ready" onchange="StartupViewSource()"/>
<menubar>
<menu name="&fileMenu.label;">
<menuitem name="&browserCmd.label;" onclick="BrowserNewWindow();"/>
<menu name="&newMenu.label;">
<menuitem name="&newMailCmd.label;" onclick="MsgNewMessage();"/>
<menuitem name="&newChatCmd.label;" onclick=""/>
<separator />
<menuitem name="&newBlankPageCmd.label;" onclick="BrowserNewWindow();"/>
<menuitem name="&newPageFromTemplateCmd.label;" onclick="BrowserNewWindow();"/>
<menuitem name="&newPageFromDraftCmd.label;" onclick="BrowserNewWindow();"/>
</menu>
<menuitem name="&openCmd.label;" onclick="BrowserOpenWindow();"/>
<separator />
<menuitem name="&sendPageCmd.label;" onclick="NotImplementedYet();"/>
<separator />
<menu name="&offlineMenu.label;">
<menuitem name="&offlineGoOfflineCmd.label;" onclick="NotImplementedYet();"/>
<separator />
<menuitem name="&offlineSynchronizeCmd.label;" onclick="NotImplementedYet();"/>
</menu>
<separator />
<menuitem name="&printSetupCmd.label;" onclick=";"/>
<menuitem name="&printPreviewCmd.label;" onclick=""/>
<menuitem name="&printCmd.label;" onclick="BrowserPrint()"/>
<separator />
<menuitem name="closeCmd.label" onclick="BrowserClose();"/>
<menuitem name="quitCmd.label" onclick="BrowserExit();"/>
</menu>
<menu name="&editMenu.label;">
<menuitem name="&undoCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&redoCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<separator />
<menuitem name="&cutCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&copyCmd.label;" onclick="BrowserCopy();"/>
<menuitem name="&pasteCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&deleteCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<separator />
<menuitem name="&selectAllCmd.label;" onclick="NotImplementedYet();"/>
<separator />
<menuitem name="&preferences.label;" onclick="DoPreferences();"/>
</menu>
<menu name="&viewMenu.label;">
<menuitem name="&toolbarsCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&sidebarCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<separator />
<menuitem name="&enlargeTextSizeCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="Reduce Text Size" onclick="NotImplementedYet();" disabled=""/>
<separator />
<menu name="&useStyleSheetMenu.label;" onclick="NotImplementedYet();">
<menuitem name="&useStyleSheetDefaultCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<separator />
<menuitem name="&useStyleSheetEasyReadingCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&useStyleSheetMaximumInformationCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&useStlyleSheetBizarreCmd.label;" onclick="NotImplementedYet();" disabled=""/>
</menu>
<separator />
<menuitem name="&reloadCmd.label;" onclick="BrowserReload();" disabled=""/>
<menuitem name="&showImagesCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&stopCmd.label;" onclick="NotImplementedYet();"/>
<separator />
<menuitem name="&pageSourceCmd.label;" onclick="BrowserViewSource();" disabled=""/>
<menuitem name="&pageInfoCmd.label;" onclick="NotImplementedYet();"/>
<separator />
<menu name="&charSetMenu.label;">
<menuitem name="&charWesternCmd.label;" onclick="BrowserSetDocumentCharacterSet('ISO-8859-1');"/>
<menuitem name="&charJapaneseCmd.label;" onclick="BrowserSetDocumentCharacterSet('ISO-2022-JP');"/>
<menuitem name="&charShiftJisCmd.label;" onclick="BrowserSetDocumentCharacterSet('Shift_JIS');"/>
<menuitem name="&charEupCmd.label;" onclick="BrowserSetDocumentCharacterSet('EUC-JP');"/>
</menu>
</menu>
<menu name="&searchMenu.label;">
<menuitem name="&findOnCmd.label;" onclick="BrowserFind();;" disabled=""/>
<menuitem name="&findAgainCmd.label;" onclick="BrowserFindAgain();" disabled=""/>
<separator />
<menuitem name="&searchParentCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&searchParenet2Cmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&appSpecificCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&appSpecificCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<separator />
<menuitem name="&searchInternetCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&searchAllMailCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&searchBookmarksCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&searchPeopleCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<separator />
<menuitem name="&searchComputerCmd.label;" onclick="NotImplementedYet();" disabled=""/>
</menu>
<menu name="&goMenu.label;">
<menuitem name="&goBackCmd.label;" onclick="BrowserBack();" disabled=""/>
<menuitem name="&goForwardCmd.label;" onclick="BrowserForward();" disabled=""/>
<menuitem name="&goHomeCmd.label;" onclick="BrowserHome();" disabled=""/>
</menu>
<menu name="&tasksMenu.label;">
<menuitem name="&navigatorCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&messengerCmd.label;" onclick="OpenMessenger();" />
<menuitem name="&editorCmd.label;" onclick="OpenEditor();" />
<menuitem name="&manageHistoryCmd.label;" onclick="OpenHistoryView();" />
<menuitem name="&chatCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&shoppingCartCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menu name="&toolsMenu.label;">
<menuitem name="&toolsPluginsInfoCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&toolsServerToolsCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&toolsJavaConsoleCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&toolsJavascriptDebuggerCmd.label;" onclick="NotImplementedYet();" disabled=""/>
</menu>
<separator />
<menuitem name="&securityInfo.label;" onclick="NotImplementedYet();" disabled=""/>
<separator/>
<menuitem name="&window1Cmd.label;" onclick="NotImplementedYet();" key="1" disabled=""/>
<menuitem name="&window2Cmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&window3Cmd.label;" onclick="NotImplementedYet();" disabled=""/>
</menu>
<menu name="&helpMenuCmd.label;">
<menuitem name="&helpContentsCmd.label;" onclick="window.frames[0].location.href = 'http://www.mozilla.org/projects/user-docs/local/browserhelp/browsertop.html'" disabled=""/>
<separator />
<menuitem name="&howTutorialCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&helpChannelCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<separator />
<menuitem name="&softwareUpdatesCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&technicalSupportCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&releaseNotesCmd.label;"
onclick="window.frames[0].location.href='http://www.mozilla.org/projects/seamonkey/release-notes/index.html'" disabled=""/>
<separator />
<menuitem name="&aboutCommunicatorCmd.label;"
onclick="window.frames[0].location.href='http://www.mozilla.org/projects/seamonkey/release-notes/index.html'" disabled=""/>
</menu>
</menubar>
<box id="outer-box" align="vertical">
<html:iframe id="content-frame" type="content" html:name="content" html:src="about:blank" flex="100%"/>
<box align="horizontal" id="status-bar">
<box id="security-box" class="insecure" align="horizontal" flex="100%">
<box align="vertical" style="width:100px">
<spring flex="100%"/>
<progressmeter id="statusbar-icon" mode="normal" value="0" onclick="dumpProgress()">
<observes element="Browser:LoadingProgress" attribute="mode"/>
<observes element="Browser:Throbber" attribute="busy" onchange="onProgress()"/>
</progressmeter>
<spring flex="100%"/>
</box>
<titledbutton id="statusText" align="right" flex="100%" value="Document: Done" style="font-family:sans-serif;font-size:2.5mm">
<observes element="Browser:Status" attribute="value" onchange="onStatus()"/>
</titledbutton>
<spring flex="100%"/>
<titledbutton align="right" value="Build ID: 1999040601" style="font-family:sans-serif;font-size:2.5mm;"/>
</box>
</box>
</box>
</window>

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

@ -0,0 +1,17 @@
function StartupViewSource() {
// Generate unique name (var appCoreName declared in navigator.js).
appCoreName = "ViewSource." + ( new Date() ).getTime().toString();
// Create and initialize the browser app core.
appCore = new BrowserAppCore();
appCore.Init( appCoreName );
appCore.setContentWindow(window.frames[0]);
appCore.setWebShellWindow(window);
appCore.setToolbarWindow(window);
// Get url whose source to view.
var url = document.getElementById("args").getAttribute("value");
// Load the source (the app core will magically know what to do).
appCore.loadUrl(url);
}

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

@ -0,0 +1,47 @@
# Generated automatically from Makefile.in by configure.
#!gmake
#
# 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.
DEPTH = ../../../..
topsrcdir = ../../../..
srcdir = .
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/config.mk
include $(topsrcdir)/config/rules.mk
EXPORT_RESOURCE_CONTENT = \
$(srcdir)/contentframe.js \
$(srcdir)/openLocation.js \
$(srcdir)/viewsource.js \
$(srcdir)/contentframe.xul \
$(srcdir)/navigator.xul \
$(srcdir)/navigator.js \
$(srcdir)/openLocation.xul \
$(srcdir)/viewSource.xul \
$(srcdir)/NetSupportConfirm.xul \
$(srcdir)/NetSupportAlert.xul \
$(srcdir)/NetSupportConfirmCheck.xul \
$(srcdir)/NetSupportPassword.xul \
$(srcdir)/NetSupportUserPassword.xul \
$(NULL)
install::
$(INSTALL) $(EXPORT_RESOURCE_CONTENT) $(DIST)/bin/chrome/browser/content/default

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

@ -0,0 +1,47 @@
#!gmake
#
# 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.
DEPTH = ../../../..
topsrcdir = @top_srcdir@
VPATH = @srcdir@
srcdir = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/config.mk
include $(topsrcdir)/config/rules.mk
EXPORT_RESOURCE_CONTENT = \
$(srcdir)/contentframe.js \
$(srcdir)/openLocation.js \
$(srcdir)/viewsource.js \
$(srcdir)/contentframe.xul \
$(srcdir)/navigator.xul \
$(srcdir)/navigator.js \
$(srcdir)/openLocation.xul \
$(srcdir)/viewSource.xul \
$(srcdir)/NetSupportConfirm.xul \
$(srcdir)/NetSupportAlert.xul \
$(srcdir)/NetSupportConfirmCheck.xul \
$(srcdir)/NetSupportPassword.xul \
$(srcdir)/NetSupportUserPassword.xul \
$(NULL)
install::
$(INSTALL) $(EXPORT_RESOURCE_CONTENT) $(DIST)/bin/chrome/browser/content/default

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

@ -0,0 +1,13 @@
contentframe.js
openLocation.js
viewsource.js
contentframe.xul
navigator.xul
navigator.js
openLocation.xul
viewSource.xul
NetSupportConfirm.xul
NetSupportAlert.xul
NetSupportConfirmCheck.xul
NetSupportPassword.xul
NetSupportUserPassword.xul

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

@ -0,0 +1,67 @@
<?xml version="1.0"?>
<?xml-stylesheet href="xul.css" type="text/css"?>
<window xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:xul ="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
>
<data>
<broadcaster id="NetDialog:Message"/>
</data>
<dialog>
<observes element="NetDialog:Message" attribute="text" onchange="onUpdate()"/>
</dialog>
<html:script>
function onUpdate()
{
dump("onUpate \n");
var msg = document.getElementById("NetDialog:Message");
if ( msg)
{
var text = msg.getAttribute("text");
dump( text +"\n" );
var prompt = (document.getElementById("message"));
if ( prompt )
{
dump(" setting message \n" );
prompt.childNodes[0].nodeValue = text;
}
}
var msg = document.getElementById("NetDialog:CheckMessage");
if ( msg)
{
var text = msg.getAttribute("text");
dump( text +"\n" );
var prompt = (document.getElementById("checkmessage"));
if ( prompt )
{
dump(" setting message \n" );
prompt.childNodes[0].nodeValue = text;
}
}
}
</html:script>
<html:table>
<html:tr >
<html:td>
<html:img html:src="resource:/res/samples/alertl.gif"></html:img>
</html:td>
<html:td>
<html:span id="message">m</html:span>
</html:td>
</html:tr>
<html:tr>
<html:td></html:td>
<html:td html:align="justify">
<html:button id="OKButton"> OK </html:button> </html:td>
</html:tr>
</html:table>
</window>

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

@ -0,0 +1,56 @@
<?xml version="1.0"?>
<?xml-stylesheet href="xul.css" type="text/css"?>
<!DOCTYPE window>
<window xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:xul ="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
>
<data>
<broadcaster id="NetDialog:Message"/>
</data>
<dialog>
<observes element="NetDialog:Message" attribute="text" onchange="onUpdate()"/>
</dialog>
<html:script>
function onUpdate()
{
dump("onUpate \n");
var msg = document.getElementById("NetDialog:Message");
if ( msg)
{
var text = msg.getAttribute("text");
dump( text +"\n" );
var prompt = (document.getElementById("message"));
if ( prompt )
{
dump(" setting message \n" );
prompt.childNodes[0].nodeValue = text;
}
}
}
</html:script>
<html:table>
<html:tr >
<html:td html:colspan="2" >
<html:span id="message">message text here </html:span>
</html:td>
</html:tr>
<html:tr>
<html:td html:valign="middle"></html:td>
<html:td>
<html:input html:name="Password" html:type="password" html:id="Password" > </html:input>
</html:td>
</html:tr>
<html:tr>
<html:td></html:td>
<html:td html:align="justify">
<html:button id ="CancelButton"> Cancel </html:button>
<html:button id="OKButton"> OK </html:button> </html:td>
</html:tr>
</html:table>
</window>

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

@ -0,0 +1,55 @@
<?xml version="1.0"?>
<?xml-stylesheet href="xul.css" type="text/css"?>
<!DOCTYPE window>
<window xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:xul ="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
>
<data>
<broadcaster id="NetDialog:Message"/>
</data>
<dialog>
<observes element="NetDialog:Message" attribute="text" onchange="onUpdate()"/>
</dialog>
<html:script>
function onUpdate()
{
dump("onUpate \n");
var msg = document.getElementById("NetDialog:Message");
if ( msg)
{
var text = msg.getAttribute("text");
dump( text +"\n" );
var prompt = (document.getElementById("message"));
if ( prompt )
{
dump(" setting message \n" );
prompt.childNodes[0].nodeValue = text;
}
}
}
</html:script>
<html:table>
<html:tr >
<html:td html:colspan="2" >
<html:span id="message">message text here </html:span>
</html:td>
</html:tr>
<html:tr>
<html:td html:valign ="middle">User: </html:td>
<html:td><html:input html:name="User" html:type="text" html:id="User" > </html:input>
</html:td>
</html:tr>
<html:tr>
<html:td></html:td>
<html:td html:align="justify">
<html:button id ="CancelButton"> Cancel </html:button>
<html:button id="OKButton"> OK </html:button> </html:td>
</html:tr>
</html:table>
</window>

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

@ -0,0 +1,61 @@
<?xml version="1.0"?>
<?xml-stylesheet href="xul.css" type="text/css"?>
<!DOCTYPE window>
<window xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:xul ="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
>
<data>
<broadcaster id="NetDialog:Message"/>
</data>
<dialog>
<observes element="NetDialog:Message" attribute="text" onchange="onUpdate()"/>
</dialog>
<html:script>
function onUpdate()
{
dump("onUpate \n");
var msg = document.getElementById("NetDialog:Message");
if ( msg)
{
var text = msg.getAttribute("text");
dump( text +"\n" );
var prompt = (document.getElementById("message"));
if ( prompt )
{
dump(" setting message \n" );
prompt.childNodes[0].nodeValue = text;
}
}
}
</html:script>
<html:table>
<html:tr >
<html:td html:colspan="2" >
<html:span id="message">message text here </html:span>
</html:td>
</html:tr>
<html:tr>
<html:td html:valign ="middle">User: </html:td>
<html:td><html:input html:name="User" html:type="text" html:id="User" > </html:input>
</html:td>
</html:tr>
<html:tr>
<html:td html:valign="middle">Password:</html:td>
<html:td>
<html:input html:name="Password" html:type="password" html:id="Password" > </html:input>
</html:td>
</html:tr>
<html:tr>
<html:td></html:td>
<html:td html:align="justify">
<html:button id ="CancelButton"> Cancel </html:button>
<html:button id="OKButton"> OK </html:button> </html:td>
</html:tr>
</html:table>
</window>

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

@ -0,0 +1,55 @@
<?xml version="1.0"?>
<?xml-stylesheet href="xul.css" type="text/css"?>
<window xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:xul ="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
>
<data>
<broadcaster id="NetDialog:Message"/>
</data>
<dialog>
<observes element="NetDialog:Message" attribute="text" onchange="onUpdate()"/>
</dialog>
<html:script>
function onUpdate()
{
dump("onUpate \n");
var msg = document.getElementById("NetDialog:Message");
if ( msg)
{
var text = msg.getAttribute("text");
dump( text +"\n" );
var prompt = (document.getElementById("message"));
if ( prompt )
{
dump(" setting message \n" );
prompt.childNodes[0].nodeValue = text;
}
}
}
</html:script>
<html:table>
<html:tr >
<html:td>
<html:img html:src="resource:/res/samples/questionl.gif"></html:img>
</html:td>
<html:td>
<html:span id="message">m</html:span>
</html:td>
</html:tr>
<html:tr>
<html:td></html:td>
<html:td html:align="justify">
<html:button id ="CancelButton"> Cancel </html:button>
<html:button id="OKButton"> OK </html:button> </html:td>
</html:tr>
</html:table>
</window>

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

@ -0,0 +1,89 @@
// -*- Mode: Java -*-
var sidebarURI = 'resource:/res/rdf/sidebar-browser.xul';
var isSidebarOpen = false;
function Init() {
var pref = Components.classes['component://netscape/preferences'];
if (pref) {
pref = pref.getService();
}
if (pref) {
pref = pref.QueryInterface(Components.interfaces.nsIPref);
}
if (pref) {
pref.SetDefaultIntPref('sidebar.width', 170);
// pref.SetIntPref(pref.GetIntPref('sidebar.width'));
pref.SetDefaultBoolPref('sidebar.open', false);
pref.SavePrefFile();
if (pref.GetBoolPref('sidebar.open')) {
toggleOpenClose();
}
}
}
function toggleOpenClose() {
// Get the open width and update the pref state
var pref = Components.classes['component://netscape/preferences'];
if (pref) {
pref = pref.getService();
}
if (pref) {
pref = pref.QueryInterface(Components.interfaces.nsIPref);
}
var width = 0;
if (pref) {
pref.SetBoolPref('sidebar.open', !isSidebarOpen);
width = pref.GetIntPref('sidebar.width');
pref.SavePrefFile();
}
if (isSidebarOpen)
{
// Close it
var container = document.getElementById('container');
var sidebar = container.firstChild;
sidebar.setAttribute('style','width:0px; visibility:hidden');
sidebar.setAttribute('src','about:blank');
//container.removeChild(container.firstChild);
var grippy = document.getElementById('grippy');
grippy.setAttribute('open','');
isSidebarOpen = false;
}
else
{
// Open it
var container = document.getElementById('container');
var sidebar = container.firstChild;
sidebar.setAttribute('style','width:' + width + 'px; visibility:visible');
sidebar.setAttribute('src',sidebarURI);
//var sidebar = document.createElement('html:iframe');
//sidebar.setAttribute('src','resource:/res/rdf/sidebar-browser.xul');
//sidebar.setAttribute('class','sidebarframe');
//container.insertBefore(sidebar,container.firstChild);
//container.appendChild(sidebar);
var grippy = document.getElementById('grippy');
grippy.setAttribute('open','true');
isSidebarOpen = true;
}
}
// To get around "window.onload" not working in viewer.
function Boot()
{
var root = document.documentElement;
if (root == null) {
setTimeout(Boot, 0);
} else {
Init();
}
}
setTimeout('Boot()', 0);

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

@ -0,0 +1,22 @@
<?xml version="1.0"?>
<?xml-stylesheet href="resource:/res/samples/xul.css" type="text/css"?>
<?xml-stylesheet href="chrome://global/skin/contentframe.css" type="text/css"?>
<!DOCTYPE window>
<window style="height:100%;width:100%"
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<html:script src="contentframe.js" />
<box id="container" align="horizontal" style="height: 100%; width: 100%">
<html:iframe id="sidebarframe" class="sidebarframe"
src="about:blank" />
<box align="vertical" style="height: 100%;">
<titledbutton id="grippy" class="grippy" onclick="toggleOpenClose();"
flex="100%" />
</box>
<html:iframe type="content" id="content" src="about:blank" flex="100%" />
</box>
</window>

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

@ -0,0 +1,41 @@
#!nmake
#
# 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.
DEPTH=..\..\..\..
include <$(DEPTH)\config\rules.mak>
DISTBROWSWER=$(DIST)\bin\chrome\navigator\content\default
install::
$(MAKE_INSTALL) contentframe.js $(DISTBROWSWER)
$(MAKE_INSTALL) openLocation.js $(DISTBROWSWER)
$(MAKE_INSTALL) openLocation.xul $(DISTBROWSWER)
$(MAKE_INSTALL) viewsource.js $(DISTBROWSWER)
$(MAKE_INSTALL) viewSource.xul $(DISTBROWSWER)
$(MAKE_INSTALL) contentframe.xul $(DISTBROWSWER)
$(MAKE_INSTALL) navigator.xul $(DISTBROWSWER)
$(MAKE_INSTALL) navigator.js $(DISTBROWSWER)
$(MAKE_INSTALL) NetSupportConfirm.xul $(DISTBROWSWER)
$(MAKE_INSTALL) NetSupportAlert.xul $(DISTBROWSWER)
$(MAKE_INSTALL) NetSupportConfirmCheck.xul $(DISTBROWSWER)
$(MAKE_INSTALL) NetSupportPassword.xul $(DISTBROWSWER)
$(MAKE_INSTALL) NetSupportUserPassword.xul $(DISTBROWSWER)
clobber::
rm -f $(DIST)\bin\chrome\navigator\content\default\*.*

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

@ -0,0 +1,835 @@
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; 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.
*/
var appCore = null;
var prefwindow = null;
var appCoreName = "";
var defaultStatus = "default status text";
var debugSecurity = false; // Set this true to enable Security chrome testing.
function Startup()
{
dump("Doing Startup...\n");
dump("Creating browser app core\n");
appCore = new BrowserAppCore();
if (appCore != null) {
dump("BrowserAppCore has been created.\n");
appCoreName = "BrowserAppCore." + ( new Date() ).getTime().toString();
appCore.Init( appCoreName );
appCore.setWebShellWindow(window);
appCore.setToolbarWindow(window);
tryToSetContentWindow();
}
}
function onLoadWithArgs() {
// See if Startup has been run.
if ( appCore ) {
// See if load in progress (loading default page).
if ( document.getElementById("Browser:Throbber").getAttribute("busy") == "true" ) {
dump( "Stopping load of default initial page\n" );
appCore.stop();
}
dump( "Loading page specified on ShowWindowWithArgs\n" );
appCore.loadInitialPage();
} else {
// onLoad handler timing is not correct yet.
dump( "onLoadWithArgs not needed yet\n" );
}
}
function tryToSetContentWindow() {
if ( window.frames[0].frames[1] ) {
dump("Setting content window\n");
appCore.setContentWindow( window.frames[0].frames[1] );
// Have browser app core load appropriate initial page.
var pref = Components.classes['component://netscape/preferences'];
// if all else fails, use trusty "about:" as the start page
var startpage = "about:";
if (pref) {
pref = pref.getService();
}
if (pref) {
pref = pref.QueryInterface(Components.interfaces.nsIPref);
}
if (pref) {
// from mozilla/modules/libpref/src/init/all.js
// 0 = blank
// 1 = home (browser.startup.homepage)
// 2 = last
// 3 = splash (browser.startup.splash)
choice = pref.GetIntPref("browser.startup.page");
switch (choice) {
case 0:
startpage = "about:blank";
break;
case 1:
startpage = pref.CopyCharPref("browser.startup.homepage");
break;
case 2:
var history = Components.classes['component://netscape/browser/global-history'];
if (history) {
history = history.getService();
}
if (history) {
history = history.QueryInterface(Components.interfaces.nsIGlobalHistory);
}
if (history) {
startpage = history.GetLastPageVisted();
}
break;
case 3:
startpage = pref.CopyCharPref("browser.startup.splash");
break;
default:
startpage = "about:";
}
}
document.getElementById("args").setAttribute("value", startpage);
appCore.loadInitialPage();
} else {
// Try again.
dump("Scheduling later attempt to set content window\n");
window.setTimeout( "tryToSetContentWindow()", 100 );
}
}
function Translate(src, dest)
{
var service = "http://levis.alis.com:8081";
service += "?AlisSourceLang=" + src;
service += "&AlisTargetLang=" + dest;
service += "&AlisMTEngine=SSI";
service += "&AlisTargetURI=" + window.frames[0].frames[1].location.href;
window.frames[0].frames[1].location.href = service;
}
function RefreshUrlbar()
{
//Refresh the urlbar bar
document.getElementById('urlbar').value = window.frames[0].frames[1].location.href;
}
function BrowserBack()
{
// Get a handle to the back-button
var bb = document.getElementById("canGoBack");
// If the button is disabled, don't bother calling in to Appcore
if ( (bb.getAttribute("disabled")) == "true" )
return;
if (appCore != null) {
dump("Going Back\n");
appCore.back();
} else {
dump("BrowserAppCore has not been created!\n");
}
}
function BrowserForward()
{
// Get a handle to the back-button
var fb = document.getElementById("canGoForward");
// If the button is disabled, don't bother calling in to Appcore
if ( (fb.getAttribute("disabled")) == "true" )
return;
if (appCore != null) {
dump("Going Forward\n");
appCore.forward();
} else {
dump("BrowserAppCore has not been created!\n");
}
}
function BrowserSetForward()
{
var forwardBElem = document.getElementById("canGoForward");
if (!forwardBElem) {
dump("Couldn't obtain handle to forward Broarcast element\n");
return;
}
var canForward = forwardBElem.getAttribute("disabled");
var fb = document.getElementById("forward-button");
if (!fb) {
dump("Could not obtain handle to forward button\n");
return;
}
// Enable/Disable the Forward button
if (canForward == "true") {
fb.setAttribute("disabled", "true");
}
else {
fb.setAttribute("disabled", "");
}
// Enable/Disable the Forward menu
var fm = document.getElementById("menuitem-forward");
if (!fm) {
dump("Couldn't obtain menu item Forward\n");
return;
}
// Enable/Disable the Forward Menuitem
if (canForward == "true") {
fm.setAttribute("disabled", "true");
}
else {
dump("Setting forward menu item enabled\n");
fm.setAttribute("disabled", "");
}
}
function BrowserCanStop() {
var stop = document.getElementById("canStop");
if ( stop ) {
var stopDisabled = stop.getAttribute("disabled");
var stopButton = document.getElementById( "stop-button" );
if ( stopButton ) {
if ( stopDisabled == "true") {
stopButton.setAttribute( "disabled", "true" );
} else {
stopButton.setAttribute( "disabled", "" );
}
}
}
}
function BrowserStop() {
// Get a handle to the "canStop" broadcast id
var stopBElem = document.getElementById("canStop");
if (!stopBElem) {
dump("Couldn't obtain handle to stop Broadcast element\n");
return;
}
var canStop = stopBElem.getAttribute("disabled");
var sb = document.getElementById("stop-button");
if (!sb) {
dump("Could not obtain handle to stop button\n");
return;
}
// If the stop button is currently disabled, just return
if ((sb.getAttribute("disabled")) == "true") {
return;
}
//Stop button has just been pressed. Disable it.
sb.setAttribute("disabled", "true");
// Get a handle to the stop menu item.
var sm = document.getElementById("menuitem-stop");
if (!sm) {
dump("Couldn't obtain menu item Stop\n");
} else {
// Disable the stop menu-item.
sm.setAttribute("disabled", "true");
}
//Call in to BrowserAppcore to stop the current loading
if (appCore != null) {
dump("Going to Stop\n");
appCore.stop();
} else {
dump("BrowserAppCore has not been created!\n");
}
}
function BrowserSetBack()
{
var backBElem = document.getElementById("canGoBack");
if (!backBElem) {
dump("Couldn't obtain handle to back Broadcast element\n");
return;
}
var canBack = backBElem.getAttribute("disabled");
var bb = document.getElementById("back-button");
if (!bb) {
dump("Could not obtain handle to back button\n");
return;
}
// Enable/Disable the Back button
if (canBack == "true") {
bb.setAttribute("disabled", "true");
}
else {
bb.setAttribute("disabled", "");
}
// Enable/Disable the Back menu
var bm = document.getElementById("menuitem-back");
if (!bm) {
dump("Couldn't obtain menu item Back\n");
return;
}
// Enable/Disable the Back Menuitem
if (canBack == "true") {
bm.setAttribute("disabled", "true");
}
else {
dump("Setting Back menuitem to enabled\n");
bm.setAttribute("disabled", "");
}
}
function BrowserHome()
{
window.frames[0].frames[1].home();
RefreshUrlbar();
}
function OpenBookmarkURL(node)
{
if (node.getAttribute('container') == "true") {
return false;
}
url = node.getAttribute('id');
// Ignore "NC:" urls.
if (url.substring(0, 3) == "NC:") {
return false;
}
window.frames[0].frames[1].location.href = url;
RefreshUrlbar();
}
function BrowserNewWindow()
{
if (appCore != null) {
dump("Opening New Window\n");
appCore.newWindow();
} else {
dump("BrowserAppCore has not been created!\n");
}
}
function BrowserNewEditorWindow()
{
core = XPAppCoresManager.Find("toolkitCore");
if ( !core ) {
core = new ToolkitCore();
if ( core ) {
core.Init("toolkitCore");
}
}
if ( core ) {
core.ShowWindowWithArgs( "chrome://editor/content", window, "chrome://editor/content/EditorInitPage.html" );
} else {
dump("Error; can't create toolkitCore\n");
}
}
function BrowserNewTextEditorWindow()
{
core = XPAppCoresManager.Find("toolkitCore");
if ( !core ) {
core = new ToolkitCore();
if ( core ) {
core.Init("toolkitCore");
}
}
if ( core ) {
core.ShowWindowWithArgs( "chrome://editor/content/TextEditorAppShell.xul", window, "chrome://editor/content/EditorInitPagePlain.html" );
} else {
dump("Error; can't create toolkitCore\n");
}
}
function BrowserEditPage(url)
{
core = XPAppCoresManager.Find("toolkitCore");
if ( !core ) {
core = new ToolkitCore();
if ( core ) {
core.Init("toolkitCore");
}
}
if ( core ) {
core.ShowWindowWithArgs( "chrome://editor/content", window, url);
} else {
dump("Error; can't create toolkitCore\n");
}
}
function BrowserOpenWindow()
{
core = XPAppCoresManager.Find("toolkitCore");
if ( !core ) {
core = new ToolkitCore();
if ( core ) {
core.Init("toolkitCore");
}
}
if ( core ) {
//core.ShowWindowWithArgs( "chrome:/navigator/content/openLocation.xul", window, appCoreName );
var name = appCoreName.replace( /\./, /\_/ );
// Note: Use width/height one less than actual so resizing occurs.
// This bypasses bug whereby dialog contents don't appear
// till the dialog is resized.
window.openDialog( "chrome:/navigator/chrome/openLocation.xul", name+"_openLocation", "chrome,width=419,height=189", appCoreName );
} else {
dump("Error; can't create toolkitCore\n");
}
}
function OpenFile(url) {
// This is invoked from the browser app core.
core = XPAppCoresManager.Find("toolkitCore");
if ( !core ) {
core = new ToolkitCore();
if ( core ) {
core.Init("toolkitCore");
}
}
if ( core ) {
core.ShowWindowWithArgs( "chrome://navigator/content/navigator.xul", window, url );
} else {
dump("Error; can't create toolkitCore\n");
}
}
function BrowserCopy()
{
if (appCore != null) {
dump("Copying\n");
appCore.copy();
} else {
dump("BrowserAppCore has not been created!\n");
}
}
function BrowserAddBookmark(url,title)
{
var bmks = Components.classes["component://netscape/browser/bookmarks-service"].getService();
bmks = bmks.QueryInterface(Components.interfaces.nsIBookmarksService);
bmks.AddBookmark(url, title);
}
function BrowserEditBookmarks()
{
var toolkitCore = XPAppCoresManager.Find("toolkitCore");
if (!toolkitCore) {
toolkitCore = new ToolkitCore();
if (toolkitCore) {
toolkitCore.Init("toolkitCore");
}
}
if (toolkitCore) {
toolkitCore.ShowWindow("resource://res/samples/bookmarks.xul",window);
}
}
function OpenHistoryView()
{
var toolkitCore = XPAppCoresManager.Find("toolkitCore");
if (!toolkitCore) {
toolkitCore = new ToolkitCore();
if (toolkitCore) {
toolkitCore.Init("toolkitCore");
}
}
if (toolkitCore) {
toolkitCore.ShowWindow("resource://res/samples/history.xul",window);
}
}
function BrowserPrintPreview()
{
// Borrowing this method to show how to
// dynamically change icons
dump("BrowserPrintPreview\n");
if (appCore != null) {
dump("Changing Icons\n");
appCore.printPreview();
} else {
dump("BrowserAppCore has not been created!\n");
}
}
function BrowserPrint()
{
// Borrowing this method to show how to
// dynamically change icons
if (appCore != null) {
appCore.print();
}
}
function BrowserSetDefaultCharacterSet(aCharset)
{
if (appCore != null) {
appCore.SetDocumentCharset(aCharset);
window.frames[0].frames[1].location.reload();
} else {
dump("BrowserAppCore has not been created!\n");
}
}
function BrowserClose()
{
dump("BrowserClose\n");
// Currently window.close doesn't work unless the window was opened from JS
// window.close();
core = XPAppCoresManager.Find("toolkitCore");
if ( !core ) {
core = new ToolkitCore();
if ( core ) {
core.Init("toolkitCore");
}
}
if ( core ) {
core.CloseWindow( window );
} else {
dump("Error can't create toolkitCore\n");
}
}
function BrowserExit()
{
if (appCore != null) {
dump("Exiting\n");
appCore.exit();
} else {
dump("BrowserAppCore has not been created!\n");
}
}
function BrowserFind() {
if (appCore != null) {
appCore.find();
} else {
dump("BrowserAppCore has not been created!\n");
}
}
function BrowserFindAgain() {
if (appCore != null) {
appCore.findNext();
} else {
dump("BrowserAppCore has not been created!\n");
}
}
function BrowserLoadURL()
{
if (appCore == null)
{
dump("BrowserAppCore has not been initialized\n");
return;
}
// rjc: added support for URL shortcuts (3/30/1999)
try {
var bmks = Components.classes["component://netscape/browser/bookmarks-service"].getService();
bmks = bmks.QueryInterface(Components.interfaces.nsIBookmarksService);
var shortcutURL = bmks.FindShortcut(document.getElementById('urlbar').value);
dump("FindShortcut: in='" + document.getElementById('urlbar').value + "' out='" + shortcutURL + "'\n");
if ((shortcutURL != null) && (shortcutURL != "")) {
document.getElementById('urlbar').value = shortcutURL;
}
}
catch (ex) {
// stifle any exceptions so we're sure to load the URL.
}
appCore.loadUrl(document.getElementById('urlbar').value);
}
function WalletEditor()
{
if (appCore != null) {
dump("Wallet Editor\n");
appCore.walletEditor(window);
} else {
dump("BrowserAppCore has not been created!\n");
}
}
function WalletSafeFillin()
{
if (appCore != null) {
dump("Wallet Safe Fillin\n");
appCore.walletPreview(window, window.frames[0].frames[1]);
} else {
dump("BrowserAppCore has not been created!\n");
}
}
function WalletChangePassword()
{
if (appCore != null) {
dump("Wallet Change Password\n");
appCore.walletChangePassword();
} else {
dump("BrowserAppCore has not been created!\n");
}
}
function WalletQuickFillin()
{
if (appCore != null) {
dump("Wallet Quick Fillin\n");
appCore.walletQuickFillin(window.frames[0].frames[1]);
} else {
dump("BrowserAppCore has not been created!\n");
}
}
function WalletSamples()
{
if (appCore != null) {
dump("Wallet Samples\n");
appCore.walletSamples();
} else {
dump("BrowserAppCore has not been created!\n");
}
}
function SignonViewer()
{
if (appCore != null) {
dump("Signon Viewer\n");
appCore.signonViewer(window);
} else {
dump("BrowserAppCore has not been created!\n");
}
}
function CookieViewer()
{
if (appCore != null) {
dump("Cookie Viewer\n");
appCore.cookieViewer(window);
} else {
dump("BrowserAppCore has not been created!\n");
}
}
function OpenMessenger()
{
var toolkitCore = XPAppCoresManager.Find("ToolkitCore");
if (!toolkitCore) {
toolkitCore = new ToolkitCore();
if (toolkitCore) {
toolkitCore.Init("ToolkitCore");
}
}
if (toolkitCore) {
toolkitCore.ShowWindow("chrome://messenger/content/",
window);
}
}
function OpenAddressbook()
{
var toolkitCore = XPAppCoresManager.Find("ToolkitCore");
if (!toolkitCore) {
toolkitCore = new ToolkitCore();
if (toolkitCore) {
toolkitCore.Init("ToolkitCore");
}
}
if (toolkitCore) {
toolkitCore.ShowWindow("chrome://addressbook/content/",
window);
}
}
function MsgNewMessage()
{
var toolkitCore = XPAppCoresManager.Find("ToolkitCore");
if (!toolkitCore) {
toolkitCore = new ToolkitCore();
if (toolkitCore) {
toolkitCore.Init("ToolkitCore");
}
}
if (toolkitCore) {
toolkitCore.ShowWindow("chrome://messengercompose/content/",
window);
}
}
function DoPreferences()
{
if (!prefwindow)
{
prefwindow = Components.classes['component://netscape/prefwindow'].createInstance(Components.interfaces.nsIPrefWindow);
}
prefwindow.showWindow("navigator.js", window, "chrome://pref/content/pref-appearance.xul");
}
function BrowserViewSource()
{
var toolkitCore = XPAppCoresManager.Find("ToolkitCore");
if (!toolkitCore) {
toolkitCore = new ToolkitCore();
if (toolkitCore) {
toolkitCore.Init("ToolkitCore");
}
}
if (toolkitCore) {
var url = window.frames[0].frames[1].location;
dump("Opening view of source for" + url + "\n");
toolkitCore.ShowWindowWithArgs("chrome:/navigator/content/viewSource.xul", window, url);
}
}
function OpenEditor()
{
var toolkitCore = XPAppCoresManager.Find("ToolkitCore");
if (!toolkitCore) {
toolkitCore = new ToolkitCore();
if (toolkitCore) {
toolkitCore.Init("ToolkitCore");
}
}
if (toolkitCore) {
toolkitCore.ShowWindowWithArgs("chrome://editor/content/EditorAppShell.xul",window,"chrome://editor/content/EditorInitPage.html");
}
}
var bindCount = 0;
function onStatus() {
var status = document.getElementById("Browser:Status");
if ( status ) {
var text = status.getAttribute("value");
if ( text == "" ) {
text = defaultStatus;
}
var statusText = document.getElementById("statusText");
if ( statusText ) {
statusText.setAttribute( "value", text );
}
} else {
dump("Can't find status broadcaster!\n");
}
}
function onSecurity() {
var security = document.getElementById("Browser:Security");
var indicator = document.getElementById("security-box");
var icon = document.getElementById("security-button");
if ( security.getAttribute("secure") == "true" ) {
indicator.setAttribute("class","secure");
icon.setAttribute("class","secure");
} else {
indicator.setAttribute("class","insecure");
icon.setAttribute("class","insecure");
}
}
function securityOn() {
// Set debugSecurity (at top of file) to turn this code on.
if ( !debugSecurity ) {
return;
}
var security = document.getElementById("Browser:Security");
if ( security.getAttribute("secure") == "false" ) {
security.setAttribute("secure","true");
}
}
function securityOff() {
var security = document.getElementById("Browser:Security");
if ( security.getAttribute("secure") == "true" ) {
security.setAttribute("secure","false");
}
}
function doTests() {
// Turn security on.
securityOn();
}
var startTime = 0;
function onProgress() {
var throbber = document.getElementById("Browser:Throbber");
var meter = document.getElementById("Browser:LoadingProgress");
if ( throbber && meter ) {
var busy = throbber.getAttribute("busy");
if ( busy == "true" ) {
mode = "undetermined";
if ( !startTime ) {
startTime = (new Date()).getTime();
}
} else {
mode = "normal";
}
meter.setAttribute("mode",mode);
if ( mode == "normal" ) {
var status = document.getElementById("Browser:Status");
if ( status ) {
var elapsed = ( (new Date()).getTime() - startTime ) / 1000;
var msg = "Document: Done (" + elapsed + " secs)";
dump( msg + "\n" );
status.setAttribute("value",msg);
defaultStatus = msg;
}
startTime = 0;
}
}
}
function dumpProgress() {
var broadcaster = document.getElementById("Browser:LoadingProgress");
var meter = document.getElementById("meter");
dump( "bindCount=" + bindCount + "\n" );
dump( "broadcaster mode=" + broadcaster.getAttribute("mode") + "\n" );
dump( "broadcaster value=" + broadcaster.getAttribute("value") + "\n" );
dump( "meter mode=" + meter.getAttribute("mode") + "\n" );
dump( "meter value=" + meter.getAttribute("value") + "\n" );
}
function ShowWindowFromResource( node )
{
var windowManager = Components.classes['component://netscape/rdf/datasource?name=window-mediator'].getService();
dump("got window Manager \n");
var windowManagerInterface = windowManager.QueryInterface( Components.interfaces.nsIWindowMediator);
dump("got interface \n");
var desiredWindow = null;
var url = node.getAttribute('id');
dump( url +" finding \n" );
desiredWindow = windowManagerInterface.GetWindowForResource( url );
dump( "got window \n");
if ( desiredWindow )
{
dump("focusing \n");
desiredWindow.focus();
}
}

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

@ -0,0 +1,737 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/xul.css" type="text/css"?>
<?xml-stylesheet href="chrome://navigator/skin/" type="text/css"?>
<!DOCTYPE window
[
<!ENTITY mainWindow.title "Mozilla">
<!ENTITY mainWindow.titlemodifier "Mozilla">
<!ENTITY mainWindow.titlemodifierseperator " - ">
<!ENTITY throbber.url "http://www.mozilla.org">
<!ENTITY fileMenu.label "File">
<!ENTITY browserCmd.label "New Browser Window">
<!ENTITY newMenu.label "New">
<!ENTITY newMailCmd.label "Mail Message">
<!ENTITY newChatCmd.label "Chat Window">
<!ENTITY newBlankPageCmd.label "Blank Window">
<!ENTITY newPageFromTemplateCmd.label "Page Using Template">
<!ENTITY newPageFromDraftCmd.label "Page using Draft">
<!ENTITY openCmd.label "Open">
<!ENTITY sendPageCmd.label "Send Page">
<!ENTITY editPageCmd.label "Edit Page">
<!ENTITY offlineMenu.label "Offline">
<!ENTITY offlineGoOfflineCmd.label "Go Offline">
<!ENTITY offlineSynchronizeCmd.label "Synchronize">
<!ENTITY printSetupCmd.label "Print Setup">
<!ENTITY printPreviewCmd.label "Print Preview">
<!ENTITY printCmd.label "Print">
<!ENTITY closeCmd.label "Close">
<!ENTITY quitCmd.label "Quit">
<!ENTITY editMenu.label "Edit">
<!ENTITY undoCmd.label "Undo">
<!ENTITY redoCmd.label "Redo">
<!ENTITY cutCmd.label "Cut">
<!ENTITY copyCmd.label "Copy">
<!ENTITY pasteCmd.label "Paste">
<!ENTITY deleteCmd.label "Delete">
<!ENTITY walletMenu.label "Wallet">
<!ENTITY walletSafeFillCmd.label "Safe Form Fill">
<!ENTITY walletQuickFillCmd.label "Quick Form Fill">
<!ENTITY walletContentsCmd.label "Wallet Contents">
<!ENTITY walletDisplaySignonsCmd.label "Display Signons">
<!ENTITY walletDisplayCookiesCmd.label "Display Cookies">
<!ENTITY walletSamplesCmd.label "Samples">
<!ENTITY walletChangePasswordCmd.label "Change Password">
<!ENTITY selectAllCmd.label "Select All">
<!ENTITY preferences.label "Preferences">
<!ENTITY viewMenu.label "View">
<!ENTITY toolbarsCmd.label "Toolbars">
<!ENTITY sidebarCmd.label "Sidebar">
<!ENTITY enlargeTextSizeCmd.label "Enlarge Text Size">
<!ENTITY reduceTextSizeCmd.label "Reduce Text Size">
<!ENTITY useStyleSheetMenu.label "Use Stylesheet">
<!ENTITY useStyleSheetDefaultCmd.label "Default">
<!ENTITY useStyleSheetEasyReadingCmd.label "Easy Reading">
<!ENTITY useStyleSheetMaxInfoCmd.label "Maximum Information">
<!ENTITY useStlyleSheetBizarreCmd.label "Bizarre">
<!ENTITY reloadCmd.label "Reload">
<!ENTITY showImagesCmd.label "Show Images">
<!ENTITY stopCmd.label "Stop">
<!ENTITY pageSourceCmd.label "Page Source">
<!ENTITY pageInfoCmd.label "Page Info">
<!ENTITY translateMenu.label "Translate">
<!ENTITY translateButton.label "Translate">
<!ENTITY translateEngtoFrenCmd.label "English to French">
<!ENTITY translateEngtoGermCmd.label "English to German">
<!ENTITY translateEngtoSpanCmd.label "English to Spanish">
<!ENTITY translateFrentoEngCmd.label "French to English">
<!ENTITY translateFrentoGermCmd.label "French to German">
<!ENTITY translateFrentoSpanCmd.label "French to Spanish">
<!ENTITY translateGermtoEngCmd.label "German to English">
<!ENTITY translateGermtoFrenCmd.label "German to French">
<!ENTITY translateGermtoSpanCmd.label "German to Spanish">
<!ENTITY tanslateSpantoEngCmd.label "Spanish to English">
<!ENTITY translateSpantoFrenCmd.label "Spanish to French">
<!ENTITY translateSpantoGermCmd.label "Spanish to German">
<!ENTITY dcharMenu.label "Character Set">
<!ENTITY dcharIso1Cmd.label "ISO Latin 1 (ISO-8859-1)">
<!ENTITY dcharIso2Cmd.label "ISO Latin 2 (ISO-8859-2)">
<!ENTITY dcharIso3Cmd.label "ISO Latin 3 (ISO-8859-3)">
<!ENTITY dcharIso4Cmd.label "ISO Latin 4 (ISO-8859-4)">
<!ENTITY dcharIso9Cmd.label "ISO Latin 5 (ISO-8859-9)">
<!ENTITY dcharIso10Cmd.label "ISO Latin 6 (ISO-8859-10)">
<!ENTITY dcharIso13Cmd.label "ISO Latin 7 (ISO-8859-13)">
<!ENTITY dcharIso14Cmd.label "ISO Latin 8 (ISO-8859-14)">
<!ENTITY dcharIso15Cmd.label "ISO Latin 9 (ISO-8859-15)">
<!ENTITY dcharWinLat2Cmd.label "Windows Latin 2 (windows-1250)">
<!ENTITY dcharWinLat1Cmd.label "Windows Latin 1 (windows-1252)">
<!ENTITY dcharWinLat5Cmd.label "Windows Latin 5 (windows-1254)">
<!ENTITY dcharWinBalRimCmd.label "Windows Baltic (windows-1257)">
<!ENTITY dcharMacRomCmd.label "Macintosh Roman">
<!ENTITY dcharMacCenEuroCmd.label "Macintosh Central European">
<!ENTITY dcharMacTurCmd.label "Macintosh Turkish">
<!ENTITY dcharMacCroaCmd.label "Macintosh Croatian">
<!ENTITY dcharMacRomanianCmd.label "Macintosh Romanian">
<!ENTITY dcharMacIceCmd.label "Macintosh Icelandic">
<!ENTITY dcharJapanCmd.label "Japanese JIS (ISO-2022-JP)">
<!ENTITY dcharJapanShiftjsCmd.label "Japanese (Shift_JIS)">
<!ENTITY dcharJapanEucCmd.label "Japanese (EUC-JP)">
<!ENTITY dcharTradChiBigCmd.label "Traditional Chinese (Big5)">
<!ENTITY dcharTriChiEucCmd.label "Traditional Chinese (EUC-TW)">
<!ENTITY dcharSimpChiGbCmd.label "Simplified Chinese (GB2312)">
<!ENTITY dcharKoreanCmd.label "Korean (EUC-KR)">
<!ENTITY dcharUtf7Cmd.label "Multilingual (UTF-7)">
<!ENTITY dcharUtf8Cmd.label "Multilingual (UTF-8)">
<!ENTITY dcharIsoCyrCmd.label "ISO Cyrillic (ISO-8859-5)">
<!ENTITY dcharEcmaCyrCmd.label "ECMA Cyrillic (ISO-IR-111)">
<!ENTITY dcharDosCyrCmd.label "DOS Cyrillic (IBM866)">
<!ENTITY dcharWinCyrCmd.label "Windows Cyrillic (windows-1251)">
<!ENTITY dcharMacCyrCmd.label "Macintosh Cyrillic">
<!ENTITY dcharMacUkrCmd.label "Macintosh Ukrainian">
<!ENTITY dcharRusCmd.label "Russian (KOI8-R)">
<!ENTITY dcharUkrCmd.label "Ukrainian (KOI8-U)">
<!ENTITY dcharIsoGreekCmd.label "ISO Greek (ISO-8859-7)">
<!ENTITY dcharWinGreekCmd.label "Windows Greek (windows-1253)">
<!ENTITY dcharMacGreekCmd.label "Macintosh Greek">
<!ENTITY dcharWinVietCmd.label "Windows Vietnamese (windows-1258)">
<!ENTITY dcharVietTcnCmd.label "Vietnamese (TCVN5712)">
<!ENTITY dcharVietViCmd.label "Vietnamese (VISCII)">
<!ENTITY dcharVieVpCmd.label "Vietnamese (VPS)">
<!ENTITY dcharThaiCmd.label "Thai (TIS-620)">
<!ENTITY dcharArmCmd.label "Armenian (ARMSCII-8)">
<!ENTITY dcharIso6Cmd.label ".ISO Arabic (ISO-8859-6)">
<!ENTITY dcharIso8Cmd.label ".ISO Hebrew (ISO-8859-8)">
<!ENTITY dcharCp1255Cmd.label "Windows Hebrew (windows-1255)">
<!ENTITY dcharCp1256Cmd.label "Windows Arabic (windows-1256)">
<!ENTITY searchMenu.label "Search">
<!ENTITY findOnCmd.label "Find On this page...">
<!ENTITY findAgainCmd.label "Find Again">
<!ENTITY searchParentCmd.label "Search Parent Item...">
<!ENTITY searchParenet2Cmd.label "Search Parent2 Item">
<!ENTITY appSpecificCmd.label "App Specific">
<!ENTITY searchInternetCmd.label "Search the Internet...">
<!ENTITY searchAllMailCmd.label "Search All Mail....">
<!ENTITY searchBookmarksCmd.label "Search Bookmarks...">
<!ENTITY searchPeopleCmd.label "Search People...">
<!ENTITY searchComputerCmd.label "Search on this Computer...">
<!ENTITY goMenu.label "Go">
<!ENTITY goBackCmd.label "Back">
<!ENTITY goForwardCmd.label "Forward">
<!ENTITY goHomeCmd.label "Home">
<!ENTITY goPrev1Cmd.label "Previous Site 1">
<!ENTITY goPrev2Cmd.label "Previous Site 2">
<!ENTITY goPrevnCmd.label "Previous Site n">
<!ENTITY bookmarksMenu.label "Bookmarks">
<!ENTITY addCurPageCmd.label "Add Current Page">
<!ENTITY manBookmarksCmd.label "Manage Bookmarks...">
<!ENTITY tasksMenu.label "Tasks">
<!ENTITY navigatorCmd.label "Navigator">
<!ENTITY messengerCmd.label "Messenger">
<!ENTITY editorCmd.label "Editor">
<!ENTITY textEditorCmd.label "Plaintext Editor">
<!ENTITY manageHistoryCmd.label "Manage History">
<!ENTITY chatCmd.label "Chat">
<!ENTITY shoppingCartCmd.label "Shopping Cart">
<!ENTITY toolsMenu.label "Tools">
<!ENTITY toolsPluginsInfoCmd.label "Plugins Info">
<!ENTITY toolsJavaConsoleCmd.label "Java/JS Console">
<!ENTITY toolsServerToolsCmd.label "Server Tools">
<!ENTITY toolsJsDebuggerCmd.label "JavaScipt Debugger">
<!ENTITY securityInfo.label "Security Info">
<!ENTITY helpMenuCmd.label "Help">
<!ENTITY helpContentsCmd.label "Help Contents">
<!ENTITY howTutorialCmd.label "How to Tutorial">
<!ENTITY helpChannelCmd.label "Help Channel">
<!ENTITY softwareUpdatesCmd.label "Software Updates">
<!ENTITY technicalSupportCmd.label "Technical Support">
<!ENTITY releaseNotesCmd.label "Release Notes">
<!ENTITY aboutCommunicatorCmd.label "About Communicator Prototype">
<!ENTITY debugMenu.label "Debug">
<!ENTITY debugVerCmd.label "Verification">
<!ENTITY ver1Cmd.label "Mozilla">
<!ENTITY ver2Cmd.label "Yahoo">
<!ENTITY ver3Cmd.label "Netscape">
<!ENTITY ver4Cmd.label "Excite">
<!ENTITY ver5Cmd.label "Microsoft">
<!ENTITY ver6Cmd.label "city.net">
<!ENTITY ver7Cmd.label "Mirabilis">
<!ENTITY ver8Cmd.label "Pathfinder">
<!ENTITY ver9Cmd.label "Warner Bros.">
<!ENTITY ver10Cmd.label "CNN">
<!ENTITY ver11Cmd.label "USA Today">
<!ENTITY ver12Cmd.label "Disney">
<!ENTITY ver13Cmd.label "Hotwired">
<!ENTITY ver14Cmd.label "Hotbot">
<!ENTITY ver15Cmd.label "Frames">
<!ENTITY ver16Cmd.label "Tables">
<!ENTITY ver17Cmd.label "Applets">
<!ENTITY ver18Cmd.label "JavaScript">
<!ENTITY ver19Cmd.label "GIF Images">
<!ENTITY ver20Cmd.label "JPEG Images">
<!ENTITY ver21Cmd.label "PNG Images">
<!ENTITY ver22Cmd.label "Transparency">
<!ENTITY ver23Cmd.label "Animation">
<!ENTITY ver24Cmd.label "Larger page">
<!ENTITY ver25Cmd.label "Smaller page">
<!ENTITY viewDemoMenu.label "Viewer Demos">
<!ENTITY demo0Cmd.label "#0 Basic Styles">
<!ENTITY demo1Cmd.label "#1 CSS Styles">
<!ENTITY demo2Cmd.label "#2 Images">
<!ENTITY demo3Cmd.label "#3 Basic Tables">
<!ENTITY demo4Cmd.label "#4 Simple Tables">
<!ENTITY demo5Cmd.label "#5 More Styles">
<!ENTITY demo6Cmd.label "#6 Deeply Nested Tables">
<!ENTITY demo7Cmd.label "#7 Scaled Anim Image">
<!ENTITY demo8Cmd.label "#8 Form">
<!ENTITY demo9Cmd.label "#9 Frames">
<!ENTITY demo10Cmd.label "#10 Anim Images">
<!ENTITY demo11Cmd.label "#11 Fixed Positioning">
<!ENTITY demo12Cmd.label "#12 More Fixed Pos">
<!ENTITY demo13Cmd.label "#13 DHTML">
<!ENTITY demo14Cmd.label "#14 XML Sorting">
<!ENTITY demo15Cmd.label "#15 XML IRS">
<!ENTITY demo16Cmd.label "#16 Gfx Widgets">
<!ENTITY xptkMenu.label "XPToolkit">
<!ENTITY xptk1Cmd.label "Tri-state checkbox">
<!ENTITY xptk2Cmd.label "Toolbar">
<!ENTITY xptk3Cmd.label "Tree">
<!ENTITY xptk4Cmd.label "Dialog">
<!ENTITY xptk5Cmd.label "Dialog w/ animation">
<!ENTITY xptk6Cmd.label "Tab">
<!ENTITY xptk7Cmd.label "Beep">
<!-- Toolbar items -->
<!ENTITY backButton.label "Back">
<!ENTITY forwardButton.label "Forward">
<!ENTITY reloadButton.label "Reload">
<!ENTITY stopButton.label "Stop">
<!ENTITY printButton.label "Print">
<!-- Toolbar items -->
<!ENTITY homeButton.label "Home">
<!ENTITY netscapeButton.label "Netscape">
<!ENTITY bugzillaButton.label "Bugzilla">
<!ENTITY tinderboxButton.label "Tinderbox">
<!-- Statusbar -->
<!ENTITY notifCom.label "[Notification Component]">
<!ENTITY statusText.label "Document: Done">
<!ENTITY buildId.label "Build ID: 1999061816">
<!ENTITY security-button.label "Secure Conn">
<!-- taskbar -->
<!ENTITY webButton.label "Web">
<!ENTITY mailButton.label "Mail">
<!ENTITY chatButton.label "Chat">
<!ENTITY dayplannerButton.label "DayPlanner">
<!ENTITY shoppingButton.label "Shopping">
<!ENTITY myDeskButton.label "My Desk">
<!ENTITY openWinButton.label "Open Windows">
]>
<window id="main-window" xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="Startup()"
onunload="if (appCore) appCore.close()"
title="&mainWindow.title;" titlemodifier="&mainWindow.titlemodifier;"
titleseperator ="&mainWindow.titlemodifierseperator;" windowtype="navigator:browser">
<html:script language="javascript" src="navigator.js">
</html:script>
<popup id="translationlist">
<menu>
<menuitem name="&translateEngtoFrenCmd.label;" onclick="Translate('en', 'fr');" />
<menuitem name="&translateEngtoGermCmd.label;" onclick="Translate('en', 'de');"/>
<menuitem name="&translateEngtoSpanCmd.label;" onclick="Translate('en', 'es');"/>
<separator />
<menuitem name="&translateFrentoEngCmd.label;" onclick="Translate('fr', 'en')"/>
<menuitem name="&translateFrentoGermCmd.label;" onclick="Translate('fr', 'de')"/>
<menuitem name="&translateFrentoSpanCmd.label;" onclick="Translate('fr', 'es')"/>
<separator />
<menuitem name="&translateGermtoEngCmd.label;" onclick="Translate('de', 'en')"/>
<menuitem name="&translateGermtoFrenCmd.label;" onclick="Translate('de', 'fr')"/>
<menuitem name="&translateGermtoSpanCmd.label;" onclick="Translate('de', 'es')"/>
<separator />
<menuitem name="&tanslateSpantoEngCmd.label;" onclick="Translate('es', 'en')"/>
<menuitem name="&translateSpantoFrenCmd.label;" onclick="Translate('es', 'fr')"/>
<menuitem name="&translateSpantoGermCmd.label;" onclick="Translate('es', 'de')"/>
</menu>
</popup>
<broadcaster id="canGoBack" disabled="true"/>
<broadcaster id="canGoForward" disabled="true"/>
<broadcaster id="canReload"/>
<broadcaster id="canStop"/>
<broadcaster id="canPrint"/>
<broadcaster id="Browser:LoadingProgress"/>
<broadcaster id="Browser:Status"/>
<broadcaster id="Browser:Security" secure="false"/>
<broadcaster id="Browser:Throbber" busy="false"/>
<broadcaster id="args" value=""/>
<!-- Interim hack to transition from nsIXULWindowCallbacks/ShowWindowWithArgs -->
<broadcaster id="dialog.start" ready="false"/>
<observes element="dialog.start" attribute="ready" onchange="onLoadWithArgs()"/>
<menubar chromeclass="menubar">
<menu name="&fileMenu.label;">
<menuitem name="&browserCmd.label;" onclick="BrowserNewWindow();"/>
<menu name="New">
<menuitem name="&newMailCmd.label;" onclick="MsgNewMessage();"/>
<menuitem name="&newChatCmd.label;" onclick=""/>
<separator />
<menuitem name="&newBlankPageCmd.label;" onclick="BrowserNewEditorWindow();"/>
<menuitem name="&newPageFromTemplateCmd.label;" onclick="BrowserNewWindow();"/>
<menuitem name="&newPageFromDraftCmd.label;" onclick="BrowserNewWindow();"/>
</menu>
<menuitem name="&openCmd.label;" onclick="BrowserOpenWindow();"/>
<separator />
<menuitem name="&sendPageCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&editPageCmd.label;" onclick="BrowserEditPage(window.frames[0].frames[1].location.href);" />
<separator />
<menu name="&offlineMenu.label;">
<menuitem name="&offlineGoOfflineCmd.label;" onclick="BrowserReload();"/>
<separator />
<menuitem name="&offlineSynchronizeCmd.label;" onclick="BrowserReload();"/>
</menu>
<separator />
<menuitem name="&printSetupCmd.label;" onclick=";"/>
<menuitem name="&printPreviewCmd.label;" onclick=""/>
<menuitem name="&printCmd.label;" onclick="BrowserPrint()"/>
<separator />
<menuitem name="&closeCmd.label;" onclick="BrowserClose();"/>
<menuitem name="&quitCmd.label;" onclick="BrowserExit();"/>
</menu>
<menu name="&editMenu.label;">
<menuitem name="&undoCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&redoCmd.label;" onclick="BrowserReload();"/>
<separator />
<menuitem name="&cutCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&copyCmd.label;" onclick="BrowserCopy();"/>
<menuitem name="&pasteCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&deleteCmd.label;" onclick="BrowserReload();"/>
<separator />
<menu name="&walletMenu.label;">
<menuitem name="&walletSafeFillCmd.label;" onclick="WalletSafeFillin();"/>
<menuitem name="&walletQuickFillCmd.label;" onclick="WalletQuickFillin();"/>
<separator />
<menuitem name="&walletContentsCmd.label;" onclick="WalletEditor();"/>
<menuitem name="&walletDisplaySignonsCmd.label;" onclick="SignonViewer();"/>
<menuitem name="&walletDisplayCookiesCmd.label;" onclick="CookieViewer();"/>
<separator />
<menuitem name="&walletSamplesCmd.label;" onclick="WalletSamples();"/>
<menuitem name="&walletChangePasswordCmd.label;" onclick="WalletChangePassword();"/>
</menu>
<separator />
<menuitem name="&selectAllCmd.label;" onclick="BrowserReload();"/>
<separator />
<menuitem name="&preferences.label;" onclick="DoPreferences();"/>
</menu>
<menu name="&viewMenu.label;">
<menuitem name="&toolbarsCmd.label;" onclick="toolbar.visible=true"/>
<menuitem name="&sidebarCmd.label;" onclick="BrowserReload();"/>
<separator />
<menuitem name="&enlargeTextSizeCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&reduceTextSizeCmd.label;" onclick="BrowserReload();"/>
<separator />
<menu name="&useStyleSheetMenu.label;" onclick="BrowserReload();">
<menuitem name="&useStyleSheetDefaultCmd.label;" onclick="BrowserReload();"/>
<separator />
<menuitem name="&useStyleSheetEasyReadingCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&useStyleSheetMaxInfoCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&useStlyleSheetBizarreCmd.label;" onclick="BrowserReload();"/>
</menu>
<separator />
<menuitem name="&reloadCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&showImagesCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&stopCmd.label;" id="menuitem-stop" onclick="BrowserStop();"/>
<separator />
<menuitem name="&pageSourceCmd.label;" onclick="BrowserViewSource();"/>
<menuitem name="&pageInfoCmd.label;" onclick="BrowserReload();"/>
<separator />
<menu name="&translateMenu.label;">
<menuitem name="&translateEngtoFrenCmd.label;" onclick="Translate('en', 'fr');"/>
<menuitem name="&translateEngtoGermCmd.label;" onclick="Translate('en', 'de');"/>
<menuitem name="&translateEngtoSpanCmd.label;" onclick="Translate('en', 'es');"/>
<separator />
<menuitem name="&translateFrentoEngCmd.label; " onclick="Translate('fr', 'en');"/>
<menuitem name="&translateFrentoGermCmd.label;" onclick="Translate('fr', 'de');"/>
<menuitem name="&translateFrentoSpanCmd.label;" onclick="Translate('fr', 'es');"/>
<separator />
<menuitem name="&translateGermtoEngCmd.label;" onclick="Translate('de', 'en');"/>
<menuitem name="&translateGermtoFrenCmd.label;" onclick="Translate('de', 'fr');"/>
<menuitem name="&translateGermtoSpanCmd.label;" onclick="Translate('de', 'es');"/>
<separator />
<menuitem name="&tanslateSpantoEngCmd.label;" onclick="Translate('es', 'en');"/>
<menuitem name="&translateSpantoFrenCmd.label;" onclick="Translate('es', 'fr');"/>
<menuitem name="&translateSpantoGermCmd.label;" onclick="Translate('es', 'de');"/>
</menu>
<menu name="&dcharMenu.label;">
<menuitem name="&dcharIso1Cmd.label;" onclick="BrowserSetDefaultCharacterSet('ISO-8859-1');"/>
<menuitem name="&dcharIso2Cmd.label;" onclick="BrowserSetDefaultCharacterSet('ISO-8859-2');"/>
<menuitem name="&dcharIso3Cmd.label;" onclick="BrowserSetDefaultCharacterSet('ISO-8859-3');"/>
<menuitem name="&dcharIso4Cmd.label;" onclick="BrowserSetDefaultCharacterSet('ISO-8859-4');"/>
<menuitem name="&dcharIso9Cmd.label;" onclick="BrowserSetDefaultCharacterSet('ISO-8859-9');"/>
<menuitem name="&dcharIso10Cmd.label;" onclick="BrowserSetDefaultCharacterSet('ISO-8859-10');"/>
<menuitem name="&dcharIso13Cmd.label;" onclick="BrowserSetDefaultCharacterSet('ISO-8859-13');"/>
<menuitem name="&dcharIso14Cmd.label;" onclick="BrowserSetDefaultCharacterSet('ISO-8859-14');"/>
<menuitem name="&dcharIso15Cmd.label;" onclick="BrowserSetDefaultCharacterSet('ISO-8859-15');"/>
<menuitem name="&dcharWinLat2Cmd.label;" onclick="BrowserSetDefaultCharacterSet('windows-1250');"/>
<menuitem name="&dcharWinLat1Cmd.label;" onclick="BrowserSetDefaultCharacterSet('windows-1252');"/>
<menuitem name="&dcharWinLat5Cmd.label;" onclick="BrowserSetDefaultCharacterSet('windows-1254');"/>
<menuitem name="&dcharWinBalRimCmd.label;" onclick="BrowserSetDefaultCharacterSet('windows-1257');"/>
<menuitem name="&dcharMacRomCmd.label;" onclick="BrowserSetDefaultCharacterSet('x-mac-roman');"/>
<menuitem name="&dcharMacCenEuroCmd.label;" onclick="BrowserSetDefaultCharacterSet('x-mac-ce');"/>
<menuitem name="&dcharMacTurCmd.label;" onclick="BrowserSetDefaultCharacterSet('x-mac-turkish');"/>
<menuitem name="&dcharMacCroaCmd.label;" onclick="BrowserSetDefaultCharacterSet('x-mac-croatian');"/>
<menuitem name="&dcharMacRomanianCmd.label;" onclick="BrowserSetDefaultCharacterSet('x-mac-romanian');"/>
<menuitem name="&dcharMacIceCmd.label;" onclick="BrowserSetDefaultCharacterSet('x-mac-icelandic');"/>
<separator />
<menuitem name="&dcharJapanCmd.label;" onclick="BrowserSetDefaultCharacterSet('ISO-2022-JP');"/>
<menuitem name="&dcharJapanShiftjsCmd.label;" onclick="BrowserSetDefaultCharacterSet('Shift_JIS');"/>
<menuitem name="&dcharJapanEucCmd.label;" onclick="BrowserSetDefaultCharacterSet('EUC-JP');"/>
<separator />
<menuitem name="&dcharTradChiBigCmd.label;" onclick="BrowserSetDefaultCharacterSet('Big5');"/>
<menuitem name="&dcharTriChiEucCmd.label;" onclick="BrowserSetDefaultCharacterSet('x-euc-tw');"/>
<menuitem name="&dcharSimpChiGbCmd.label;" onclick="BrowserSetDefaultCharacterSet('GB2312');"/>
<separator />
<menuitem name="&dcharKoreanCmd.label;" onclick="BrowserSetDefaultCharacterSet('EUC-KR');"/>
<separator />
<menuitem name="&dcharUtf7Cmd.label;" onclick="BrowserSetDefaultCharacterSet('UTF-7');"/>
<menuitem name="&dcharUtf8Cmd.label;" onclick="BrowserSetDefaultCharacterSet('UTF-8');"/>
<separator />
<menuitem name="&dcharIsoCyrCmd.label;" onclick="BrowserSetDefaultCharacterSet('ISO-8859-5');"/>
<menuitem name="&dcharEcmaCyrCmd.label;" onclick="BrowserSetDefaultCharacterSet('ISO-IR-111');"/>
<menuitem name="&dcharWinCyrCmd.label;" onclick="BrowserSetDefaultCharacterSet('windows-1251');"/>
<menuitem name="&dcharDosCyrCmd.label;" onclick="BrowserSetDefaultCharacterSet('IBM866');"/>
<menuitem name="&dcharMacCyrCmd.label;" onclick="BrowserSetDefaultCharacterSet('x-mac-cyrillic');"/>
<menuitem name="&dcharMacUkrCmd.label;" onclick="BrowserSetDefaultCharacterSet('x-mac-ukrainian');"/>
<menuitem name="&dcharRusCmd.label; " onclick="BrowserSetDefaultCharacterSet('KOI8-R');"/>
<menuitem name="&dcharUkrCmd.label;" onclick="BrowserSetDefaultCharacterSet('KOI8-U');"/>
<separator />
<menuitem name="&dcharIsoGreekCmd.label;" onclick="BrowserSetDefaultCharacterSet('ISO-8859-7');"/>
<menuitem name="&dcharWinGreekCmd.label;" onclick="BrowserSetDefaultCharacterSet('windows-1253');"/>
<menuitem name="&dcharMacGreekCmd.label;" onclick="BrowserSetDefaultCharacterSet('x-mac-greek');"/>
<separator />
<menuitem name="&dcharWinVietCmd.label;" onclick="BrowserSetDefaultCharacterSet('windows-1258');"/>
<menuitem name="&dcharVietTcnCmd.label;" onclick="BrowserSetDefaultCharacterSet('x-viet-tcvn5712');"/>
<menuitem name="&dcharVietViCmd.label;" onclick="BrowserSetDefaultCharacterSet('VISCII');"/>
<menuitem name="&dcharVieVpCmd.label;" onclick="BrowserSetDefaultCharacterSet('x-viet-vps');"/>
<separator />
<menuitem name="&dcharThaiCmd.label;" onclick="BrowserSetDefaultCharacterSet('TIS-620');"/>
<separator />
<menuitem name="&dcharArmCmd.label;" onclick="BrowserSetDefaultCharacterSet('ARMSCII-8');"/>
<separator />
<menuitem name="&dcharIso6Cmd.label;" onclick="BrowserSetDefaultCharacterSet('ISO-8859-6');"/>
<menuitem name="&dcharCp1256Cmd.label;" onclick="BrowserSetDefaultCharacterSet('windows-1256');"/>
<separator />
<menuitem name="&dcharIso8Cmd.label;" onclick="BrowserSetDefaultCharacterSet('ISO-8859-8');"/>
<menuitem name="&dcharCp1255Cmd.label;" onclick="BrowserSetDefaultCharacterSet('windows-1255');"/>
</menu>
</menu>
<menu name="&searchMenu.label;">
<menuitem name="&findOnCmd.label;" onclick="BrowserFind();"/>
<menuitem name="&findAgainCmd.label;" onclick="BrowserFindAgain();"/>
<separator />
<menuitem name="&searchParentCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&searchParenet2Cmd.label;" onclick="BrowserReload();"/>
<menuitem name="&appSpecificCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&appSpecificCmd.label;" onclick="BrowserReload();"/>
<separator />
<menuitem name="&searchInternetCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&searchAllMailCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&searchBookmarksCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&searchPeopleCmd.label;" onclick="BrowserReload();"/>
<separator />
<menuitem name="&searchComputerCmd.label;" onclick="BrowserReload();"/>
</menu>
<menu name="&goMenu.label;">
<menuitem id="menuitem-back" name="&goBackCmd.label;" onclick="BrowserBack();"/>
<menuitem id="menuitem-forward" name="&goForwardCmd.label;" onclick="BrowserForward();" />
<menuitem name="&goHomeCmd.label;" onclick="BrowserHome();"/>
<separator />
<menuitem name="&goPrev1Cmd.label;" onclick="BrowserBack();"/>
<menuitem name="&goPrev2Cmd.label;" onclick="BrowserBack();"/>
<menuitem name="&goPrevnCmd.label;" onclick="BrowserBack();"/>
</menu>
<menu name="&bookmarksMenu.label;" onclick="OpenBookmarkURL(event.target)"
datasources="rdf:bookmarks rdf:files rdf:find" id="NC:BookmarksRoot">
<template>
<rule iscontainer="true">
<menu uri="..." name="rdf:http://home.netscape.com/NC-rdf#Name"/>
</rule>
<rule rdf:type="http://home.netscape.com/NC-rdf#BookmarkSeparator">
<separator uri="..." />
</rule>
<rule>
<menuitem uri="..." name="rdf:http://home.netscape.com/NC-rdf#Name" onclick="OpenBookmarkURL(event.target)" />
</rule>
</template>
<menuitem name="&addCurPageCmd.label;" onclick="BrowserAddBookmark(window.frames[0].frames[1].location.href,window.frames[0].frames[1].document.title);"/>
<menuitem name="&manBookmarksCmd.label;" onclick="BrowserEditBookmarks();"/>
<separator/>
</menu>
<menu name="&tasksMenu.label;" onclick="ShowWindowFromResource(event.target)" datasources="rdf:window-mediator" id="NC:WindowMediatorRoot" open="true" >
<menuitem name="&navigatorCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&messengerCmd.label;" onclick="OpenMessenger();" />
<menuitem name="&editorCmd.label;" onclick="OpenEditor();" />
<menuitem name="&textEditorCmd.label;" onclick="BrowserNewTextEditorWindow();" />
<menuitem name="&manageHistoryCmd.label;" onclick="OpenHistoryView();" />
<menuitem name="&chatCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&shoppingCartCmd.label;" onclick="BrowserReload();"/>
<separator />
<menu name="&toolsMenu.label;">
<menuitem name="&toolsPluginsInfoCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&toolsJavaConsoleCmd.label;" onclick="BrowserReload();" />
<menuitem name="&toolsServerToolsCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&toolsJsDebuggerCmd.label;" onclick="BrowserReload();"/>
</menu>
<separator />
<menuitem name="&securityInfo.label;" onclick="BrowserReload();"/>
<separator/>
</menu>
<menu name="&helpMenuCmd.label;">
<menuitem name="&helpContentsCmd.label;" onclick="window.frames[0].frames[1].location.href = 'http://www.mozilla.org/projects/user-docs/local/browserhelp/browsertop.html'"/>
<separator />
<menuitem name="&howTutorialCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&helpChannelCmd.label;" onclick="BrowserReload();" />
<separator />
<menuitem name="&softwareUpdatesCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&technicalSupportCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&releaseNotesCmd.label;"
onclick="window.frames[0].frames[1].location.href='http://www.mozilla.org/projects/seamonkey/release-notes/index.html'"/>
<separator />
<menuitem name="&aboutCommunicatorCmd.label;"
onclick="window.frames[0].frames[1].location.href='http://www.mozilla.org/projects/seamonkey/release-notes/index.html'"/>
</menu>
// Menu for testing.
<menu name="&debugMenu.label;">
<menu name="&debugVerCmd.label;"> // Build verification sites.
<menuitem name="&ver1Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://www.mozilla.org'"/>
<menuitem name="&ver2Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://www.yahoo.com'"/>
<menuitem name="&ver3Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://www.netscape.com'"/>
<menuitem name="&ver4Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://www.excite.com'"/>
<menuitem name="&ver5Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://www.microsoft.com'"/>
<menuitem name="&ver6Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://www.city.net'"/>
<menuitem name="&ver7Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://www.mirabilis.com'"/>
<menuitem name="&ver8Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://www.pathfinder.com/welcome'"/>
<menuitem name="&ver9Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://www.warnerbros.com/home_moz3_day.html'"/>
<menuitem name="&ver10Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://www.cnn.com'"/>
<menuitem name="&ver11Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://www.usatoday.com'"/>
<menuitem name="&ver12Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://www.disney.go.com'"/>
<menuitem name="&ver13Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://www.hotwired.com'"/>
<menuitem name="&ver14Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://www.hotbot.com'"/>
<separator />
<menuitem name="&ver15Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://slip/projects/marvin/bft/browser/bft_frame_index.html'"/>
<menuitem name="&ver16Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test6.html'"/>
<menuitem name="&ver17Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://slip/projects/marvin/bft/browser/bft_browser_applet.htm'"/>
<menuitem name="&ver18Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://www.abcnews.com'"/>
<menuitem name="&ver19Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://slip/projects/marvin/bft/browser/bft_browser_imagemap.html'"/>
<menuitem name="&ver20Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test2.html'"/>
<menuitem name="&ver21Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://www.cdrom.com/pub/png/png-MagnoliaAlpha.html'"/>
<menuitem name="&ver22Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test13.html'"/>
<menuitem name="&ver23Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test2.html'"/>
<menuitem name="&ver24Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://slip/projects/marvin/bft/browser/bft_browser_html_mix3.html'"/>
<menuitem name="&ver25Cmd.label;" onclick="window.frames[0].frames[1].location.href='http://slip/projects/marvin/bft/browser/bft_browser_link.html'"/>
</menu>
<menu name="&viewDemoMenu.label;"> // Viewer tests.
<menuitem name="&demo0Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test0.html'"/>
<menuitem name="&demo1Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test1.html'"/>
<menuitem name="&demo2Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test2.html'"/>
<menuitem name="&demo3Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test3.html'"/>
<menuitem name="&demo4Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test4.html'"/>
<menuitem name="&demo5Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test5.html'"/>
<menuitem name="&demo6Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test6.html'"/>
<menuitem name="&demo7Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test7.html'"/>
<menuitem name="&demo8Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test8.html'"/>
<menuitem name="&demo9Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test9.html'"/>
<menuitem name="&demo10Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test10.html'"/>
<menuitem name="&demo11Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test11.html'"/>
<menuitem name="&demo12Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test12.html'"/>
<menuitem name="&demo13Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test13.html'"/>
<menuitem name="&demo14Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test14.html'"/>
<menuitem name="&demo15Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test15.html'"/>
<menuitem name="&demo16Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test16.html'"/>
</menu>
<menu name="&xptkMenu.label;"> // XPToolkit tests.
<menuitem name="&xptk1Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/checkboxTest.xul'"/>
<menuitem name="&xptk2Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/toolbarTest1.xul'"/>
<menuitem name="&xptk3Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/treeTest1.xul'"/>
<menuitem name="&xptk4Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/dexsimplemaster.xul'"/>
<menuitem name="&xptk5Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/dexanimmaster.xul'"/>
<menuitem name="&xptk6Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/tab.xul'"/>
<menuitem name="&xptk7Cmd.label;" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/beeptest.html'"/>
</menu>
</menu>
</menubar>
<box id="outer-box" align="vertical">
<toolbox>
<toolbar class="main-bar" chromeclass="toolbar">
<titledbutton id="back-button" align="bottom" value="&backButton.label;" onclick="BrowserBack()">
<observes element="canGoBack" attribute="disabled" onChange="BrowserSetBack()"/>
</titledbutton>
<titledbutton id="forward-button" align="bottom" value="&forwardButton.label;"
onclick="BrowserForward()">
<observes element="canGoForward" attribute="disabled" onChange="BrowserSetForward()"/>
</titledbutton>
<titledbutton id="reload-button" align="bottom" value="&reloadButton.label;"
onclick="window.frames[0].frames[1].location.reload()">
<observes element="canReload" attribute="disabled"/>
</titledbutton>
<titledbutton id="stop-button" align="bottom" value="&stopButton.label;"
onclick="BrowserStop()">
<observes element="canStop" attribute="disabled" onchange="BrowserCanStop()"/>
</titledbutton>
<box align="vertical" flex="100%">
<spring flex="100%"/>
<html:input id="urlbar" type="text" chromeclass="location" style="min-width: 100px; min-height: 25px; height: 20px"
onkeyup="if (event.which == 13) { BrowserLoadURL(); }"/>
<spring flex="100%"/>
</box>
<titledbutton id="translate-button" popup="translationlist" popupanchor="bottomleft" value="&translateButton.label;" align="bottom">
</titledbutton>
<titledbutton id="print-button" align="bottom" value="&printButton.label;"
onclick="BrowserPrint()">
<observes element="canPrint" attribute="disabled"/>
</titledbutton>
<titledbutton id="Throbber" onclick="window.frames[0].frames[1].location.href='&throbber.url;'">
<observes element="Browser:Throbber" attribute="busy"/>
</titledbutton>
</toolbar>
<toolbar class="main-bar" chromeclass="toolbar" datasources="rdf:bookmarks" id="NC:PersonalToolbarFolder">
<template>
<rule iscontainer="true">
<titledbutton uri="..." src="resource:/res/rdf/folder-closed.gif" value="rdf:http://home.netscape.com/NC-rdf#Name" align="right" />
</rule>
<rule>
<titledbutton uri="..." src="resource:/res/toolbar/TB_Location.gif" value="rdf:http://home.netscape.com/NC-rdf#Name" align="right" onclick="OpenBookmarkURL(event.target)" />
</rule>
</template>
<titledbutton id="home-button" align="right" value="&homeButton.label;"
onclick="BrowserHome()"/>
<titledbutton id="netscape-button" align="right" value="&netscapeButton.label;"
onclick="window.frames[0].frames[1].location.href='http://home.netscape.com'"/>
<spring flex="100%"/>
</toolbar>
</toolbox>
<html:iframe id="content-frame" src="contentframe.xul" flex="100%" />
<box align="horizontal" id="status-bar">
<titledbutton value="&notifCom.label;" onclick="doTests()"/>
<box id="security-box" class="insecure" align="horizontal" flex="100%">
<box align="vertical" style="width:100px">
<spring flex="100%"/>
<progressmeter id="statusbar-icon" mode="normal" value="0" onclick="dumpProgress()">
<observes element="Browser:LoadingProgress" attribute="mode"/>
<observes element="Browser:Throbber" attribute="busy" onchange="onProgress()"/>
</progressmeter>
<spring flex="100%"/>
</box>
<titledbutton id="statusText" align="right" flex="100%" value="&statusText.label;" style="font-family:sans-serif;font-size:2.5mm">
<observes element="Browser:Status" attribute="value" onchange="onStatus()"/>
</titledbutton>
<spring flex="100%"/>
<titledbutton align="right" value="&buildId.label;" style="font-family:sans-serif;font-size:2.5mm;"/>
<titledbutton id="security-button" class="insecure" value="&security-button.label;" align="right" onclick="securityOff();"/>
</box>
</box>
<toolbox>
<toolbar id="taskbar" chromeclass="status">
<popup id="samplePopup">
<menu><menuitem name="Sample Item One"/><menuitem name="Sample Item Two"/></menu>
</popup>
<box align="horizontal">
<titledbutton align="left" class="popup" popup="samplePopup"
popupanchor="topleft" popupalign="bottomleft" value="&webButton.label;" />
<titledbutton align="left" class="popup" popup="samplePopup"
popupanchor="topleft" popupalign="bottomleft" value="&mailButton.label;" />
<titledbutton align="left" class="popup" popup="samplePopup"
popupanchor="topleft" popupalign="bottomleft" value="&chatButton.label;" />
</box>
<spring flex="100%"/>
<box align="horizontal">
<titledbutton align="left" class="popup" popup="samplePopup"
popupanchor="topleft" popupalign="bottomleft" value="&dayplannerButton.label;" />
<titledbutton align="left" class="popup" popup="samplePopup"
popupanchor="topleft" popupalign="bottomleft" value="&shoppingButton.label;" />
<titledbutton align="left" class="popup" popup="samplePopup"
popupanchor="topleft" popupalign="bottomleft"
value="&myDeskButton.label;" />
</box>
<spring flex="100%"/>
<box align="horizontal">
<titledbutton align="left" class="popup" value="&openWinButton.label;" />
<titledbutton align="left" id="mini-nav" value="" />
<titledbutton align="left" id="mini-mail" value="" onclick="OpenMessenger()"/>
<titledbutton align="left" id="mini-addr" value="" onclick="OpenAddressbook()"/>
<titledbutton align="left" id="mini-comp" value="" />
</box>
</toolbar>
</toolbox>
</box>
</window>

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

@ -0,0 +1,107 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (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
* Netscape Communications Corporation. All Rights Reserved.
*/
var toolkit;
var browser;
var dialog;
function onLoad() {
dialog = new Object;
dialog.input = document.getElementById( "dialog.input" );
dialog.ok = document.getElementById( "dialog.ok" );
dialog.cancel = document.getElementById( "dialog.cancel" );
dialog.help = document.getElementById( "dialog.help" );
dialog.newWindow = document.getElementById( "dialog.newWindow" );
toolkit = XPAppCoresManager.Find( "toolkitCore" );
if ( !toolkit ) {
toolkit = new ToolkitCore();
toolkit.Init( "toolkitCore" );
}
browser = XPAppCoresManager.Find( window.arguments[0] );
if ( !browser ) {
dump( "unable to get browser app core\n" );
toolkit.CloseWindow( window );
return;
}
/* Give input field the focus. */
dialog.input.focus();
}
function onTyping( key ) {
// Look for enter key...
if ( key == 13 ) {
// If ok button not disabled, go for it.
if ( !dialog.ok.disabled ) {
open();
}
} else {
// Check for valid input.
if ( dialog.input.value == "" ) {
// No input, disable ok button if enabled.
if ( !dialog.ok.disabled ) {
dialog.ok.setAttribute( "disabled", "" );
}
} else {
// Input, enable ok button if disabled.
if ( dialog.ok.disabled ) {
dialog.ok.removeAttribute( "disabled" );
}
}
}
}
function open() {
if ( dialog.ok.disabled ) {
return;
}
var url = dialog.input.value;
if ( !dialog.newWindow.checked ) {
/* Load url in opener. */
browser.loadUrl( url );
} else {
/* User wants new window. */
toolkit.ShowWindowWithArgs( "chrome:/navigator/content/navigator.xul", window.opener, url );
}
/* Close dialog. */
toolkit.CloseWindow( window );
}
function choose() {
/* Use existing browser "open" logic. */
browser.openWindow();
toolkit.CloseWindow( window );
}
function cancel() {
toolkit.CloseWindow( window );
}
function help() {
if ( dialog.help.disabled ) {
return;
}
dump( "openLocation::help() not implemented\n" );
}

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

@ -0,0 +1,93 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/xul.css" type="text/css"?>
<!DOCTYPE window>
<window xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="onLoad()"
title="Open Location"
width="420"
height="190">
<html:script language="javascript" src="openLocation.js">
</html:script>
<!--
<box align="vertical">
<box align="horizontal">
Enter the World Wide Web location (URL) you would like to open. Use
the Choose File... button to select a local file:
</box>
<box align="horizontal">
<box align="horizontal" flex="100">
<html:input id="dialog.input"/>
</box>
<box align="horizontal">
<html:button onclick="choose()">Select File...</html:button>
</box>
</box>
<box align="horizontal" flex="100">
<box flex="100">
<html:input id="dialog.newWindow" type="checkbox"/>Open in new window
</box>
<box>
<html:button id="dialog.ok" onclick="open()">Open</html:button>
</box>
<box>
<html:button id="dialog.cancel" onclick="cancel()">Cancel</html:button>
</box>
<box>
<html:button id="dialog.help" onclick="help()" disabled="">Help</html:button>
</box>
</box>
</box>
-->
<html:center>
<html:p/>
<html:table width="400" cellspacing="5">
<html:tr>
<html:td>
Enter the World Wide Web location (URL) you would like to open. Use
the Choose File... button to select a local file:
</html:td>
</html:tr>
<html:tr>
<html:td>
<html:table cellspacing="5">
<html:tr>
<html:td width="275">
<html:input id="dialog.input" style="width:275;" onkeyup="onTyping(event.which)"/>
</html:td>
<html:td width="100">
<html:button onclick="choose()">Select File...</html:button>
</html:td>
</html:tr>
</html:table>
</html:td>
</html:tr>
<html:tr>
<html:td>
<html:table cellspacing="5">
<html:tr>
<html:td width="165">
<html:input id="dialog.newWindow" type="checkbox"/>Open in new window
</html:td>
<html:td width="70">
<html:button id="dialog.ok" onclick="open()" disabled="">Open</html:button>
</html:td>
<html:td width="70">
<html:button id="dialog.cancel" onclick="cancel()">Cancel</html:button>
</html:td>
<html:td width="70">
<html:button id="dialog.help" onclick="help()" disabled="">Help</html:button>
</html:td>
</html:tr>
</html:table>
</html:td>
</html:tr>
</html:table>
<html:p/>
</html:center>
</window>

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

@ -0,0 +1,285 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/xul.css" type="text/css"?>
<?xml-stylesheet href="chrome://navigator/skin/" type="text/css"?>
<!DOCTYPE window
[
<!ENTITY mainWindow.title "Mozilla">
<!ENTITY fileMenu.label "File">
<!ENTITY browserCmd.label "New Browser Window">
<!ENTITY newMenu.label "New">
<!ENTITY newMailCmd.label "Mail Message">
<!ENTITY newChatCmd.label "Chat Window">
<!ENTITY newBlankPageCmd.label "Chat Window">
<!ENTITY newPageFromTemplateCmd.label "Page Using Template">
<!ENTITY newPageFromDraftCmd.label "Page using Draft">
<!ENTITY openCmd.label "Open">
<!ENTITY sendPageCmd.label "Send Page">
<!ENTITY offlineMenu.label "Offline">
<!ENTITY offlineGoOfflineCmd.label "Go Offline">
<!ENTITY offlineSynchronizeCmd.label "Synchronize">
<!ENTITY printSetupCmd.label "Print Setup">
<!ENTITY printPreviewCmd.label "Print Preview">
<!ENTITY printCmd.label "Print">
<!ENTITY closeCmd.label ".Close">
<!ENTITY quitCmd.label "Quit">
<!ENTITY editMenu.label "Edit">
<!ENTITY undoCmd.label "Undo">
<!ENTITY redoCmd.label "Redo">
<!ENTITY cutCmd.label "Cut">
<!ENTITY copyCmd.label "Copy">
<!ENTITY pasteCmd.label "Paste">
<!ENTITY deleteCmd.label "Delete">
<!ENTITY walletMenu.label "Wallet">
<!ENTITY walletSafeFillCmd.label "Safe Form Fill">
<!ENTITY walletQuickFillCmd.label "Quick Form Fill">
<!ENTITY walletContentsCmd.label "Wallet Contents">
<!ENTITY walletDisplaySignonsCmd.label "Display Signons">
<!ENTITY walletDisplayCookiesCmd.label "Display Cookies">
<!ENTITY walletSamplesCmd.label "Samples">
<!ENTITY walletChangePasswordCmd.label "Change Password">
<!ENTITY selectAllCmd.label "Select All">
<!ENTITY preferences.label "Preferences">
<!ENTITY viewMenu.label "View">
<!ENTITY toolbarsCmd.label "Toolbars">
<!ENTITY sidebarCmd.label "Sidebar">
<!ENTITY enlargeTextSizeCmd.label "Enlarge Text Size">
<!ENTITY reduceTextSizeCmd.label "Reduce Text Size">
<!ENTITY useStyleSheetMenu.label "Use Stylesheet">
<!ENTITY useStyleSheetDefaultCmd.label "Default">
<!ENTITY useStyleSheetEasyReadingCmd.label "Easy Reading">
<!ENTITY useStyleSheetMaximumInformationCmd.label "Maximum Information">
<!ENTITY useStlyleSheetBizarreCmd.label "Bizarre">
<!ENTITY reloadCmd.label "Reload">
<!ENTITY showImagesCmd.label "Show Images">
<!ENTITY stopCmd.label "Stop">
<!ENTITY pageSourceCmd.label "Page Source">
<!ENTITY pageInfoCmd.label "Page Info">
<!ENTITY charSetMenu.label "Character Set">
<!ENTITY charWesternCmd.label "Latin1">
<!ENTITY charJapaneseCmd.label "Japanese (ISO-2022-JP)">
<!ENTITY charShiftJisCmd.label "Shift_JIS">
<!ENTITY charEupCmd.label "EUC-JP">
<!ENTITY searchMenu.label "Search">
<!ENTITY findOnCmd.label "Find On this page...">
<!ENTITY findAgainCmd.label "Find Again">
<!ENTITY searchParentCmd.label "Search Parent Item...">
<!ENTITY searchParenet2Cmd.label "Search Parent2 Item">
<!ENTITY appSpecificCmd.label "App Specific">
<!ENTITY searchInternetCmd.label "Search the Internet...">
<!ENTITY searchAllMailCmd.label "Search All Mail....">
<!ENTITY searchBookmarksCmd.label "Search Bookmarks...">
<!ENTITY searchPeopleCmd.label "Search People...">
<!ENTITY searchComputerCmd.label "Search on this Computer...">
<!ENTITY goMenu.label "Menu">
<!ENTITY goBackCmd.label "Go Back">
<!ENTITY goForwardCmd.label "Go Forward">
<!ENTITY goHomeCmd.label "Home">
<!ENTITY tasksMenu.label "Tasks">
<!ENTITY navigatorCmd.label "Navigator">
<!ENTITY messengerCmd.label "Messenger">
<!ENTITY editorCmd.label "Editor">
<!ENTITY manageHistoryCmd.label "Manage History">
<!ENTITY chatCmd.label "Chat">
<!ENTITY shoppingCartCmd.label "Shopping Cart">
<!ENTITY toolsMenu.label "Tools">
<!ENTITY toolsPluginsInfoCmd.label "Plugins Info">
<!ENTITY toolsJavaConsoleCmd.label "Java/JS Console">
<!ENTITY toolsServerToolsCmd.label "Server Tools">
<!ENTITY toolsJavascriptDebuggerCmd.label "JavaScipt Debugger">
<!ENTITY securityInfo.label "Security Info">
<!ENTITY window1Cmd.label "Window 1">
<!ENTITY window2Cmd.label "Window 2">
<!ENTITY window3Cmd.label "Window 3">
<!ENTITY helpMenuCmd.label "Help">
<!ENTITY helpContentsCmd.label "Help Contents">
<!ENTITY howTutorialCmd.label "How to Tutorial">
<!ENTITY helpChannelCmd.label "Help Channel">
<!ENTITY softwareUpdatesCmd.label "Software Updates">
<!ENTITY technicalSupportCmd.label "Technical Support">
<!ENTITY releaseNotesCmd.label "Release Notes">
<!ENTITY aboutCommunicatorCmd.label "About Communicator Prototype">
]>
<window id="main-window" xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onunload="if (appCore) appCore.close()"
title="Mozilla">
<html:script src="navigator.js"></html:script>
<html:script src="viewsource.js"></html:script>
<broadcaster id="args" value="http://www.mozilla.org/"/>
<broadcaster id="canPrint"/>
<broadcaster id="canGoBack" disabled="true"/>
<broadcaster id="Browser:LoadingProgress"/>
<broadcaster id="Browser:Status"/>
<broadcaster id="Browser:OnStartBinding"/>
<broadcaster id="Browser:OnStopBinding"/>
<broadcaster id="Browser:Throbber" busy="false"/>
<!-- Interim hack to transition from nsIXULWindowCallbacks/ShowWindowWithArgs -->
<broadcaster id="dialog.start" ready="false"/>
<observes element="dialog.start" attribute="ready" onchange="StartupViewSource()"/>
<menubar>
<menu name="&fileMenu.label;">
<menuitem name="&browserCmd.label;" onclick="BrowserNewWindow();"/>
<menu name="&newMenu.label;">
<menuitem name="&newMailCmd.label;" onclick="MsgNewMessage();"/>
<menuitem name="&newChatCmd.label;" onclick=""/>
<separator />
<menuitem name="&newBlankPageCmd.label;" onclick="BrowserNewWindow();"/>
<menuitem name="&newPageFromTemplateCmd.label;" onclick="BrowserNewWindow();"/>
<menuitem name="&newPageFromDraftCmd.label;" onclick="BrowserNewWindow();"/>
</menu>
<menuitem name="&openCmd.label;" onclick="BrowserOpenWindow();"/>
<separator />
<menuitem name="&sendPageCmd.label;" onclick="NotImplementedYet();"/>
<separator />
<menu name="&offlineMenu.label;">
<menuitem name="&offlineGoOfflineCmd.label;" onclick="NotImplementedYet();"/>
<separator />
<menuitem name="&offlineSynchronizeCmd.label;" onclick="NotImplementedYet();"/>
</menu>
<separator />
<menuitem name="&printSetupCmd.label;" onclick=";"/>
<menuitem name="&printPreviewCmd.label;" onclick=""/>
<menuitem name="&printCmd.label;" onclick="BrowserPrint()"/>
<separator />
<menuitem name="closeCmd.label" onclick="BrowserClose();"/>
<menuitem name="quitCmd.label" onclick="BrowserExit();"/>
</menu>
<menu name="&editMenu.label;">
<menuitem name="&undoCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&redoCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<separator />
<menuitem name="&cutCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&copyCmd.label;" onclick="BrowserCopy();"/>
<menuitem name="&pasteCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&deleteCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<separator />
<menuitem name="&selectAllCmd.label;" onclick="NotImplementedYet();"/>
<separator />
<menuitem name="&preferences.label;" onclick="DoPreferences();"/>
</menu>
<menu name="&viewMenu.label;">
<menuitem name="&toolbarsCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&sidebarCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<separator />
<menuitem name="&enlargeTextSizeCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="Reduce Text Size" onclick="NotImplementedYet();" disabled=""/>
<separator />
<menu name="&useStyleSheetMenu.label;" onclick="NotImplementedYet();">
<menuitem name="&useStyleSheetDefaultCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<separator />
<menuitem name="&useStyleSheetEasyReadingCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&useStyleSheetMaximumInformationCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&useStlyleSheetBizarreCmd.label;" onclick="NotImplementedYet();" disabled=""/>
</menu>
<separator />
<menuitem name="&reloadCmd.label;" onclick="BrowserReload();" disabled=""/>
<menuitem name="&showImagesCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&stopCmd.label;" onclick="NotImplementedYet();"/>
<separator />
<menuitem name="&pageSourceCmd.label;" onclick="BrowserViewSource();" disabled=""/>
<menuitem name="&pageInfoCmd.label;" onclick="NotImplementedYet();"/>
<separator />
<menu name="&charSetMenu.label;">
<menuitem name="&charWesternCmd.label;" onclick="BrowserSetDocumentCharacterSet('ISO-8859-1');"/>
<menuitem name="&charJapaneseCmd.label;" onclick="BrowserSetDocumentCharacterSet('ISO-2022-JP');"/>
<menuitem name="&charShiftJisCmd.label;" onclick="BrowserSetDocumentCharacterSet('Shift_JIS');"/>
<menuitem name="&charEupCmd.label;" onclick="BrowserSetDocumentCharacterSet('EUC-JP');"/>
</menu>
</menu>
<menu name="&searchMenu.label;">
<menuitem name="&findOnCmd.label;" onclick="BrowserFind();;" disabled=""/>
<menuitem name="&findAgainCmd.label;" onclick="BrowserFindAgain();" disabled=""/>
<separator />
<menuitem name="&searchParentCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&searchParenet2Cmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&appSpecificCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&appSpecificCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<separator />
<menuitem name="&searchInternetCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&searchAllMailCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&searchBookmarksCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&searchPeopleCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<separator />
<menuitem name="&searchComputerCmd.label;" onclick="NotImplementedYet();" disabled=""/>
</menu>
<menu name="&goMenu.label;">
<menuitem name="&goBackCmd.label;" onclick="BrowserBack();" disabled=""/>
<menuitem name="&goForwardCmd.label;" onclick="BrowserForward();" disabled=""/>
<menuitem name="&goHomeCmd.label;" onclick="BrowserHome();" disabled=""/>
</menu>
<menu name="&tasksMenu.label;">
<menuitem name="&navigatorCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&messengerCmd.label;" onclick="OpenMessenger();" />
<menuitem name="&editorCmd.label;" onclick="OpenEditor();" />
<menuitem name="&manageHistoryCmd.label;" onclick="OpenHistoryView();" />
<menuitem name="&chatCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&shoppingCartCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menu name="&toolsMenu.label;">
<menuitem name="&toolsPluginsInfoCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&toolsServerToolsCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&toolsJavaConsoleCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&toolsJavascriptDebuggerCmd.label;" onclick="NotImplementedYet();" disabled=""/>
</menu>
<separator />
<menuitem name="&securityInfo.label;" onclick="NotImplementedYet();" disabled=""/>
<separator/>
<menuitem name="&window1Cmd.label;" onclick="NotImplementedYet();" key="1" disabled=""/>
<menuitem name="&window2Cmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&window3Cmd.label;" onclick="NotImplementedYet();" disabled=""/>
</menu>
<menu name="&helpMenuCmd.label;">
<menuitem name="&helpContentsCmd.label;" onclick="window.frames[0].location.href = 'http://www.mozilla.org/projects/user-docs/local/browserhelp/browsertop.html'" disabled=""/>
<separator />
<menuitem name="&howTutorialCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&helpChannelCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<separator />
<menuitem name="&softwareUpdatesCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&technicalSupportCmd.label;" onclick="NotImplementedYet();" disabled=""/>
<menuitem name="&releaseNotesCmd.label;"
onclick="window.frames[0].location.href='http://www.mozilla.org/projects/seamonkey/release-notes/index.html'" disabled=""/>
<separator />
<menuitem name="&aboutCommunicatorCmd.label;"
onclick="window.frames[0].location.href='http://www.mozilla.org/projects/seamonkey/release-notes/index.html'" disabled=""/>
</menu>
</menubar>
<box id="outer-box" align="vertical">
<html:iframe id="content-frame" type="content" html:name="content" html:src="about:blank" flex="100%"/>
<box align="horizontal" id="status-bar">
<box id="security-box" class="insecure" align="horizontal" flex="100%">
<box align="vertical" style="width:100px">
<spring flex="100%"/>
<progressmeter id="statusbar-icon" mode="normal" value="0" onclick="dumpProgress()">
<observes element="Browser:LoadingProgress" attribute="mode"/>
<observes element="Browser:Throbber" attribute="busy" onchange="onProgress()"/>
</progressmeter>
<spring flex="100%"/>
</box>
<titledbutton id="statusText" align="right" flex="100%" value="Document: Done" style="font-family:sans-serif;font-size:2.5mm">
<observes element="Browser:Status" attribute="value" onchange="onStatus()"/>
</titledbutton>
<spring flex="100%"/>
<titledbutton align="right" value="Build ID: 1999040601" style="font-family:sans-serif;font-size:2.5mm;"/>
</box>
</box>
</box>
</window>

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

@ -0,0 +1,17 @@
function StartupViewSource() {
// Generate unique name (var appCoreName declared in navigator.js).
appCoreName = "ViewSource." + ( new Date() ).getTime().toString();
// Create and initialize the browser app core.
appCore = new BrowserAppCore();
appCore.Init( appCoreName );
appCore.setContentWindow(window.frames[0]);
appCore.setWebShellWindow(window);
appCore.setToolbarWindow(window);
// Get url whose source to view.
var url = document.getElementById("args").getAttribute("value");
// Load the source (the app core will magically know what to do).
appCore.loadUrl(url);
}