diff --git a/suite/browser/browser-prefs.js b/suite/browser/browser-prefs.js
index cfe8d4d855..3da26ce986 100644
--- a/suite/browser/browser-prefs.js
+++ b/suite/browser/browser-prefs.js
@@ -137,6 +137,9 @@ pref("browser.search.update.log", false);
// Check whether we need to perform engine updates every 6 hours
pref("browser.search.update.interval", 21600);
+// enable search suggestions by default
+pref("browser.search.suggest.enabled", true);
+
// Smart Browsing prefs
pref("keyword.enabled", true);
// Override the default keyword.URL. Empty value means
diff --git a/suite/browser/navigator.css b/suite/browser/navigator.css
index 547c5e4f33..8d2d9c4f25 100644
--- a/suite/browser/navigator.css
+++ b/suite/browser/navigator.css
@@ -1,3 +1,6 @@
+@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
+@namespace html url("http://www.w3.org/1999/xhtml");
+
/* ::::: Hide the link toolbar if it is set to autohide and has no items. ::::: */
#linktoolbar[hidden="maybe"][hasitems="false"] {
@@ -49,6 +52,15 @@ panel[for="urlbar"] {
-moz-box-align: center;
}
+/* ::::: search bar ::::: */
+searchbar {
+ -moz-binding: url("chrome://communicator/content/search/search.xml#searchbar");
+}
+
+#wrapper-search-container > #search-container > #searchbar > .searchbar-textbox > .autocomplete-textbox-container > .textbox-input-box > html|*.textbox-input {
+ visibility: hidden;
+}
+
/* ::::: bookmarks menu ::::: */
.isempty:not(:last-child) {
diff --git a/suite/browser/navigator.js b/suite/browser/navigator.js
index f546a6b693..5d9047af3f 100644
--- a/suite/browser/navigator.js
+++ b/suite/browser/navigator.js
@@ -1079,16 +1079,45 @@ var gBookmarkAllTabsHandler = {
const BrowserSearch = {
addEngine: function(engine, targetDoc) {
- Services.console.logStringMessage("BrowserSearch.addEngine will be implemented in bug 401417.");
- },
+ if (!this.searchBar)
+ return;
- /**
- * Update the browser UI to show whether or not additional engines are
- * available when a page is loaded or the user switches tabs to a page that
- * has search engines.
- */
- updateSearchButton: function() {
- Services.console.logStringMessage("BrowserSearch.updateSearchButton will be implemented in bug 401417.");
+ var browser = getBrowser().getBrowserForDocument(targetDoc);
+ // ignore search engines from subframes (see bug 479408)
+ if (!browser)
+ return;
+
+ // Check to see whether we've already added an engine with this title
+ if (browser.engines) {
+ if (browser.engines.some(function (e) e.title == engine.title))
+ return;
+ }
+
+ // Append the URI and an appropriate title to the browser data.
+ // Use documentURIObject in the check for shouldLoadFavIcon so that we
+ // do the right thing with about:-style error pages. Bug 453442
+ var iconURL = null;
+ if (getBrowser().shouldLoadFavIcon(targetDoc.documentURIObject))
+ iconURL = getBrowser().buildFavIconString(targetDoc.documentURIObject);
+
+ var hidden = false;
+ // If this engine (identified by title) is already in the list, add it
+ // to the list of hidden engines rather than to the main list.
+ // XXX This will need to be changed when engines are identified by URL;
+ // see bug 335102.
+ if (Services.search.getEngineByName(engine.title))
+ hidden = true;
+
+ var engines = (hidden ? browser.hiddenEngines : browser.engines) || [];
+
+ engines.push({ uri: engine.href,
+ title: engine.title,
+ icon: iconURL });
+
+ if (hidden)
+ browser.hiddenEngines = engines;
+ else
+ browser.engines = engines;
},
/**
@@ -1123,10 +1152,10 @@ const BrowserSearch = {
}
if (isElementVisible(this.searchBar)) {
- searchBar.select();
- searchBar.focus();
+ this.searchBar.select();
+ this.searchBar.focus();
} else if (isElementVisible(this.searchSidebar)) {
- searchSidebar.focus();
+ this.searchSidebar.focus();
} else {
loadURI(Services.search.defaultEngine.searchForm);
window.content.focus();
@@ -1197,6 +1226,13 @@ const BrowserSearch = {
return document.getElementById("urn:sidebar:panel:search");
},
+ loadAddEngines: function BrowserSearch_loadAddEngines() {
+ var newWindowPref = Services.prefs.getIntPref("browser.link.open_newwindow");
+ var where = newWindowPref == 3 ? "tabfocused" : "window";
+ var searchEnginesURL = Services.urlFormatter.formatURLPref("browser.search.searchEnginesURL");
+ openUILinkIn(searchEnginesURL, where);
+ },
+
/**
* Reveal the search sidebar panel.
*/
diff --git a/suite/browser/navigator.xul b/suite/browser/navigator.xul
index ddb98212d6..84cf9ae3a1 100644
--- a/suite/browser/navigator.xul
+++ b/suite/browser/navigator.xul
@@ -154,6 +154,8 @@
onpopupshowing="window.XULBrowserWindow.populateFeeds(this);"
oncommand="subscribeToFeed(event.target.statusText, event);"
onclick="checkForMiddleClick(this, event);"/>
+
+
@@ -293,7 +295,7 @@
ondragover="nsDragAndDrop.dragOver(event, homeButtonObserver); event.stopPropagation()"/>
@@ -377,6 +379,12 @@
ondragexit="nsDragAndDrop.dragExit(event, searchButtonObserver);"/>
+
+
+
+
+ * Gavin Sharp
+ * Pamela Greene
+ * Ryan Flint
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+Components.utils.import("resource://gre/modules/Services.jsm");
+
+const Ci = Components.interfaces;
+const Cc = Components.classes;
+
+const ENGINE_FLAVOR = "text/x-moz-search-engine";
+
+const BROWSER_SUGGEST_PREF = "browser.search.suggest.enabled";
+
+var gEngineView = null;
+
+var gEngineManagerDialog = {
+ init: function engineManager_init() {
+ gEngineView = new EngineView(new EngineStore());
+
+ var suggestEnabled = Services.prefs.getBoolPref(BROWSER_SUGGEST_PREF);
+ document.getElementById("enableSuggest").checked = suggestEnabled;
+
+ var tree = document.getElementById("engineList");
+ tree.view = gEngineView;
+
+ Services.obs.addObserver(this, "browser-search-engine-modified", false);
+ },
+
+ destroy: function engineManager_destroy() {
+ // Remove the observer
+ Services.obs.removeObserver(this, "browser-search-engine-modified");
+ },
+
+ observe: function engineManager_observe(aEngine, aTopic, aVerb) {
+ if (aTopic == "browser-search-engine-modified") {
+ aEngine.QueryInterface(Ci.nsISearchEngine);
+ switch (aVerb) {
+ case "engine-added":
+ gEngineView._engineStore.addEngine(aEngine);
+ gEngineView.rowCountChanged(gEngineView.lastIndex, 1);
+ break;
+ case "engine-changed":
+ gEngineView._engineStore.reloadIcons();
+ gEngineView.invalidate();
+ break;
+ case "engine-removed":
+ case "engine-current":
+ // Not relevant
+ break;
+ }
+ }
+ },
+
+ onOK: function engineManager_onOK() {
+ // Set the preference
+ var newSuggestEnabled = document.getElementById("enableSuggest").checked;
+ Services.prefs.setBoolPref(BROWSER_SUGGEST_PREF, newSuggestEnabled);
+
+ // Commit the changes
+ gEngineView._engineStore.commit();
+ },
+
+ onRestoreDefaults: function engineManager_onRestoreDefaults() {
+ var num = gEngineView._engineStore.restoreDefaultEngines();
+ gEngineView.rowCountChanged(0, num);
+ gEngineView.invalidate();
+ },
+
+ showRestoreDefaults: function engineManager_showRestoreDefaults(val) {
+ document.documentElement.getButton("extra2").disabled = !val;
+ },
+
+ loadAddEngines: function engineManager_loadAddEngines() {
+ this.onOK();
+ window.opener.BrowserSearch.loadAddEngines();
+ window.close();
+ },
+
+ remove: function engineManager_remove() {
+ gEngineView._engineStore.removeEngine(gEngineView.selectedEngine);
+ var index = gEngineView.selectedIndex;
+ gEngineView.rowCountChanged(index, -1);
+ gEngineView.invalidate();
+ gEngineView.selection.select(Math.min(index, gEngineView.lastIndex));
+ gEngineView.ensureRowIsVisible(gEngineView.currentIndex);
+ document.getElementById("engineList").focus();
+ },
+
+ /**
+ * Moves the selected engine either up or down in the engine list
+ * @param aDir
+ * -1 to move the selected engine down, +1 to move it up.
+ */
+ bump: function engineManager_move(aDir) {
+ var selectedEngine = gEngineView.selectedEngine;
+ var newIndex = gEngineView.selectedIndex - aDir;
+
+ gEngineView._engineStore.moveEngine(selectedEngine, newIndex);
+
+ gEngineView.invalidate();
+ gEngineView.selection.select(newIndex);
+ gEngineView.ensureRowIsVisible(newIndex);
+ this.showRestoreDefaults(true);
+ document.getElementById("engineList").focus();
+ },
+
+ editKeyword: function engineManager_editKeyword() {
+ var selectedEngine = gEngineView.selectedEngine;
+ if (!selectedEngine)
+ return;
+
+ var alias = { value: selectedEngine.alias };
+ var strings = document.getElementById("engineManagerBundle");
+ var title = strings.getString("editTitle");
+ var msg = strings.getFormattedString("editMsg", [selectedEngine.name]);
+
+ while (Services.prompt.prompt(window, title, msg, alias, null, {})) {
+ var bduplicate = false;
+ var eduplicate = false;
+ var dupName = "";
+
+ if (alias.value != "") {
+ try {
+ let bmserv = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
+ getService(Ci.nsINavBookmarksService);
+ if (bmserv.getURIForKeyword(alias.value))
+ bduplicate = true;
+ } catch(ex) {}
+
+ // Check for duplicates in changes we haven't committed yet
+ let engines = gEngineView._engineStore.engines;
+ for each (let engine in engines) {
+ if (engine.alias == alias.value &&
+ engine.name != selectedEngine.name) {
+ eduplicate = true;
+ dupName = engine.name;
+ break;
+ }
+ }
+ }
+
+ // Notify the user if they have chosen an existing engine/bookmark keyword
+ if (eduplicate || bduplicate) {
+ var dtitle = strings.getString("duplicateTitle");
+ var bmsg = strings.getString("duplicateBookmarkMsg");
+ var emsg = strings.getFormattedString("duplicateEngineMsg", [dupName]);
+
+ prompt.alert(window, dtitle, eduplicate ? emsg : bmsg);
+ } else {
+ gEngineView._engineStore.changeEngine(selectedEngine, "alias",
+ alias.value);
+ gEngineView.invalidate();
+ break;
+ }
+ }
+ },
+
+ onSelect: function engineManager_onSelect() {
+ // Buttons only work if an engine is selected and it's not the last engine,
+ // the latter is true when the selected is first and last at the same time.
+ var lastSelected = (gEngineView.selectedIndex == gEngineView.lastIndex);
+ var firstSelected = (gEngineView.selectedIndex == 0);
+ var noSelection = (gEngineView.selectedIndex == -1);
+
+ document.getElementById("cmd_remove")
+ .setAttribute("disabled", noSelection ||
+ (firstSelected && lastSelected));
+
+ document.getElementById("cmd_moveup")
+ .setAttribute("disabled", noSelection || firstSelected);
+
+ document.getElementById("cmd_movedown")
+ .setAttribute("disabled", noSelection || lastSelected);
+
+ document.getElementById("cmd_editkeyword")
+ .setAttribute("disabled", noSelection);
+ }
+};
+
+function onDragEngineStart(event) {
+ var selectedIndex = gEngineView.selectedIndex;
+ if (selectedIndex >= 0) {
+ event.dataTransfer.setData(ENGINE_FLAVOR, selectedIndex.toString());
+ event.dataTransfer.effectAllowed = "move";
+ }
+}
+
+// "Operation" objects
+function EngineMoveOp(aEngineClone, aNewIndex) {
+ if (!aEngineClone)
+ throw new Error("bad args to new EngineMoveOp!");
+ this._engine = aEngineClone.originalEngine;
+ this._newIndex = aNewIndex;
+}
+EngineMoveOp.prototype = {
+ _engine: null,
+ _newIndex: null,
+ commit: function EMO_commit() {
+ Services.search.moveEngine(this._engine, this._newIndex);
+ }
+}
+
+function EngineRemoveOp(aEngineClone) {
+ if (!aEngineClone)
+ throw new Error("bad args to new EngineRemoveOp!");
+ this._engine = aEngineClone.originalEngine;
+}
+EngineRemoveOp.prototype = {
+ _engine: null,
+ commit: function ERO_commit() {
+ Services.search.removeEngine(this._engine);
+ }
+}
+
+function EngineUnhideOp(aEngineClone, aNewIndex) {
+ if (!aEngineClone)
+ throw new Error("bad args to new EngineUnhideOp!");
+ this._engine = aEngineClone.originalEngine;
+ this._newIndex = aNewIndex;
+}
+EngineUnhideOp.prototype = {
+ _engine: null,
+ _newIndex: null,
+ commit: function EUO_commit() {
+ this._engine.hidden = false;
+ Services.search.moveEngine(this._engine, this._newIndex);
+ }
+}
+
+function EngineChangeOp(aEngineClone, aProp, aValue) {
+ if (!aEngineClone)
+ throw new Error("bad args to new EngineChangeOp!");
+
+ this._engine = aEngineClone.originalEngine;
+ this._prop = aProp;
+ this._newValue = aValue;
+}
+EngineChangeOp.prototype = {
+ _engine: null,
+ _prop: null,
+ _newValue: null,
+ commit: function ECO_commit() {
+ this._engine[this._prop] = this._newValue;
+ }
+}
+
+function EngineStore() {
+ this._engines = Services.search.getVisibleEngines().map(this._cloneEngine);
+ this._defaultEngines = Services.search.getDefaultEngines().map(this._cloneEngine);
+
+ this._ops = [];
+
+ // check if we need to disable the restore defaults button
+ var someHidden = this._defaultEngines.some(function (e) e.hidden);
+ gEngineManagerDialog.showRestoreDefaults(someHidden);
+}
+EngineStore.prototype = {
+ _engines: null,
+ _defaultEngines: null,
+ _ops: null,
+
+ get engines() {
+ return this._engines;
+ },
+ set engines(val) {
+ this._engines = val;
+ return val;
+ },
+
+ _getIndexForEngine: function ES_getIndexForEngine(aEngine) {
+ return this._engines.indexOf(aEngine);
+ },
+
+ _getEngineByName: function ES_getEngineByName(aName) {
+ for each (var engine in this._engines)
+ if (engine.name == aName)
+ return engine;
+
+ return null;
+ },
+
+ _cloneEngine: function ES_cloneEngine(aEngine) {
+ var clonedObj={};
+ for (var i in aEngine)
+ clonedObj[i] = aEngine[i];
+ clonedObj.originalEngine = aEngine;
+ return clonedObj;
+ },
+
+ // Callback for Array's some(). A thisObj must be passed to some()
+ _isSameEngine: function ES_isSameEngine(aEngineClone) {
+ return aEngineClone.originalEngine == this.originalEngine;
+ },
+
+ commit: function ES_commit() {
+ var currentEngine = this._cloneEngine(Services.search.currentEngine);
+ for (var i = 0; i < this._ops.length; i++)
+ this._ops[i].commit();
+
+ // Restore currentEngine if it is a default engine that is still visible.
+ // Needed if the user deletes currentEngine and then restores it.
+ if (this._defaultEngines.some(this._isSameEngine, currentEngine) &&
+ !currentEngine.originalEngine.hidden)
+ Services.search.currentEngine = currentEngine.originalEngine;
+ },
+
+ addEngine: function ES_addEngine(aEngine) {
+ this._engines.push(this._cloneEngine(aEngine));
+ },
+
+ moveEngine: function ES_moveEngine(aEngine, aNewIndex) {
+ if (aNewIndex < 0 || aNewIndex > this._engines.length - 1)
+ throw new Error("ES_moveEngine: invalid aNewIndex!");
+ var index = this._getIndexForEngine(aEngine);
+ if (index == -1)
+ throw new Error("ES_moveEngine: invalid engine?");
+
+ if (index == aNewIndex)
+ return; // nothing to do
+
+ // Move the engine in our internal store
+ var removedEngine = this._engines.splice(index, 1)[0];
+ this._engines.splice(aNewIndex, 0, removedEngine);
+
+ this._ops.push(new EngineMoveOp(aEngine, aNewIndex));
+ },
+
+ removeEngine: function ES_removeEngine(aEngine) {
+ var index = this._getIndexForEngine(aEngine);
+ if (index == -1)
+ throw new Error("invalid engine?");
+
+ this._engines.splice(index, 1);
+ this._ops.push(new EngineRemoveOp(aEngine));
+ if (this._defaultEngines.some(this._isSameEngine, aEngine))
+ gEngineManagerDialog.showRestoreDefaults(true);
+ },
+
+ restoreDefaultEngines: function ES_restoreDefaultEngines() {
+ var added = 0;
+
+ for (var i = 0; i < this._defaultEngines.length; ++i) {
+ var e = this._defaultEngines[i];
+
+ // If the engine is already in the list, just move it.
+ if (this._engines.some(this._isSameEngine, e)) {
+ this.moveEngine(this._getEngineByName(e.name), i);
+ } else {
+ // Otherwise, add it back to our internal store
+ this._engines.splice(i, 0, e);
+ this._ops.push(new EngineUnhideOp(e, i));
+ added++;
+ }
+ }
+ gEngineManagerDialog.showRestoreDefaults(false);
+ return added;
+ },
+
+ changeEngine: function ES_changeEngine(aEngine, aProp, aNewValue) {
+ var index = this._getIndexForEngine(aEngine);
+ if (index == -1)
+ throw new Error("invalid engine?");
+
+ this._engines[index][aProp] = aNewValue;
+ this._ops.push(new EngineChangeOp(aEngine, aProp, aNewValue));
+ },
+
+ reloadIcons: function ES_reloadIcons() {
+ this._engines.forEach(function (e) {
+ e.uri = e.originalEngine.uri;
+ });
+ }
+}
+
+function EngineView(aEngineStore) {
+ this._engineStore = aEngineStore;
+}
+EngineView.prototype = {
+ _engineStore: null,
+ tree: null,
+
+ get lastIndex() {
+ return this.rowCount - 1;
+ },
+ get selectedIndex() {
+ var seln = this.selection;
+ if (seln.getRangeCount() > 0) {
+ var min = {};
+ seln.getRangeAt(0, min, {});
+ return min.value;
+ }
+ return -1;
+ },
+ get selectedEngine() {
+ return this._engineStore.engines[this.selectedIndex];
+ },
+
+ // Helpers
+ rowCountChanged: function (index, count) {
+ this.tree.rowCountChanged(index, count);
+ },
+
+ invalidate: function () {
+ this.tree.invalidate();
+ },
+
+ ensureRowIsVisible: function (index) {
+ this.tree.ensureRowIsVisible(index);
+ },
+
+ getSourceIndexFromDrag: function (dataTransfer) {
+ return parseInt(dataTransfer.getData(ENGINE_FLAVOR));
+ },
+
+ // nsITreeView
+ get rowCount() {
+ return this._engineStore.engines.length;
+ },
+
+ getImageSrc: function(index, column) {
+ if (column.id == "engineName" && this._engineStore.engines[index].iconURI)
+ return this._engineStore.engines[index].iconURI.spec;
+ return "";
+ },
+
+ getCellText: function(index, column) {
+ if (column.id == "engineName")
+ return this._engineStore.engines[index].name;
+ else if (column.id == "engineKeyword")
+ return this._engineStore.engines[index].alias;
+ return "";
+ },
+
+ setTree: function(tree) {
+ this.tree = tree;
+ },
+
+ canDrop: function(targetIndex, orientation, dataTransfer) {
+ var sourceIndex = this.getSourceIndexFromDrag(dataTransfer);
+ return (sourceIndex != -1 &&
+ sourceIndex != targetIndex &&
+ sourceIndex != targetIndex + orientation);
+ },
+
+ drop: function(dropIndex, orientation, dataTransfer) {
+ var sourceIndex = this.getSourceIndexFromDrag(dataTransfer);
+ var sourceEngine = this._engineStore.engines[sourceIndex];
+
+ if (dropIndex > sourceIndex) {
+ if (orientation == Ci.nsITreeView.DROP_BEFORE)
+ dropIndex--;
+ } else {
+ if (orientation == Ci.nsITreeView.DROP_AFTER)
+ dropIndex++;
+ }
+
+ this._engineStore.moveEngine(sourceEngine, dropIndex);
+ gEngineManagerDialog.showRestoreDefaults(true);
+
+ // Redraw, and adjust selection
+ this.invalidate();
+ this.selection.select(dropIndex);
+ },
+
+ selection: null,
+ getRowProperties: function(index, properties) { },
+ getCellProperties: function(index, column, properties) { },
+ getColumnProperties: function(column, properties) { },
+ isContainer: function(index) { return false; },
+ isContainerOpen: function(index) { return false; },
+ isContainerEmpty: function(index) { return false; },
+ isSeparator: function(index) { return false; },
+ isSorted: function(index) { return false; },
+ getParentIndex: function(index) { return -1; },
+ hasNextSibling: function(parentIndex, index) { return false; },
+ getLevel: function(index) { return 0; },
+ getProgressMode: function(index, column) { },
+ getCellValue: function(index, column) { },
+ toggleOpenState: function(index) { },
+ cycleHeader: function(column) { },
+ selectionChanged: function() { },
+ cycleCell: function(row, column) { },
+ isEditable: function(index, column) { return false; },
+ isSelectable: function(index, column) { return false; },
+ setCellValue: function(index, column, value) { },
+ setCellText: function(index, column, value) { },
+ performAction: function(action) { },
+ performActionOnRow: function(action, index) { },
+ performActionOnCell: function(action, index, column) { }
+};
diff --git a/suite/common/search/engineManager.xul b/suite/common/search/engineManager.xul
new file mode 100644
index 0000000000..4c09f83f4a
--- /dev/null
+++ b/suite/common/search/engineManager.xul
@@ -0,0 +1,127 @@
+
+
+
+
+
+
+
+
+
diff --git a/suite/common/search/search.xml b/suite/common/search/search.xml
new file mode 100644
index 0000000000..b630a4e87c
--- /dev/null
+++ b/suite/common/search/search.xml
@@ -0,0 +1,747 @@
+
+
+
+
+%searchBarDTD;
+
+%navigatorDTD;
+]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ document.getAnonymousElementByAttribute(this,
+ "anonid", "searchbar-stringbundle");
+ document.getAnonymousElementByAttribute(this,
+ "anonid", "searchbar-textbox");
+ document.getAnonymousElementByAttribute(this,
+ "anonid", "searchbar-popup");
+ document.getAnonymousElementByAttribute(this,
+ "anonid", "searchbar-engine-button");
+
+ Components.classes["@mozilla.org/browser/search-service;1"]
+ .getService(Components.interfaces.nsIBrowserSearchService);
+
+ null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ = 0; i--) {
+ if (items[i].classList.contains("addengine-item") ||
+ items[i].classList.contains("addengine-separator"))
+ popup.removeChild(items[i]);
+ }
+
+ var addengines = getBrowser().mCurrentBrowser.engines;
+ if (addengines && addengines.length > 0) {
+ const kXULNS =
+ "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
+
+ // Find the (first) separator in the remaining menu, or the first item
+ // if no separators are present.
+ var insertLocation = popup.firstChild;
+ while (insertLocation.nextSibling &&
+ insertLocation.localName != "menuseparator") {
+ insertLocation = insertLocation.nextSibling;
+ }
+ if (insertLocation.localName != "menuseparator")
+ insertLocation = popup.firstChild;
+
+ var separator = document.createElementNS(kXULNS, "menuseparator");
+ separator.setAttribute("class", "addengine-separator");
+ popup.insertBefore(separator, insertLocation);
+
+ // Insert the "add this engine" items.
+ for (var i = 0; i < addengines.length; i++) {
+ var menuitem = document.createElement("menuitem");
+ var engineInfo = addengines[i];
+ var labelStr =
+ this._stringBundle.getFormattedString("cmd_addFoundEngine",
+ [engineInfo.title]);
+ menuitem = document.createElementNS(kXULNS, "menuitem");
+ menuitem.setAttribute("class", "menuitem-iconic addengine-item");
+ menuitem.setAttribute("label", labelStr);
+ menuitem.setAttribute("tooltiptext", engineInfo.uri);
+ menuitem.setAttribute("uri", engineInfo.uri);
+ if (engineInfo.icon)
+ menuitem.setAttribute("src", engineInfo.icon);
+ menuitem.setAttribute("title", engineInfo.title);
+ popup.insertBefore(menuitem, insertLocation);
+ }
+ }
+ ]]>
+
+
+
+
+ = 0; --i) {
+ var menuitem = document.createElementNS(kXULNS, "menuitem");
+ var name = engines[i].name;
+ menuitem.setAttribute("label", name);
+ menuitem.setAttribute("id", name);
+ menuitem.setAttribute("class", "menuitem-iconic searchbar-engine-menuitem menuitem-with-favicon");
+ // 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 (engines[i] == this.currentEngine)
+ menuitem.setAttribute("selected", "true");
+ var tooltip = this._stringBundle.getFormattedString("searchtip", [name]);
+ menuitem.setAttribute("tooltiptext", tooltip);
+ if (engines[i].iconURI)
+ menuitem.setAttribute("src", engines[i].iconURI.spec);
+ popup.insertBefore(menuitem, popup.firstChild);
+ menuitem.engine = engines[i];
+ }
+
+ this._needToBuildPopup = false;
+ ]]>
+
+
+
+
+
+
+
+
+
+
+ = 0 && newIndex < this.engines.length)
+ this.currentEngine = this.engines[newIndex];
+
+ aEvent.preventDefault();
+ aEvent.stopPropagation();
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#else
+ action="if (event.ctrlKey) this.selectEngine(event, (event.detail > 0));"/>
+#endif
+
+
+
+
+
+
+
+
+
+ document.getBindingParent(this)._stringBundle
+
+ Components.classes["@mozilla.org/satchel/form-history;1"]
+ .getService(Components.interfaces.nsIFormHistory2)
+
+
+ Components.classes["@mozilla.org/preferences-service;1"]
+ .getService(Components.interfaces.nsIPrefBranch2)
+
+
+
+ this._prefBranch.getBoolPref("browser.search.suggest.enabled")
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#ifndef XP_MACOSX
+
+#endif
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/suite/common/search/searchbarBindings.css b/suite/common/search/searchbarBindings.css
new file mode 100644
index 0000000000..4a39b87a04
--- /dev/null
+++ b/suite/common/search/searchbarBindings.css
@@ -0,0 +1,13 @@
+@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
+
+.searchbar-textbox {
+ -moz-binding: url("chrome://communicator/content/search/search.xml#searchbar-textbox");
+}
+
+.searchbar-engine-button {
+ -moz-user-focus: none;
+}
+
+.autocomplete-history-dropmarker {
+ display: none;
+}
diff --git a/suite/locales/en-US/chrome/browser/navigator.dtd b/suite/locales/en-US/chrome/browser/navigator.dtd
index bd61db6c36..bc38551598 100644
--- a/suite/locales/en-US/chrome/browser/navigator.dtd
+++ b/suite/locales/en-US/chrome/browser/navigator.dtd
@@ -152,14 +152,14 @@
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/suite/locales/en-US/chrome/common/pref/pref-search.dtd b/suite/locales/en-US/chrome/common/pref/pref-search.dtd
index 994d89ef8a..e1b53647b8 100755
--- a/suite/locales/en-US/chrome/common/pref/pref-search.dtd
+++ b/suite/locales/en-US/chrome/common/pref/pref-search.dtd
@@ -7,6 +7,9 @@
+
+
+
diff --git a/suite/locales/en-US/chrome/common/search/engineManager.dtd b/suite/locales/en-US/chrome/common/search/engineManager.dtd
new file mode 100644
index 0000000000..b7f3cc77ee
--- /dev/null
+++ b/suite/locales/en-US/chrome/common/search/engineManager.dtd
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/suite/locales/en-US/chrome/common/search/engineManager.properties b/suite/locales/en-US/chrome/common/search/engineManager.properties
new file mode 100644
index 0000000000..ee2ebbb663
--- /dev/null
+++ b/suite/locales/en-US/chrome/common/search/engineManager.properties
@@ -0,0 +1,5 @@
+editTitle=Edit Keyword
+editMsg=Enter a new keyword for "%S":
+duplicateTitle=Duplicate Keyword
+duplicateEngineMsg=You have chosen a keyword that is currently in use by "%S". Please select another.
+duplicateBookmarkMsg=You have chosen a keyword that is currently in use by a bookmark. Please select another.
diff --git a/suite/locales/en-US/chrome/common/search/search-panel.dtd b/suite/locales/en-US/chrome/common/search/search-panel.dtd
index 335b8e508c..1cb737f438 100755
--- a/suite/locales/en-US/chrome/common/search/search-panel.dtd
+++ b/suite/locales/en-US/chrome/common/search/search-panel.dtd
@@ -38,3 +38,5 @@
+
+
diff --git a/suite/locales/en-US/chrome/common/search/search.properties b/suite/locales/en-US/chrome/common/search/search.properties
new file mode 100644
index 0000000000..1e48ab3f86
--- /dev/null
+++ b/suite/locales/en-US/chrome/common/search/search.properties
@@ -0,0 +1,14 @@
+searchtip=Search using %S
+
+# LOCALIZATION NOTE (cmd_pasteAndSearch): "Search" is a verb, this is the
+# search bar equivalent to the url bar's "Paste & Go"
+cmd_pasteAndSearch=Paste & Search
+
+cmd_clearHistory=Clear Search History
+cmd_clearHistory_accesskey=H
+
+cmd_showSuggestions=Show Suggestions
+cmd_showSuggestions_accesskey=S
+
+cmd_addFoundEngine=Add "%S"
+
diff --git a/suite/locales/en-US/chrome/common/search/searchbar.dtd b/suite/locales/en-US/chrome/common/search/searchbar.dtd
new file mode 100644
index 0000000000..a49a703967
--- /dev/null
+++ b/suite/locales/en-US/chrome/common/search/searchbar.dtd
@@ -0,0 +1,2 @@
+
+
diff --git a/suite/locales/en-US/searchplugins/google.xml b/suite/locales/en-US/searchplugins/google.xml
index 677f078e92..a111201ee5 100644
--- a/suite/locales/en-US/searchplugins/google.xml
+++ b/suite/locales/en-US/searchplugins/google.xml
@@ -3,7 +3,7 @@
Google Search
UTF-8
data:image/png;base64,AAABAAEAEBAAAAEAGABoAwAAFgAAACgAAAAQAAAAIAAAAAEAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADs9Pt8xetPtu9FsfFNtu%2BTzvb2%2B%2Fne4dFJeBw0egA%2FfAJAfAA8ewBBegAAAAD%2B%2FPtft98Mp%2BwWsfAVsvEbs%2FQeqvF8xO7%2F%2F%2F63yqkxdgM7gwE%2FggM%2BfQA%2BegBDeQDe7PIbotgQufcMufEPtfIPsvAbs%2FQvq%2Bfz%2Bf%2F%2B%2B%2FZKhR05hgBBhQI8hgBAgAI9ewD0%2B%2Fg3pswAtO8Cxf4Kw%2FsJvvYAqupKsNv%2B%2Fv7%2F%2FP5VkSU0iQA7jQA9hgBDgQU%2BfQH%2F%2Ff%2FQ6fM4sM4KsN8AteMCruIqqdbZ7PH8%2Fv%2Fg6Nc%2Fhg05kAA8jAM9iQI%2BhQA%2BgQDQu6b97uv%2F%2F%2F7V8Pqw3eiWz97q8%2Ff%2F%2F%2F%2F7%2FPptpkkqjQE4kwA7kAA5iwI8iAA8hQCOSSKdXjiyflbAkG7u2s%2F%2B%2F%2F39%2F%2F7r8utrqEYtjQE8lgA7kwA7kwA9jwA9igA9hACiWSekVRyeSgiYSBHx6N%2F%2B%2Fv7k7OFRmiYtlAA5lwI7lwI4lAA7kgI9jwE9iwI4iQCoVhWcTxCmb0K%2BooT8%2Fv%2F7%2F%2F%2FJ2r8fdwI1mwA3mQA3mgA8lAE8lAE4jwA9iwE%2BhwGfXifWvqz%2B%2Ff%2F58u%2Fev6Dt4tr%2B%2F%2F2ZuIUsggA7mgM6mAM3lgA5lgA6kQE%2FkwBChwHt4dv%2F%2F%2F728ei1bCi7VAC5XQ7kz7n%2F%2F%2F6bsZkgcB03lQA9lgM7kwA2iQktZToPK4r9%2F%2F%2F9%2F%2F%2FSqYK5UwDKZAS9WALIkFn%2B%2F%2F3%2F%2BP8oKccGGcIRJrERILYFEMwAAuEAAdX%2F%2Ff7%2F%2FP%2B%2BfDvGXQLIZgLEWgLOjlf7%2F%2F%2F%2F%2F%2F9QU90EAPQAAf8DAP0AAfMAAOUDAtr%2F%2F%2F%2F7%2B%2Fu2bCTIYwDPZgDBWQDSr4P%2F%2Fv%2F%2F%2FP5GRuABAPkAA%2FwBAfkDAPAAAesAAN%2F%2F%2B%2Fz%2F%2F%2F64g1C5VwDMYwK8Yg7y5tz8%2Fv%2FV1PYKDOcAAP0DAf4AAf0AAfYEAOwAAuAAAAD%2F%2FPvi28ymXyChTATRrIb8%2F%2F3v8fk6P8MAAdUCAvoAAP0CAP0AAfYAAO4AAACAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAQAA
-
+
diff --git a/suite/locales/jar.mn b/suite/locales/jar.mn
index 24c4cd484c..53a36e5a27 100644
--- a/suite/locales/jar.mn
+++ b/suite/locales/jar.mn
@@ -186,6 +186,10 @@
locale/@AB_CD@/communicator-platform/win/pref/platformPrefOverlay.dtd (%chrome/common/pref/win/platformPrefOverlay.dtd)
locale/@AB_CD@/communicator/profile/profileSelection.dtd (%chrome/common/profile/profileSelection.dtd)
locale/@AB_CD@/communicator/profile/profileSelection.properties (%chrome/common/profile/profileSelection.properties)
+ locale/@AB_CD@/communicator/search/engineManager.dtd (%chrome/common/search/engineManager.dtd)
+ locale/@AB_CD@/communicator/search/engineManager.properties (%chrome/common/search/engineManager.properties)
+ locale/@AB_CD@/communicator/search/search.properties (%chrome/common/search/search.properties)
+ locale/@AB_CD@/communicator/search/searchbar.dtd (%chrome/common/search/searchbar.dtd)
locale/@AB_CD@/communicator/search/search-panel.dtd (%chrome/common/search/search-panel.dtd)
locale/@AB_CD@/communicator/sidebar/customize.dtd (%chrome/common/sidebar/customize.dtd)
locale/@AB_CD@/communicator/sidebar/preview.dtd (%chrome/common/sidebar/preview.dtd)
diff --git a/suite/themes/classic/communicator/search/engineManager.css b/suite/themes/classic/communicator/search/engineManager.css
new file mode 100644
index 0000000000..2b2fc3d9e5
--- /dev/null
+++ b/suite/themes/classic/communicator/search/engineManager.css
@@ -0,0 +1,47 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is search engine manager code.
+ *
+ * The Initial Developer of the Original Code is
+ * Gavin Sharp.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Gavin Sharp
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#engineChildren::-moz-tree-image(engineName) {
+ -moz-margin-end: 4px;
+ -moz-margin-start: 1px;
+ width: 16px;
+ height: 16px;
+}
+
+#engineChildren::-moz-tree-row {
+ height: 20px;
+}
diff --git a/suite/themes/classic/communicator/search/mainwindow-dropdown-arrow.png b/suite/themes/classic/communicator/search/mainwindow-dropdown-arrow.png
new file mode 100755
index 0000000000..7f5f55ef2b
Binary files /dev/null and b/suite/themes/classic/communicator/search/mainwindow-dropdown-arrow.png differ
diff --git a/suite/themes/classic/communicator/search/searchbar.css b/suite/themes/classic/communicator/search/searchbar.css
new file mode 100644
index 0000000000..57671d3eaf
--- /dev/null
+++ b/suite/themes/classic/communicator/search/searchbar.css
@@ -0,0 +1,68 @@
+.searchbar-textbox {
+ width: 6em;
+ min-width: 6em;
+}
+
+.textbox-input-box {
+ margin: 0;
+}
+
+/* ::::: searchbar-engine-button ::::: */
+
+.searchbar-engine-image {
+ height: 16px;
+ width: 16px;
+ list-style-image: url("chrome://global/skin/icons/folder-item.png");
+ -moz-image-region: rect(0px, 16px, 16px, 0px);
+ -moz-margin-start: 2px;
+}
+
+.searchbar-engine-button {
+ min-width: 0;
+ -moz-padding-end: 2px;
+ background-color: transparent;
+}
+
+.searchbar-dropmarker-image {
+ list-style-image: url("chrome://communicator/skin/search/mainwindow-dropdown-arrow.png");
+ -moz-image-region: rect(0, 13px, 11px, 0);
+}
+
+.searchbar-engine-button[open="true"] > .searchbar-dropmarker-image {
+ -moz-image-region: rect(0, 26px, 11px, 13px);
+}
+
+
+/* ::::: search-go-button ::::: */
+
+.search-go-container {
+ -moz-box-align: center;
+}
+
+.search-go-button {
+ padding: 1px;
+ -moz-padding-end: 2px;
+ list-style-image: url("chrome://global/skin/icons/Search-glass.png");
+ -moz-image-region: rect(0px 16px 16px 0px);
+}
+
+.search-go-button:-moz-system-metric(touch-enabled) {
+ -moz-padding-start: 5px;
+ -moz-padding-end: 3px;
+}
+
+.search-go-button:-moz-locale-dir(rtl) {
+ -moz-transform: scaleX(-1);
+}
+
+.search-go-button:hover {
+ -moz-image-region: rect(0px 32px 16px 16px);
+}
+
+.search-go-button:hover:active {
+ -moz-image-region: rect(0px, 48px, 16px, 32px);
+}
+
+.searchbar-engine-menuitem[selected="true"] > .menu-iconic-text {
+ font-weight: bold;
+}
diff --git a/suite/themes/classic/jar.mn b/suite/themes/classic/jar.mn
index db3710715e..e924538fd7 100644
--- a/suite/themes/classic/jar.mn
+++ b/suite/themes/classic/jar.mn
@@ -105,7 +105,10 @@ classic.jar:
skin/classic/communicator/profile/profile.css (communicator/profile/profile.css)
skin/classic/communicator/profile/profileManager.css (communicator/profile/profileManager.css)
skin/classic/communicator/profile/profileicon-large.gif (communicator/profile/profileicon-large.gif)
+ skin/classic/communicator/search/engineManager.css (communicator/search/engineManager.css)
+ skin/classic/communicator/search/mainwindow-dropdown-arrow.png (communicator/search/mainwindow-dropdown-arrow.png)
skin/classic/communicator/search/search.css (communicator/search/search.css)
+ skin/classic/communicator/search/searchbar.css (communicator/search/searchbar.css)
skin/classic/communicator/sidebar/sbtab-twisty.gif (communicator/sidebar/sbtab-twisty.gif)
skin/classic/communicator/sidebar/sbtab-twisty-open.gif (communicator/sidebar/sbtab-twisty-open.gif)
skin/classic/communicator/sidebar/customize.css (communicator/sidebar/customize.css)
diff --git a/suite/themes/classic/mac/navigator/navigator.css b/suite/themes/classic/mac/navigator/navigator.css
index e9992e35e8..77205dd645 100644
--- a/suite/themes/classic/mac/navigator/navigator.css
+++ b/suite/themes/classic/mac/navigator/navigator.css
@@ -441,6 +441,10 @@ toolbar[mode="text"] > #window-controls > toolbarbutton > .toolbarbutton-icon {
-moz-margin-end: 4px;
}
+.autocomplete-treebody::-moz-tree-cell-text(treecolAutoCompleteComment) {
+ color: GrayText;
+}
+
/* ::::: searchbutton ::::: */
#search-button {
@@ -455,6 +459,18 @@ toolbar[mode="icons"] #search-button > .button-box > .button-text {
display: none;
}
+/* ::::: search bar ::::: */
+
+.autocomplete-treebody::-moz-tree-cell-text(suggesthint, treecolAutoCompleteComment),
+.autocomplete-treebody::-moz-tree-cell-text(suggestfirst, treecolAutoCompleteComment) {
+ color: GrayText;
+ font-size: smaller;
+}
+
+.autocomplete-treebody::-moz-tree-cell(suggesthint) {
+ border-top: 1px solid GrayText;
+}
+
/* ::::: sidebar splitter ::::: */
#sidebar-splitter {
diff --git a/suite/themes/classic/navigator/navigator.css b/suite/themes/classic/navigator/navigator.css
index 9b5edd4875..5a3cb6c114 100644
--- a/suite/themes/classic/navigator/navigator.css
+++ b/suite/themes/classic/navigator/navigator.css
@@ -476,6 +476,10 @@ panel[nomatch="true"] > .autocomplete-search-box {
-moz-margin-end: 4px;
}
+.autocomplete-treebody::-moz-tree-cell-text(treecolAutoCompleteComment) {
+ color: GrayText;
+}
+
/* ::::: go and searchbuttons ::::: */
#search-button,
@@ -507,6 +511,18 @@ toolbar[mode="icons"] #search-button > .button-box > .button-text {
display: none;
}
+/* ::::: search bar ::::: */
+
+.autocomplete-treebody::-moz-tree-cell-text(suggesthint, treecolAutoCompleteComment),
+.autocomplete-treebody::-moz-tree-cell-text(suggestfirst, treecolAutoCompleteComment) {
+ color: GrayText;
+ font-size: smaller;
+}
+
+.autocomplete-treebody::-moz-tree-cell(suggesthint) {
+ border-top: 1px solid GrayText;
+}
+
/* ::::: sidebar splitter ::::: */
#sidebar-splitter {
diff --git a/suite/themes/modern/communicator/search/engineManager.css b/suite/themes/modern/communicator/search/engineManager.css
new file mode 100644
index 0000000000..2b2fc3d9e5
--- /dev/null
+++ b/suite/themes/modern/communicator/search/engineManager.css
@@ -0,0 +1,47 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is search engine manager code.
+ *
+ * The Initial Developer of the Original Code is
+ * Gavin Sharp.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Gavin Sharp
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#engineChildren::-moz-tree-image(engineName) {
+ -moz-margin-end: 4px;
+ -moz-margin-start: 1px;
+ width: 16px;
+ height: 16px;
+}
+
+#engineChildren::-moz-tree-row {
+ height: 20px;
+}
diff --git a/suite/themes/modern/communicator/search/mainwindow-dropdown-arrow.png b/suite/themes/modern/communicator/search/mainwindow-dropdown-arrow.png
new file mode 100644
index 0000000000..dc141ef9f4
Binary files /dev/null and b/suite/themes/modern/communicator/search/mainwindow-dropdown-arrow.png differ
diff --git a/suite/themes/modern/communicator/search/searchbar.css b/suite/themes/modern/communicator/search/searchbar.css
new file mode 100644
index 0000000000..9b85390ff8
--- /dev/null
+++ b/suite/themes/modern/communicator/search/searchbar.css
@@ -0,0 +1,62 @@
+.searchbar-textbox {
+ width: 6em;
+ min-width: 6em;
+}
+
+.autocomplete-textbox-container {
+ -moz-box-align: stretch;
+}
+
+.textbox-input-box {
+ margin: 0;
+}
+
+/* ::::: searchbar-engine-button ::::: */
+
+.searchbar-engine-image {
+ height: 16px;
+ width: 16px;
+ list-style-image: url("chrome://communicator/skin/directory/file-icon.gif");
+ -moz-margin-start: 2px;
+}
+
+.searchbar-engine-button {
+ min-width: 0;
+ -moz-padding-end: 2px;
+ -moz-box-align: center;
+ background: none;
+}
+
+.searchbar-dropmarker-image {
+ list-style-image: url("chrome://communicator/skin/search/mainwindow-dropdown-arrow.png");
+ -moz-image-region: rect(0, 13px, 11px, 0);
+}
+
+.searchbar-engine-button[open="true"] > .searchbar-dropmarker-image {
+ -moz-image-region: rect(0, 26px, 11px, 13px);
+}
+
+
+/* ::::: search-go-button ::::: */
+
+.search-go-container {
+ -moz-box-align: center;
+}
+
+.search-go-button {
+ padding: 1px;
+ list-style-image: url("chrome://global/skin/icons/search.gif");
+}
+
+.search-go-button:-moz-system-metric(touch-enabled) {
+ -moz-padding-start: 5px;
+ -moz-padding-end: 3px;
+}
+
+.search-go-button:-moz-locale-dir(rtl) {
+ -moz-transform: scaleX(-1);
+}
+
+.searchbar-engine-menuitem[selected="true"] > .menu-iconic-text {
+ font-weight: bold;
+}
diff --git a/suite/themes/modern/jar.mn b/suite/themes/modern/jar.mn
index 041743df96..3b6f52d908 100644
--- a/suite/themes/modern/jar.mn
+++ b/suite/themes/modern/jar.mn
@@ -103,7 +103,10 @@ modern.jar:
skin/modern/communicator/profile/migrate.gif (communicator/profile/migrate.gif)
skin/modern/communicator/profile/profile.gif (communicator/profile/profile.gif)
skin/modern/communicator/profile/profile.css (communicator/profile/profile.css)
+ skin/modern/communicator/search/engineManager.css (communicator/search/engineManager.css)
+ skin/modern/communicator/search/mainwindow-dropdown-arrow.png (communicator/search/mainwindow-dropdown-arrow.png)
skin/modern/communicator/search/search.css (communicator/search/search.css)
+ skin/modern/communicator/search/searchbar.css (communicator/search/searchbar.css)
skin/modern/communicator/sidebar/sidebarBindings.xml (communicator/sidebar/sidebarBindings.xml)
skin/modern/communicator/sidebar/sbar-top.gif (communicator/sidebar/sbar-top.gif)
skin/modern/communicator/sidebar/sbar-top-tabopen.gif (communicator/sidebar/sbar-top-tabopen.gif)
diff --git a/suite/themes/modern/navigator/navigator.css b/suite/themes/modern/navigator/navigator.css
index acc87d8796..6a654cfcbf 100644
--- a/suite/themes/modern/navigator/navigator.css
+++ b/suite/themes/modern/navigator/navigator.css
@@ -671,6 +671,10 @@ panel[nomatch="true"] > .autocomplete-search-box {
list-style-image: url("chrome://navigator/skin/toolbar/ubhist-arrow-act.gif");
}
+.autocomplete-treebody::-moz-tree-cell-text(treecolAutoCompleteComment) {
+ color: #999999;
+}
+
/* ::::: go and searchbuttons ::::: */
#go-button,
@@ -688,6 +692,18 @@ panel[nomatch="true"] > .autocomplete-search-box {
list-style-image: url("chrome://global/skin/icons/search.gif");
}
+/* ::::: search bar ::::: */
+
+.autocomplete-treebody::-moz-tree-cell-text(suggesthint, treecolAutoCompleteComment),
+.autocomplete-treebody::-moz-tree-cell-text(suggestfirst, treecolAutoCompleteComment) {
+ color: #999999;
+ font-size: smaller;
+}
+
+.autocomplete-treebody::-moz-tree-cell(suggesthint) {
+ border-top: 1px solid #999999;
+}
+
/* ::::: navigator throbber ::::: */
#throbber-box {