336457 - mark selected engine in the dropdown list patch by Pam Greene <pamg.bugs@gmail.com> r=joe@retrovirus.com sr+a=ben@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@196076 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -166,15 +166,18 @@
|
||||
<body><![CDATA[
|
||||
if (aTopic == "browser-search-engine-modified") {
|
||||
switch (aVerb) {
|
||||
case "engine-current":
|
||||
// The current engine was changed. Rebuilding the menu appears to
|
||||
// confuse its idea of whether it should be open when it's just
|
||||
// been clicked, so we force it to close now.
|
||||
this._popup.hidePopup();
|
||||
// Fall through.
|
||||
case "engine-removed":
|
||||
case "engine-added":
|
||||
case "engine-changed":
|
||||
// An engine was removed (or hidden) or added, or an icon was
|
||||
// changed
|
||||
// changed.
|
||||
this.rebuildPopup();
|
||||
// Fall through
|
||||
case "engine-current":
|
||||
// The current engine was changed
|
||||
this.updateDisplay();
|
||||
}
|
||||
}
|
||||
@@ -215,6 +218,11 @@
|
||||
menuitem.setAttribute("label", name);
|
||||
menuitem.setAttribute("id", name);
|
||||
menuitem.setAttribute("class", "menuitem-iconic searchbar-engine-menuitem");
|
||||
// Since this menu is rebuilt by the observer method whenever a new
|
||||
// engine is selected, the "selected" attribute does not need to be
|
||||
// explicitly cleared anywhere.
|
||||
if (this._engines[i] == this.currentEngine)
|
||||
menuitem.setAttribute("selected", "true");
|
||||
var tooltip = this._stringBundle.getFormattedString("searchtip", [name]);
|
||||
menuitem.setAttribute("tooltiptext", tooltip);
|
||||
if (this._engines[i].iconURI)
|
||||
|
||||
@@ -44,3 +44,7 @@
|
||||
.search-go-button[disabled="true"]{
|
||||
-moz-image-region: rect(0px, 48px, 16px, 32px);
|
||||
}
|
||||
|
||||
.searchbar-engine-menuitem[selected="true"] .menu-iconic-text {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
@@ -64,3 +64,7 @@
|
||||
-moz-image-region: rect(0px, 48px, 16px, 32px);
|
||||
}
|
||||
|
||||
|
||||
.searchbar-engine-menuitem[selected="true"] .menu-iconic-text {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user