From 4a96497137eb90484b6dabfe3ca4aca05b78c1ad Mon Sep 17 00:00:00 2001 From: "blakeross%telocity.com" Date: Sat, 29 Jul 2006 05:37:29 +0000 Subject: [PATCH] Open Web Location dialog does not work in Composer, and Choose File... button doesn't work at all (71234, 75849). r=blake, cmanske sr=blizzard, alecf a=asa --- suite/common/openLocation.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/suite/common/openLocation.js b/suite/common/openLocation.js index d8b0641ac93..764bf16a340 100644 --- a/suite/common/openLocation.js +++ b/suite/common/openLocation.js @@ -81,7 +81,12 @@ function doEnabling() function open() { - var url = browser.getShortcutOrURI(dialog.input.value); + var url; + if (browser) + url = browser.getShortcutOrURI(dialog.input.value); + else + url = dialog.input.value; + try { switch (dialog.openAppList.value) { case "0": @@ -121,8 +126,7 @@ function onChooseFile() { try { var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker); - fp.init(window, bundle.GetStringFromName("chooseFileDialogTitle"), nsIFilePicker.modeOpen); - + 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