Bug 800197 Warning Popup for Failed Find Has Wrong Title Bar "(JavaScript Application)" r=Neil.
authorPhilip Chee <philip.chee@gmail.com>
Sun, 14 Oct 2012 13:08:47 +0800
changeset 110308 f8c4c106b8064b42d2d1e36bb04e4032bb6fe840
parent 110307 d750d39139d1bad9c744626c3b2852ac9a67463e
child 110309 919aa3f8deb22fb68bea724f582fe1e36d50ef14
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersNeil
bugs800197
milestone19.0a1
Bug 800197 Warning Popup for Failed Find Has Wrong Title Bar "(JavaScript Application)" r=Neil.
toolkit/content/finddialog.js
--- a/toolkit/content/finddialog.js
+++ b/toolkit/content/finddialog.js
@@ -1,14 +1,16 @@
 // -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
 
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
+Components.utils.import("resource://gre/modules/Services.jsm");
+
 var dialog;     // Quick access to document/form elements.
 var gFindInst;   // nsIWebBrowserFind that we're going to use
 var gFindInstData; // use this to update the find inst data
 
 function initDialogObject()
 {
   // Create dialog object and initialize.
   dialog = new Object;
@@ -107,17 +109,18 @@ function onAccept()
   
   // Search.
   var result = gFindInst.findNext();
 
   if (!result)
   {
     if (!dialog.bundle)
       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.focus();
   } 
   return false;
 }
 
 function doEnabling()
 {