Bug 800197 Warning Popup for Failed Find Has Wrong Title Bar "(JavaScript Application)" r=Neil.

This commit is contained in:
Philip Chee 2012-10-14 13:08:47 +08:00
parent d37755dc84
commit fc0463cf62

View File

@ -4,6 +4,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/Services.jsm");
var dialog; // Quick access to document/form elements. var dialog; // Quick access to document/form elements.
var gFindInst; // nsIWebBrowserFind that we're going to use var gFindInst; // nsIWebBrowserFind that we're going to use
var gFindInstData; // use this to update the find inst data var gFindInstData; // use this to update the find inst data
@ -112,7 +114,8 @@ function onAccept()
{ {
if (!dialog.bundle) if (!dialog.bundle)
dialog.bundle = document.getElementById("findBundle"); dialog.bundle = document.getElementById("findBundle");
window.alert(dialog.bundle.getString("notFoundWarning")); Services.prompt.alert(window, dialog.bundle.getString("notFoundTitle"),
dialog.bundle.getString("notFoundWarning"));
dialog.findKey.select(); dialog.findKey.select();
dialog.findKey.focus(); dialog.findKey.focus();
} }