зеркало из https://github.com/mozilla/pjs.git
Bug 221597: remove comm.jar references in openLocation.xul
This commit is contained in:
Родитель
d9182d4541
Коммит
5a1031a648
|
@ -34,16 +34,16 @@ try {
|
|||
|
||||
function onLoad()
|
||||
{
|
||||
dialog.input = document.getElementById("dialog.input");
|
||||
dialog.open = document.documentElement.getButton("accept");
|
||||
dialog.openAppList = document.getElementById("openAppList");
|
||||
dialog.openTopWindow = document.getElementById("currentWindow");
|
||||
dialog.bundle = document.getElementById("openLocationBundle");
|
||||
dialog.input = document.getElementById("dialog.input");
|
||||
dialog.open = document.documentElement.getButton("accept");
|
||||
dialog.openWhereList = document.getElementById("openWhereList");
|
||||
dialog.openTopWindow = document.getElementById("currentWindow");
|
||||
dialog.bundle = document.getElementById("openLocationBundle");
|
||||
|
||||
if ("arguments" in window && window.arguments.length >= 1)
|
||||
browser = window.arguments[0];
|
||||
|
||||
dialog.openAppList.selectedItem = dialog.openTopWindow;
|
||||
dialog.openWhereList.selectedItem = dialog.openTopWindow;
|
||||
|
||||
// change OK button text to 'open'
|
||||
dialog.open.label = dialog.bundle.getString("openButtonLabel");
|
||||
|
@ -51,9 +51,9 @@ function onLoad()
|
|||
if (pref) {
|
||||
try {
|
||||
var value = pref.getIntPref("general.open_location.last_window_choice");
|
||||
var element = dialog.openAppList.getElementsByAttribute("value", value)[0];
|
||||
var element = dialog.openWhereList.getElementsByAttribute("value", value)[0];
|
||||
if (element)
|
||||
dialog.openAppList.selectedItem = element;
|
||||
dialog.openWhereList.selectedItem = element;
|
||||
dialog.input.value = pref.getComplexValue("general.open_location.last_url",
|
||||
Components.interfaces.nsISupportsString).data;
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ function open()
|
|||
url = dialog.input.value;
|
||||
|
||||
try {
|
||||
switch (dialog.openAppList.value) {
|
||||
switch (dialog.openWhereList.value) {
|
||||
case "0":
|
||||
browser.loadURI(url);
|
||||
break;
|
||||
|
@ -104,7 +104,7 @@ function open()
|
|||
str.data = dialog.input.value;
|
||||
pref.setComplexValue("general.open_location.last_url",
|
||||
Components.interfaces.nsISupportsString, str);
|
||||
pref.setIntPref("general.open_location.last_window_choice", dialog.openAppList.value);
|
||||
pref.setIntPref("general.open_location.last_window_choice", dialog.openWhereList.value);
|
||||
}
|
||||
|
||||
// Delay closing slightly to avoid timing bug on Linux.
|
||||
|
@ -124,13 +124,6 @@ function onChooseFile()
|
|||
try {
|
||||
var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker);
|
||||
fp.init(window, dialog.bundle.getString("chooseFileDialogTitle"), nsIFilePicker.modeOpen);
|
||||
if (dialog.openAppList.value == "2") {
|
||||
// When loading into Composer, direct user to prefer HTML files and text files,
|
||||
// so we call separately to control the order of the filter list
|
||||
fp.appendFilters(nsIFilePicker.filterHTML | nsIFilePicker.filterText);
|
||||
fp.appendFilters(nsIFilePicker.filterText);
|
||||
fp.appendFilters(nsIFilePicker.filterAll);
|
||||
}
|
||||
else {
|
||||
fp.appendFilters(nsIFilePicker.filterHTML | nsIFilePicker.filterText |
|
||||
nsIFilePicker.filterAll | nsIFilePicker.filterImages | nsIFilePicker.filterXML);
|
||||
|
|
|
@ -22,14 +22,10 @@
|
|||
# Ben Goodger <ben@netscape.com>
|
||||
# Michael Lowe <michael.lowe@bigfoot.com>
|
||||
#
|
||||
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
|
||||
|
||||
<!DOCTYPE dialog [
|
||||
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
|
||||
%brandDTD;
|
||||
<!ENTITY % openDialogDTD SYSTEM "chrome://browser/locale/openLocation.dtd" >
|
||||
%openDialogDTD;
|
||||
]>
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
|
||||
<!DOCTYPE dialog SYSTEM "chrome://browser/locale/openLocation.dtd">
|
||||
|
||||
<dialog id="openLocation"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
|
@ -40,12 +36,9 @@
|
|||
persist="screenX screenY"
|
||||
screenX="24" screenY="24">
|
||||
|
||||
<script type="application/x-javascript" src="chrome://global/content/globalOverlay.js"/>
|
||||
<script type="application/x-javascript" src="chrome://global/content/globalOverlay.js"/>
|
||||
<script type="application/x-javascript" src="chrome://browser/content/openLocation.js"/>
|
||||
<script type="application/x-javascript" src="chrome://communicator/content/utilityOverlay.js"/>
|
||||
|
||||
//XXXBlake Bleh! We collapsed sessionHistoryUI.js into browser.js.
|
||||
<script type="application/x-javascript" src="chrome://navigator/content/sessionHistoryUI.js"/>
|
||||
<script type="application/x-javascript" src="chrome://browser/content/utilityOverlay.js"/>
|
||||
|
||||
<stringbundle id="openLocationBundle" src="chrome://browser/locale/openLocation.properties"/>
|
||||
|
||||
|
@ -64,7 +57,7 @@
|
|||
</hbox>
|
||||
<hbox align="center">
|
||||
<label value="&openWhere.label;"/>
|
||||
<menulist id="openAppList">
|
||||
<menulist id="openWhereList">
|
||||
<menupopup>
|
||||
<menuitem value="0" id="currentWindow" label="&topWindow.label;"/>
|
||||
<menuitem value="1" label="&newWindow.label;"/>
|
||||
|
@ -76,4 +69,4 @@
|
|||
</vbox>
|
||||
</hbox>
|
||||
|
||||
</dialog>
|
||||
</dialog>
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
openButtonLabel=Open
|
||||
chooseFileDialogTitle=Choose File
|
||||
existingNavigatorWindow=Existing Navigator window
|
||||
|
|
Загрузка…
Ссылка в новой задаче