Bug 461184 - Change urlbar placeholder text to 'Go to a Web Site'. r=mano

(transplanted from ea4e623e936d7a1c03df8967b3bd8d99c5286893)

--HG--
extra : transplant_source : %EANb%3E%93mz%1C%03%DF%89g%B3%BD%8D%99%C5%28h%93
This commit is contained in:
Dão Gottwald 2010-06-05 18:47:19 +02:00
parent fee376b90c
commit bf1fcfa869
5 changed files with 2 additions and 49 deletions

View File

@ -467,10 +467,7 @@
<toolbaritem id="urlbar-container" align="center" flex="400" persist="width"
title="&locationItem.title;" class="chromeclass-location" removable="true">
<textbox id="urlbar" flex="1"
bookmarkhistoryplaceholder="&urlbar.bookmarkhistory.emptyText;"
bookmarkplaceholder="&urlbar.bookmark.emptyText;"
historyplaceholder="&urlbar.history.emptyText;"
noneplaceholder="&urlbar.none.emptyText;"
placeholder="&urlbar.placeholder;"
type="autocomplete"
autocompletesearch="history"
autocompletesearchparam="enable-actions"

View File

@ -53,7 +53,6 @@
this.doubleClickSelectsAll = this._prefs.getBoolPref("doubleClickSelectsAll");
this.completeDefaultIndex = this._prefs.getBoolPref("autoFill");
this.timeout = this._prefs.getIntPref("delay");
this._setPlaceholder();
this._urlTooltip = document.getElementById("urlTooltip");
@ -407,10 +406,6 @@
case "delay":
this.timeout = this._prefs.getIntPref(aData);
break;
case "autocomplete.enabled":
case "default.behavior":
this._setPlaceholder();
break;
}
}
]]></body>
@ -466,27 +461,6 @@
</setter>
</property>
<method name="_setPlaceholder">
<body><![CDATA[
var type = "none";
if (this._prefs.getBoolPref("autocomplete.enabled")) {
// Bottom 2 bits of default.behavior specify history/bookmark
switch (this._prefs.getIntPref("default.behavior") & 3) {
case 0:
type = "bookmarkhistory";
break;
case 1:
type = "history";
break;
case 2:
type = "bookmark";
break;
}
}
this.placeholder = this.getAttribute(type + "placeholder");
]]></body>
</method>
<method name="_parseActionUrl">
<parameter name="aUrl"/>
<body><![CDATA[

View File

@ -41,7 +41,6 @@ function test() {
loader.loadSubScript("chrome://mochikit/content/browser/browser/components/preferences/tests/privacypane_tests.js", this);
run_test_subset([
test_locbar_placeholder,
test_pane_visibility,
test_dependent_elements,
test_dependent_cookie_elements,

View File

@ -65,20 +65,6 @@ function controlChanged(element) {
element.doCommand();
}
function test_locbar_placeholder(win) {
let texts = ["none", "bookmarkhistory", "history", "bookmark"];
let locbarlist = win.document.getElementById("locationBarSuggestion");
ok(locbarlist, "location bar suggestion menulist should exist");
for (let level = -1; level <= 2; ++level) {
locbarlist.value = level;
controlChanged(locbarlist);
is(gURLBar.placeholder, gURLBar.getAttribute(texts[level + 1] + "placeholder"),
"location bar placeholder for for level " + level + " is correctly set");
}
}
function test_pane_visibility(win) {
let modes = {
"remember": "historyRememberPane",

View File

@ -229,10 +229,7 @@
<!ENTITY showAllHistoryCmd.commandkey "H">
<!ENTITY openCmd.commandkey "l">
<!ENTITY urlbar.bookmarkhistory.emptyText "Search Bookmarks and History">
<!ENTITY urlbar.bookmark.emptyText "Search Bookmarks">
<!ENTITY urlbar.history.emptyText "Search History">
<!ENTITY urlbar.none.emptyText "Type a Web address">
<!ENTITY urlbar.placeholder "Go to a Web Site">
<!ENTITY urlbar.accesskey "d">
<!ENTITY urlbar.switchToTab.label "Switch to tab:">