зеркало из https://github.com/mozilla/gecko-dev.git
More cleanup.
This commit is contained in:
Родитель
5f237d4aba
Коммит
89886eb96d
|
@ -586,7 +586,6 @@ pref("bidi.support", 1);
|
|||
// 2 = defaultcharactersetBidi
|
||||
pref("bidi.characterset", 1);
|
||||
|
||||
|
||||
pref("browser.throbber.url","chrome://navigator-region/locale/region.properties");
|
||||
|
||||
// used for double-click word selection behavior. Win will override.
|
||||
|
|
|
@ -451,20 +451,6 @@ function Shutdown()
|
|||
appCore.close();
|
||||
}
|
||||
|
||||
function Translate()
|
||||
{
|
||||
var service = pref.getCharPref("browser.translation.service");
|
||||
var serviceDomain = pref.getCharPref("browser.translation.serviceDomain");
|
||||
var targetURI = getWebNavigation().currentURI.spec;
|
||||
|
||||
// if we're already viewing a translated page, then just reload
|
||||
if (targetURI.indexOf(serviceDomain) >= 0)
|
||||
BrowserReload();
|
||||
else {
|
||||
loadURI(service + escape(targetURI));
|
||||
}
|
||||
}
|
||||
|
||||
function gotoHistoryIndex(aEvent)
|
||||
{
|
||||
var index = aEvent.target.getAttribute("index");
|
||||
|
@ -630,102 +616,6 @@ function addBookmarkAs(aBrowser)
|
|||
BookmarksUtils.addBookmarkForBrowser(aBrowser.webNavigation, true);
|
||||
}
|
||||
|
||||
function readRDFString(aDS,aRes,aProp)
|
||||
{
|
||||
var n = aDS.GetTarget(aRes, aProp, true);
|
||||
return n ? n.QueryInterface(Components.interfaces.nsIRDFLiteral).Value : "";
|
||||
}
|
||||
|
||||
|
||||
function ensureDefaultEnginePrefs(aRDF,aDS)
|
||||
{
|
||||
var mPrefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
|
||||
var defaultName = mPrefs.getComplexValue("browser.search.defaultenginename", Components.interfaces.nsIPrefLocalizedString).data;
|
||||
var kNC_Root = aRDF.GetResource("NC:SearchEngineRoot");
|
||||
var kNC_child = aRDF.GetResource("http://home.netscape.com/NC-rdf#child");
|
||||
var kNC_Name = aRDF.GetResource("http://home.netscape.com/NC-rdf#Name");
|
||||
|
||||
var arcs = aDS.GetTargets(kNC_Root, kNC_child, true);
|
||||
while (arcs.hasMoreElements()) {
|
||||
var engineRes = arcs.getNext().QueryInterface(Components.interfaces.nsIRDFResource);
|
||||
var name = readRDFString(aDS, engineRes, kNC_Name);
|
||||
if (name == defaultName)
|
||||
mPrefs.setCharPref("browser.search.defaultengine", engineRes.Value);
|
||||
}
|
||||
}
|
||||
|
||||
function ensureSearchPref()
|
||||
{
|
||||
var rdf = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
|
||||
var ds = rdf.GetDataSource("rdf:internetsearch");
|
||||
var mPrefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
|
||||
var kNC_Name = rdf.GetResource("http://home.netscape.com/NC-rdf#Name");
|
||||
var defaultEngine;
|
||||
try {
|
||||
defaultEngine = mPrefs.getCharPref("browser.search.defaultengine");
|
||||
} catch(ex) {
|
||||
ensureDefaultEnginePrefs(rdf, ds);
|
||||
defaultEngine = mPrefs.getCharPref("browser.search.defaultengine");
|
||||
}
|
||||
}
|
||||
|
||||
function getSearchUrl(attr)
|
||||
{
|
||||
var rdf = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
|
||||
var ds = rdf.GetDataSource("rdf:internetsearch");
|
||||
var kNC_Root = rdf.GetResource("NC:SearchEngineRoot");
|
||||
var mPrefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
|
||||
var defaultEngine = mPrefs.getCharPref("browser.search.defaultengine");
|
||||
var engineRes = rdf.GetResource(defaultEngine);
|
||||
var prop = "http://home.netscape.com/NC-rdf#" + attr;
|
||||
var kNC_attr = rdf.GetResource(prop);
|
||||
var searchURL = readRDFString(ds, engineRes, kNC_attr);
|
||||
return searchURL;
|
||||
}
|
||||
|
||||
function QualifySearchTerm()
|
||||
{
|
||||
// If the text in the URL bar is the same as the currently loaded
|
||||
// page's URL then treat this as an empty search term. This way
|
||||
// the user is taken to the search page where s/he can enter a term.
|
||||
if (window.XULBrowserWindow.userTyped.value)
|
||||
return document.getElementById("urlbar").value;
|
||||
return "";
|
||||
}
|
||||
|
||||
function BrowserSearchInternet()
|
||||
{
|
||||
try {
|
||||
var searchEngineURI = pref.getCharPref("browser.search.defaultengine");
|
||||
if (searchEngineURI) {
|
||||
var searchRoot = getSearchUrl("searchForm");
|
||||
if (searchRoot) {
|
||||
loadURI(searchRoot);
|
||||
return;
|
||||
} else {
|
||||
// Get a search URL and guess that the front page of the site has a search form.
|
||||
var searchDS = Components.classes["@mozilla.org/rdf/datasource;1?name=internetsearch"]
|
||||
.getService(Components.interfaces.nsIInternetSearchService);
|
||||
searchURL = searchDS.GetInternetSearchURL(searchEngineURI, "ABC", 0, 0, {value:0});
|
||||
if (searchURL) {
|
||||
searchRoot = searchURL.match(/[a-z]+:\/\/[a-z.-]+/);
|
||||
if (searchRoot) {
|
||||
loadURI(searchRoot + "/");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (ex) {
|
||||
}
|
||||
|
||||
// Fallback if the stuff above fails: use the hard-coded search engine
|
||||
loadURI(gNavigatorRegionBundle.getString("otherSearchURL"));
|
||||
}
|
||||
|
||||
|
||||
//Note: BrowserNewEditorWindow() was moved to globalOverlay.xul and renamed to NewEditorWindow()
|
||||
|
||||
function BrowserOpenWindow()
|
||||
{
|
||||
//opens a window where users can select a web location to open
|
||||
|
@ -930,18 +820,6 @@ function readFromClipboard()
|
|||
return url;
|
||||
}
|
||||
|
||||
function OpenMessenger()
|
||||
{
|
||||
open("chrome://messenger/content/messenger.xul", "_blank",
|
||||
"chrome,extrachrome,menubar,resizable,status,toolbar");
|
||||
}
|
||||
|
||||
function OpenAddressbook()
|
||||
{
|
||||
open("chrome://messenger/content/addressbook/addressbook.xul", "_blank",
|
||||
"chrome,extrachrome,menubar,resizable,status,toolbar");
|
||||
}
|
||||
|
||||
function BrowserViewSourceOfDocument(aDocument)
|
||||
{
|
||||
var docCharset;
|
||||
|
@ -1006,22 +884,6 @@ function BrowserPageInfo(doc)
|
|||
doc);
|
||||
}
|
||||
|
||||
function hiddenWindowStartup()
|
||||
{
|
||||
// focus the hidden window
|
||||
window.focus();
|
||||
|
||||
// Disable menus which are not appropriate
|
||||
var disabledItems = ['cmd_close', 'Browser:SendPage', 'Browser:EditPage', 'Browser:PrintSetup', /*'Browser:PrintPreview',*/
|
||||
'Browser:Print', 'Browser:Back', 'Browser:Forward', 'Browser:Home', 'Browser:AddBookmark', 'cmd_undo',
|
||||
'cmd_redo', 'cmd_cut', 'cmd_copy','cmd_paste', 'cmd_delete', 'cmd_selectAll', 'menu_textZoom'];
|
||||
for (var id in disabledItems) {
|
||||
var broadcaster = document.getElementById(disabledItems[id]);
|
||||
if (broadcaster)
|
||||
broadcaster.setAttribute("disabled", "true");
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize the LeakDetector class.
|
||||
function LeakDetector(verbose)
|
||||
{
|
||||
|
@ -1254,59 +1116,6 @@ function stylesheetSwitchAll(frameset, title) {
|
|||
}
|
||||
}
|
||||
|
||||
function applyTheme(themeName)
|
||||
{
|
||||
var id = themeName.getAttribute('id');
|
||||
var name=id.substring('urn:mozilla.skin.'.length, id.length);
|
||||
if (!name)
|
||||
return;
|
||||
|
||||
var chromeRegistry = Components.classes["@mozilla.org/chrome/chrome-registry;1"]
|
||||
.getService(Components.interfaces.nsIXULChromeRegistry);
|
||||
|
||||
var oldTheme = false;
|
||||
try {
|
||||
oldTheme = !chromeRegistry.checkThemeVersion(name);
|
||||
}
|
||||
catch(e) {
|
||||
}
|
||||
|
||||
|
||||
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
|
||||
if (oldTheme) {
|
||||
var title = gNavigatorBundle.getString("oldthemetitle");
|
||||
var message = gNavigatorBundle.getString("oldTheme");
|
||||
|
||||
message = message.replace(/%theme_name%/, themeName.getAttribute("displayName"));
|
||||
message = message.replace(/%brand%/g, gBrandBundle.getString("brandShortName"));
|
||||
|
||||
if (promptService.confirm(window, title, message)){
|
||||
var inUse = chromeRegistry.isSkinSelected(name, true);
|
||||
|
||||
chromeRegistry.uninstallSkin( name, true );
|
||||
|
||||
var str = Components.classes["@mozilla.org/supports-wstring;1"]
|
||||
.createInstance(Components.interfaces.nsISupportsWString);
|
||||
|
||||
str.data = true;
|
||||
pref.setComplexValue("general.skins.removelist." + name,
|
||||
Components.interfaces.nsISupportsWString, str);
|
||||
|
||||
if (inUse)
|
||||
chromeRegistry.refreshSkins();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
chromeRegistry.selectSkin(name, true);
|
||||
chromeRegistry.refreshSkins();
|
||||
}
|
||||
|
||||
function getNewThemes()
|
||||
{
|
||||
loadURI(gBrandRegionBundle.getString("getNewThemesURL"));
|
||||
}
|
||||
|
||||
function URLBarFocusHandler(aEvent)
|
||||
{
|
||||
|
@ -1355,7 +1164,7 @@ function ShowAndSelectContentsOfURLBar()
|
|||
|
||||
// If it's hidden, show it.
|
||||
if (navBar.getAttribute("hidden") == "true")
|
||||
goToggleToolbar('nav-bar','cmd_viewnavbar');
|
||||
goToggleToolbar('nav-bar','toggle_navbar');
|
||||
|
||||
if (gURLBar.value)
|
||||
gURLBar.select();
|
||||
|
@ -1554,26 +1363,6 @@ function toHistory()
|
|||
|
||||
}
|
||||
|
||||
function checkTheme()
|
||||
{
|
||||
var theSkinKids = document.getElementById("theme");
|
||||
var chromeRegistry = Components.classes["@mozilla.org/chrome/chrome-registry;1"]
|
||||
.getService(Components.interfaces.nsIXULChromeRegistry);
|
||||
for (var i = 0; i < theSkinKids.childNodes.length; ++i) {
|
||||
var child = theSkinKids.childNodes[i];
|
||||
var id=child.getAttribute("id");
|
||||
if (id.length > 0) {
|
||||
var themeName = id.substring('urn:mozilla:skin:'.length, id.length);
|
||||
var selected = chromeRegistry.isSkinSelected(themeName, true);
|
||||
if (selected == Components.interfaces.nsIChromeRegistry.FULL) {
|
||||
var menuitem=document.getElementById(id);
|
||||
menuitem.setAttribute("checked", true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getWebNavigation()
|
||||
{
|
||||
try {
|
||||
|
|
|
@ -208,175 +208,175 @@ Contributor(s):
|
|||
<tooltip id="aHTMLTooltip" onpopupshowing="return FillInHTMLTooltip(document.tooltipNode);"/>
|
||||
|
||||
<popupset id="bookmarksPopupset"/>
|
||||
<popup id="toolbar-context-menu">
|
||||
<menuitem oncommand="BrowserCustomizeToolbar()"
|
||||
label="&viewCustomizeToolbar.label;"
|
||||
accesskey="&viewCustomizeToolbar.accesskey;"/>
|
||||
</popup>
|
||||
<popup id="toolbar-context-menu">
|
||||
<menuitem oncommand="BrowserCustomizeToolbar()"
|
||||
label="&viewCustomizeToolbar.label;"
|
||||
accesskey="&viewCustomizeToolbar.accesskey;"/>
|
||||
</popup>
|
||||
|
||||
<popup id="contentAreaContextMenu"
|
||||
onpopupshowing="gContextMenu = new nsContextMenu( this ); return gContextMenu.shouldDisplay;"
|
||||
onpopuphiding="gContextMenu = null;">
|
||||
<menuitem id="context-openlink"
|
||||
label="&openLinkCmd.label;"
|
||||
accesskey="&openLinkCmd.accesskey;"
|
||||
oncommand="gContextMenu.openLink();"/>
|
||||
<menuitem id="context-openlinkintab"
|
||||
label="&openLinkCmdInTab.label;"
|
||||
accesskey="&openLinkCmdInTab.accesskey;"
|
||||
oncommand="gContextMenu.openLinkInTab();"/>
|
||||
<menuseparator id="context-sep-open"/>
|
||||
<menuitem id="context-bookmarklink"
|
||||
label="&bookmarkLinkCmd.label;"
|
||||
accesskey="&bookmarkLinkCmd.accesskey;"
|
||||
oncommand="BookmarksUtils.addBookmark(gContextMenu.linkURL(),
|
||||
gContextMenu.linkText(),
|
||||
undefined, true);"/>
|
||||
<menuitem id="context-savelink"
|
||||
label="&saveLinkCmd.label;"
|
||||
accesskey="&saveLinkCmd.accesskey;"
|
||||
oncommand="gContextMenu.saveLink();"/>
|
||||
<menuitem id="context-copyemail"
|
||||
label="©EmailCmd.label;"
|
||||
accesskey="©EmailCmd.accesskey;"
|
||||
oncommand="gContextMenu.copyEmail();"/>
|
||||
<menuitem id="context-copylink"
|
||||
label="©LinkCmd.label;"
|
||||
accesskey="©LinkCmd.accesskey;"
|
||||
command="cmd_copyLink"/>
|
||||
<menuseparator id="context-sep-copylink"/>
|
||||
<menuitem id="context-viewimage"
|
||||
label="&viewImageCmd.label;"
|
||||
accesskey="&viewImageCmd.accesskey;"
|
||||
oncommand="gContextMenu.viewImage();"/>
|
||||
<menuitem id="context-copyimage"
|
||||
label="©ImageCmd.label;"
|
||||
accesskey="©ImageCmd.accesskey;"
|
||||
command="cmd_copyImageLocation"/>
|
||||
<menuseparator id="context-sep-copyimage"/>
|
||||
<menuitem id="context-saveimage"
|
||||
label="&saveImageCmd.label;"
|
||||
accesskey="&saveImageCmd.accesskey;"
|
||||
oncommand="gContextMenu.saveImage();"/>
|
||||
<menuitem id="context-setWallpaper"
|
||||
label="&setWallpaperCmd.label;"
|
||||
accesskey="&setWallpaperCmd.accesskey;"
|
||||
oncommand="gContextMenu.setWallpaper();"/>
|
||||
<menuseparator id="context-sep-image"/>
|
||||
<menuitem id="context-back"
|
||||
label="&backCmd.label;"
|
||||
accesskey="&backCmd.accesskey;"
|
||||
oncommand="BrowserBack()"/>
|
||||
<menuitem id="context-forward"
|
||||
label="&forwardCmd.label;"
|
||||
accesskey="&forwardCmd.accesskey;"
|
||||
oncommand="BrowserForward()"/>
|
||||
<menuitem id="context-reload"
|
||||
label="&reloadCmd.label;"
|
||||
accesskey="&reloadCmd.accesskey;"
|
||||
oncommand="BrowserReload();"/>
|
||||
<menuitem id="context-stop"
|
||||
label="&stopCmd.label;"
|
||||
accesskey="&stopCmd.accesskey;"
|
||||
command="Browser:Stop"/>
|
||||
<menuseparator id="context-sep-stop"/>
|
||||
<menuitem id="context-bookmarkpage"
|
||||
label="&bookmarkPageCmd.label;"
|
||||
accesskey="&bookmarkPageCmd.accesskey;"
|
||||
oncommand="addBookmarkAs(document.getElementById('content'));"/>
|
||||
<menuitem id="context-savepage"
|
||||
label="&savePageCmd.label;"
|
||||
accesskey="&savePageCmd.accesskey;"
|
||||
oncommand="saveDocument(window._content.document);"/>
|
||||
<menuseparator id="context-sep-viewbgimage"/>
|
||||
<menuitem id="context-viewbgimage"
|
||||
label="&viewBGImageCmd.label;"
|
||||
accesskey="&viewBGImageCmd.accesskey;"
|
||||
oncommand="gContextMenu.viewBGImage();"/>
|
||||
<menuitem id="context-undo"
|
||||
label="&undoCmd.label;"
|
||||
accesskey="&undoCmd.accesskey;"
|
||||
command="cmd_undo"/>
|
||||
<menuseparator id="context-sep-undo"/>
|
||||
<menuitem id="context-cut"
|
||||
label="&cutCmd.label;"
|
||||
accesskey="&cutCmd.accesskey;"
|
||||
command="cmd_cut"/>
|
||||
<menuitem id="context-copy"
|
||||
label="©Cmd.label;"
|
||||
accesskey="©Cmd.accesskey;"
|
||||
command="cmd_copy"/>
|
||||
<menuitem id="context-paste"
|
||||
label="&pasteCmd.label;"
|
||||
accesskey="&pasteCmd.accesskey;"
|
||||
command="cmd_paste"/>
|
||||
<menuitem id="context-delete"
|
||||
label="&deleteCmd.label;"
|
||||
accesskey="&deleteCmd.accesskey;"
|
||||
command="cmd_delete"/>
|
||||
<menuseparator id="context-sep-paste"/>
|
||||
<menuitem id="context-selectall"
|
||||
label="&selectAllCmd.label;"
|
||||
accesskey="&selectAllCmd.accesskey;"
|
||||
command="cmd_selectAll"/>
|
||||
<menuseparator id="context-sep-selectall"/>
|
||||
<menuitem id="context-searchselect"
|
||||
accesskey="&search.accesskey;"
|
||||
oncommand="OpenSearch('internet', false, gContextMenu.searchSelected(), true);"/>
|
||||
<menuseparator id="frame-sep"/>
|
||||
<menu id="frame" label="&thisFrameMenu.label;" accesskey="&thisFrameMenu.accesskey;">
|
||||
<menupopup>
|
||||
<menuitem label="&showOnlyThisFrameCmd.label;"
|
||||
accesskey="&showOnlyThisFrameCmd.accesskey;"
|
||||
oncommand="gContextMenu.showOnlyThisFrame();"/>
|
||||
<menuitem label="&openFrameCmd.label;"
|
||||
accesskey="&openFrameCmd.accesskey;"
|
||||
oncommand="gContextMenu.openFrame();"/>
|
||||
<menuitem label="&openFrameCmdInTab.label;"
|
||||
accesskey="&openFrameCmdInTab.accesskey;"
|
||||
oncommand="gContextMenu.openFrameInTab();"/>
|
||||
<menuseparator/>
|
||||
<menuitem label="&reloadFrameCmd.label;"
|
||||
accesskey="&reloadFrameCmd.accesskey;"
|
||||
oncommand="gContextMenu.reloadFrame();"/>
|
||||
<menuseparator/>
|
||||
<menuitem label="&bookmarkFrameCmd.label;"
|
||||
accesskey="&bookmarkFrameCmd.accesskey;"
|
||||
oncommand="gContextMenu.addBookmarkForFrame();"/>
|
||||
<menuitem label="&saveFrameCmd.label;"
|
||||
accesskey="&saveFrameCmd.accesskey;"
|
||||
oncommand="saveDocument(gContextMenu.target.ownerDocument);"/>
|
||||
<menuseparator/>
|
||||
<menuitem label="&viewFrameSourceCmd.label;"
|
||||
accesskey="&viewFrameSourceCmd.accesskey;"
|
||||
oncommand="gContextMenu.viewFrameSource();"/>
|
||||
<menuitem label="&viewFrameInfoCmd.label;"
|
||||
accesskey="&viewFrameInfoCmd.accesskey;"
|
||||
oncommand="gContextMenu.viewFrameInfo();"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
<menuseparator id="context-sep-properties"/>
|
||||
<menuitem id="context-viewpartialsource-selection"
|
||||
label="&viewPartialSourceForSelectionCmd.label;"
|
||||
accesskey="&viewPartialSourceCmd.accesskey;"
|
||||
oncommand="gContextMenu.viewPartialSource('selection');"/>
|
||||
<menuitem id="context-viewpartialsource-mathml"
|
||||
label="&viewPartialSourceForMathMLCmd.label;"
|
||||
accesskey="&viewPartialSourceCmd.accesskey;"
|
||||
oncommand="gContextMenu.viewPartialSource('mathml');"/>
|
||||
<menuitem id="context-viewsource"
|
||||
label="&viewPageSourceCmd.label;"
|
||||
accesskey="&viewPageSourceCmd.accesskey;"
|
||||
oncommand="BrowserViewSourceOfDocument(_content.document);"/>
|
||||
<menuitem id="context-viewinfo"
|
||||
label="&viewPageInfoCmd.label;"
|
||||
accesskey="&viewPageInfoCmd.accesskey;"
|
||||
oncommand="gContextMenu.viewInfo();"/>
|
||||
<menuitem id="context-metadata"
|
||||
label="&metadataCmd.label;"
|
||||
accesskey="&metadataCmd.accesskey;"
|
||||
oncommand="gContextMenu.showMetadata();"/>
|
||||
</popup>
|
||||
<popup id="contentAreaContextMenu"
|
||||
onpopupshowing="gContextMenu = new nsContextMenu( this ); return gContextMenu.shouldDisplay;"
|
||||
onpopuphiding="gContextMenu = null;">
|
||||
<menuitem id="context-openlink"
|
||||
label="&openLinkCmd.label;"
|
||||
accesskey="&openLinkCmd.accesskey;"
|
||||
oncommand="gContextMenu.openLink();"/>
|
||||
<menuitem id="context-openlinkintab"
|
||||
label="&openLinkCmdInTab.label;"
|
||||
accesskey="&openLinkCmdInTab.accesskey;"
|
||||
oncommand="gContextMenu.openLinkInTab();"/>
|
||||
<menuseparator id="context-sep-open"/>
|
||||
<menuitem id="context-bookmarklink"
|
||||
label="&bookmarkLinkCmd.label;"
|
||||
accesskey="&bookmarkLinkCmd.accesskey;"
|
||||
oncommand="BookmarksUtils.addBookmark(gContextMenu.linkURL(),
|
||||
gContextMenu.linkText(),
|
||||
undefined, true);"/>
|
||||
<menuitem id="context-savelink"
|
||||
label="&saveLinkCmd.label;"
|
||||
accesskey="&saveLinkCmd.accesskey;"
|
||||
oncommand="gContextMenu.saveLink();"/>
|
||||
<menuitem id="context-copyemail"
|
||||
label="©EmailCmd.label;"
|
||||
accesskey="©EmailCmd.accesskey;"
|
||||
oncommand="gContextMenu.copyEmail();"/>
|
||||
<menuitem id="context-copylink"
|
||||
label="©LinkCmd.label;"
|
||||
accesskey="©LinkCmd.accesskey;"
|
||||
command="cmd_copyLink"/>
|
||||
<menuseparator id="context-sep-copylink"/>
|
||||
<menuitem id="context-viewimage"
|
||||
label="&viewImageCmd.label;"
|
||||
accesskey="&viewImageCmd.accesskey;"
|
||||
oncommand="gContextMenu.viewImage();"/>
|
||||
<menuitem id="context-copyimage"
|
||||
label="©ImageCmd.label;"
|
||||
accesskey="©ImageCmd.accesskey;"
|
||||
command="cmd_copyImageLocation"/>
|
||||
<menuseparator id="context-sep-copyimage"/>
|
||||
<menuitem id="context-saveimage"
|
||||
label="&saveImageCmd.label;"
|
||||
accesskey="&saveImageCmd.accesskey;"
|
||||
oncommand="gContextMenu.saveImage();"/>
|
||||
<menuitem id="context-setWallpaper"
|
||||
label="&setWallpaperCmd.label;"
|
||||
accesskey="&setWallpaperCmd.accesskey;"
|
||||
oncommand="gContextMenu.setWallpaper();"/>
|
||||
<menuseparator id="context-sep-image"/>
|
||||
<menuitem id="context-back"
|
||||
label="&backCmd.label;"
|
||||
accesskey="&backCmd.accesskey;"
|
||||
oncommand="BrowserBack()"/>
|
||||
<menuitem id="context-forward"
|
||||
label="&forwardCmd.label;"
|
||||
accesskey="&forwardCmd.accesskey;"
|
||||
oncommand="BrowserForward()"/>
|
||||
<menuitem id="context-reload"
|
||||
label="&reloadCmd.label;"
|
||||
accesskey="&reloadCmd.accesskey;"
|
||||
oncommand="BrowserReload();"/>
|
||||
<menuitem id="context-stop"
|
||||
label="&stopCmd.label;"
|
||||
accesskey="&stopCmd.accesskey;"
|
||||
command="Browser:Stop"/>
|
||||
<menuseparator id="context-sep-stop"/>
|
||||
<menuitem id="context-bookmarkpage"
|
||||
label="&bookmarkPageCmd.label;"
|
||||
accesskey="&bookmarkPageCmd.accesskey;"
|
||||
oncommand="addBookmarkAs(document.getElementById('content'));"/>
|
||||
<menuitem id="context-savepage"
|
||||
label="&savePageCmd.label;"
|
||||
accesskey="&savePageCmd.accesskey;"
|
||||
oncommand="saveDocument(window._content.document);"/>
|
||||
<menuseparator id="context-sep-viewbgimage"/>
|
||||
<menuitem id="context-viewbgimage"
|
||||
label="&viewBGImageCmd.label;"
|
||||
accesskey="&viewBGImageCmd.accesskey;"
|
||||
oncommand="gContextMenu.viewBGImage();"/>
|
||||
<menuitem id="context-undo"
|
||||
label="&undoCmd.label;"
|
||||
accesskey="&undoCmd.accesskey;"
|
||||
command="cmd_undo"/>
|
||||
<menuseparator id="context-sep-undo"/>
|
||||
<menuitem id="context-cut"
|
||||
label="&cutCmd.label;"
|
||||
accesskey="&cutCmd.accesskey;"
|
||||
command="cmd_cut"/>
|
||||
<menuitem id="context-copy"
|
||||
label="©Cmd.label;"
|
||||
accesskey="©Cmd.accesskey;"
|
||||
command="cmd_copy"/>
|
||||
<menuitem id="context-paste"
|
||||
label="&pasteCmd.label;"
|
||||
accesskey="&pasteCmd.accesskey;"
|
||||
command="cmd_paste"/>
|
||||
<menuitem id="context-delete"
|
||||
label="&deleteCmd.label;"
|
||||
accesskey="&deleteCmd.accesskey;"
|
||||
command="cmd_delete"/>
|
||||
<menuseparator id="context-sep-paste"/>
|
||||
<menuitem id="context-selectall"
|
||||
label="&selectAllCmd.label;"
|
||||
accesskey="&selectAllCmd.accesskey;"
|
||||
command="cmd_selectAll"/>
|
||||
<menuseparator id="context-sep-selectall"/>
|
||||
<menuitem id="context-searchselect"
|
||||
accesskey="&search.accesskey;"
|
||||
oncommand="OpenSearch('internet', false, gContextMenu.searchSelected(), true);"/>
|
||||
<menuseparator id="frame-sep"/>
|
||||
<menu id="frame" label="&thisFrameMenu.label;" accesskey="&thisFrameMenu.accesskey;">
|
||||
<menupopup>
|
||||
<menuitem label="&showOnlyThisFrameCmd.label;"
|
||||
accesskey="&showOnlyThisFrameCmd.accesskey;"
|
||||
oncommand="gContextMenu.showOnlyThisFrame();"/>
|
||||
<menuitem label="&openFrameCmd.label;"
|
||||
accesskey="&openFrameCmd.accesskey;"
|
||||
oncommand="gContextMenu.openFrame();"/>
|
||||
<menuitem label="&openFrameCmdInTab.label;"
|
||||
accesskey="&openFrameCmdInTab.accesskey;"
|
||||
oncommand="gContextMenu.openFrameInTab();"/>
|
||||
<menuseparator/>
|
||||
<menuitem label="&reloadFrameCmd.label;"
|
||||
accesskey="&reloadFrameCmd.accesskey;"
|
||||
oncommand="gContextMenu.reloadFrame();"/>
|
||||
<menuseparator/>
|
||||
<menuitem label="&bookmarkFrameCmd.label;"
|
||||
accesskey="&bookmarkFrameCmd.accesskey;"
|
||||
oncommand="gContextMenu.addBookmarkForFrame();"/>
|
||||
<menuitem label="&saveFrameCmd.label;"
|
||||
accesskey="&saveFrameCmd.accesskey;"
|
||||
oncommand="saveDocument(gContextMenu.target.ownerDocument);"/>
|
||||
<menuseparator/>
|
||||
<menuitem label="&viewFrameSourceCmd.label;"
|
||||
accesskey="&viewFrameSourceCmd.accesskey;"
|
||||
oncommand="gContextMenu.viewFrameSource();"/>
|
||||
<menuitem label="&viewFrameInfoCmd.label;"
|
||||
accesskey="&viewFrameInfoCmd.accesskey;"
|
||||
oncommand="gContextMenu.viewFrameInfo();"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
<menuseparator id="context-sep-properties"/>
|
||||
<menuitem id="context-viewpartialsource-selection"
|
||||
label="&viewPartialSourceForSelectionCmd.label;"
|
||||
accesskey="&viewPartialSourceCmd.accesskey;"
|
||||
oncommand="gContextMenu.viewPartialSource('selection');"/>
|
||||
<menuitem id="context-viewpartialsource-mathml"
|
||||
label="&viewPartialSourceForMathMLCmd.label;"
|
||||
accesskey="&viewPartialSourceCmd.accesskey;"
|
||||
oncommand="gContextMenu.viewPartialSource('mathml');"/>
|
||||
<menuitem id="context-viewsource"
|
||||
label="&viewPageSourceCmd.label;"
|
||||
accesskey="&viewPageSourceCmd.accesskey;"
|
||||
oncommand="BrowserViewSourceOfDocument(_content.document);"/>
|
||||
<menuitem id="context-viewinfo"
|
||||
label="&viewPageInfoCmd.label;"
|
||||
accesskey="&viewPageInfoCmd.accesskey;"
|
||||
oncommand="gContextMenu.viewInfo();"/>
|
||||
<menuitem id="context-metadata"
|
||||
label="&metadataCmd.label;"
|
||||
accesskey="&metadataCmd.accesskey;"
|
||||
oncommand="gContextMenu.showMetadata();"/>
|
||||
</popup>
|
||||
|
||||
<toolbox id="navigator-toolbox" class="toolbox-top">
|
||||
<!-- Menu -->
|
||||
|
@ -570,23 +570,6 @@ Contributor(s):
|
|||
<menuseparator/>
|
||||
<menuitem accesskey="&pageSourceCmd.accesskey;" label="&pageSourceCmd.label;" key="key_viewSource" command="View:PageSource"/>
|
||||
<menuitem accesskey="&pageInfoCmd.accesskey;" label="&pageInfoCmd.label;" key="key_viewInfo" command="View:PageInfo"/>
|
||||
<menuseparator />
|
||||
<menu label="&applyTheme.label;" accesskey="&applyTheme.accesskey;">
|
||||
<menupopup datasources="rdf:chrome" ref="urn:mozilla:skin:root" oncommand="applyTheme(event.target)" onpopupshowing="checkTheme()">
|
||||
<menuitem label="&themePreferencesCmd.label;" accesskey="&themePreferencesCmd.accesskey;"
|
||||
oncommand="goPreferences('appearance','chrome://communicator/content/pref/pref-themes.xul', 'themes-panel')"/>
|
||||
<menuitem label="&getNewThemesCmd.label;" accesskey="&getNewThemesCmd.accesskey;" oncommand="getNewThemes();"/>
|
||||
<menuseparator/>
|
||||
<template>
|
||||
<menuitem uri="..."
|
||||
label="rdf:http://www.mozilla.org/rdf/chrome#displayName"
|
||||
accesskey="rdf:http://www.mozilla.org/rdf/chrome#accessKey"
|
||||
id="rdf:http://www.mozilla.org/rdf/chrome#name"
|
||||
type="radio"
|
||||
name="themeGroup"/>
|
||||
</template>
|
||||
</menupopup>
|
||||
</menu>
|
||||
</menupopup>
|
||||
</menu>
|
||||
|
||||
|
@ -773,7 +756,7 @@ Contributor(s):
|
|||
oncommand="BrowserPrint();"
|
||||
tooltiptext="&printButton.tooltip;"/>
|
||||
|
||||
<toolbaritem id="throbber-box" align="center">
|
||||
<toolbaritem id="throbber-box" align="center" pack="center">
|
||||
<button id="navigator-throbber" oncommand="goClickThrobber('browser.throbber.url')"
|
||||
tooltiptext="&throbber.tooltip;"/>
|
||||
</toolbaritem>
|
||||
|
|
|
@ -1,102 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<?xml-stylesheet href="chrome://navigator/skin/" type="text/css"?>
|
||||
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
title="Unknown File Type"
|
||||
width="425"
|
||||
height="180"
|
||||
onload="onLoad()">
|
||||
|
||||
<data>
|
||||
<broadcaster id="data.location" type="url" value="url...to be replaced"/>
|
||||
<broadcaster id="data.contentType" type="string" value="content-type...to be replaced"/>
|
||||
<!-- Commands: more/pick/save/close -->
|
||||
<broadcaster id="data.execute" command=""/>
|
||||
</data>
|
||||
|
||||
<script>
|
||||
var data;
|
||||
var dialog;
|
||||
|
||||
function initData() {
|
||||
// Create data object and initialize.
|
||||
data = new Object;
|
||||
data.location = document.getElementById("data.location");
|
||||
data.contentType = document.getElementById("data.contentType");
|
||||
data.execute = document.getElementById("data.execute");
|
||||
}
|
||||
|
||||
function initDialog() {
|
||||
// Create dialog object and initialize.
|
||||
dialog = new Object;
|
||||
dialog.contentType = document.getElementById("dialog.contentType");
|
||||
dialog.more = document.getElementById("dialog.more");
|
||||
dialog.pick = document.getElementById("dialog.pick");
|
||||
dialog.save = document.getElementById("dialog.save");
|
||||
dialog.cancel = document.getElementById("dialog.cancel");
|
||||
}
|
||||
|
||||
function loadDialog() {
|
||||
// Set initial dialog field contents.
|
||||
dialog.contentType.childNodes[0].nodeValue = " " + data.contentType.getAttribute( "value" );
|
||||
}
|
||||
|
||||
function onLoad() {
|
||||
// Init data.
|
||||
initData();
|
||||
|
||||
// Init dialog.
|
||||
initDialog();
|
||||
|
||||
// Fill dialog.
|
||||
loadDialog();
|
||||
}
|
||||
|
||||
function more() {
|
||||
dump( "unknownContent::more not implemented\n" );
|
||||
}
|
||||
|
||||
function pick() {
|
||||
dump( "unknownContent::pick not implemented\n" );
|
||||
}
|
||||
|
||||
function save() {
|
||||
// Execute "save to disk" logic.
|
||||
data.execute.setAttribute("command","save");
|
||||
}
|
||||
|
||||
function cancel() {
|
||||
// Close the window.
|
||||
data.execute.setAttribute("command","close");
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<html:table style="width:100%;">
|
||||
<html:tr>
|
||||
<html:td colspan="4">
|
||||
You have started to download a file of type
|
||||
<html:div id="dialog.contentType" style="display:inline">
|
||||
contentType goes here
|
||||
</html:div>
|
||||
</html:td>
|
||||
</html:tr>
|
||||
|
||||
<html:tr>
|
||||
<html:td style="width:25%">
|
||||
<html:button id="dialog.more" onclick="more()" disabled="">More Info...</html:button>
|
||||
</html:td>
|
||||
<html:td style="width:25%">
|
||||
<html:button id="dialog.pick" onclick="pick()" disabled="">Pick App...</html:button>
|
||||
</html:td>
|
||||
<html:td style="width:25%">
|
||||
<html:button id="dialog.save" onclick="save()">Save File...</html:button>
|
||||
</html:td>
|
||||
<html:td style="width:25%">
|
||||
<html:button id="dialog.cancel" onclick="cancel()">Cancel</html:button>
|
||||
</html:td>
|
||||
</html:tr>
|
||||
</html:table>
|
||||
|
||||
</window>
|
|
@ -40,12 +40,6 @@
|
|||
<!ENTITY closeWindow.label "Close Window">
|
||||
|
||||
|
||||
<!ENTITY applyTheme.label "Apply Theme">
|
||||
<!ENTITY applyTheme.accesskey "A">
|
||||
<!ENTITY themePreferencesCmd.label "Theme Preferences...">
|
||||
<!ENTITY themePreferencesCmd.accesskey "T">
|
||||
<!ENTITY getNewThemesCmd.label "Get New Themes">
|
||||
<!ENTITY getNewThemesCmd.accesskey "G">
|
||||
<!ENTITY findOnCmd.label "Find in This Page...">
|
||||
<!ENTITY findOnCmd.accesskey "F">
|
||||
<!ENTITY findOnCmd.commandkey "f">
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
en-unix.jar:
|
||||
locale/en-US/navigator-platform/contents.rdf (contents-platform.rdf)
|
||||
locale/en-US/navigator-platform/platformNavigationBindings.dtd
|
||||
locale/en-US/navigator-platform/navigator.properties
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
<!ENTITY goBackCmd.commandKey "[">
|
||||
<!ENTITY goForwardCmd.commandKey "]">
|
||||
|
||||
|
|
@ -687,10 +687,7 @@ tab[busy] {
|
|||
/* ::::: throbber ::::: */
|
||||
|
||||
#navigator-throbber {
|
||||
-moz-user-focus: ignore !important;
|
||||
-moz-box-align: center;
|
||||
-moz-box-pack: center;
|
||||
|
||||
-moz-user-focus: ignore;
|
||||
padding: 0px !important;
|
||||
border: none !important;
|
||||
margin: 2px 4px !important;
|
||||
|
|
Загрузка…
Ссылка в новой задаче