2006-02-18 03:13:07 +03:00
|
|
|
<?xml version="1.0"?>
|
2006-02-18 03:13:11 +03:00
|
|
|
# -*- Mode: HTML -*-
|
|
|
|
# ***** BEGIN LICENSE BLOCK *****
|
2006-02-18 03:13:45 +03:00
|
|
|
# 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.
|
|
|
|
#
|
2006-02-18 03:13:11 +03:00
|
|
|
# The Original Code is mozilla.org browser.
|
2006-02-18 03:13:45 +03:00
|
|
|
#
|
|
|
|
# The Initial Developer of the Original Code is
|
|
|
|
# Joe Hewitt.
|
|
|
|
# Portions created by the Initial Developer are Copyright (C) 2003
|
|
|
|
# the Initial Developer. All Rights Reserved.
|
|
|
|
#
|
2006-02-18 03:13:11 +03:00
|
|
|
# Contributor(s):
|
2006-03-17 10:16:00 +03:00
|
|
|
# Pierre Chanial (v2) <p_ch@verizon.net>
|
|
|
|
# Gavin Sharp (v3) <gavin@gavinsharp.com>
|
|
|
|
# Ben Goodger <beng@google.com>
|
2006-02-18 03:13:11 +03:00
|
|
|
#
|
2006-02-18 03:13:45 +03:00
|
|
|
# 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.
|
2006-02-18 03:13:11 +03:00
|
|
|
#
|
|
|
|
# ***** END LICENSE BLOCK *****
|
|
|
|
|
2006-02-18 03:13:07 +03:00
|
|
|
<bindings id="SearchBindings"
|
2006-03-17 10:16:00 +03:00
|
|
|
xmlns="http://www.mozilla.org/xbl"
|
|
|
|
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
|
|
|
xmlns:xbl="http://www.mozilla.org/xbl">
|
2006-02-18 03:13:07 +03:00
|
|
|
|
2006-02-18 03:13:43 +03:00
|
|
|
<binding id="searchbar-base">
|
|
|
|
<resources>
|
2006-03-17 10:16:00 +03:00
|
|
|
<stylesheet src="chrome://browser/content/search/searchbarBindings.css"/>
|
2006-02-18 03:13:43 +03:00
|
|
|
<stylesheet src="chrome://browser/skin/searchbar.css"/>
|
|
|
|
</resources>
|
|
|
|
</binding>
|
|
|
|
|
2006-03-17 10:16:00 +03:00
|
|
|
<binding id="searchbar"
|
|
|
|
extends="chrome://browser/content/search/search.xml#searchbar-base">
|
2006-02-18 03:13:43 +03:00
|
|
|
<content>
|
2006-03-17 10:16:00 +03:00
|
|
|
<xul:stringbundle src="chrome://browser/locale/search.properties"/>
|
|
|
|
<xul:textbox class="searchbar-textbox"
|
|
|
|
type="autocomplete"
|
|
|
|
flex="1"
|
2006-02-18 03:13:43 +03:00
|
|
|
autocompletepopup="PopupAutoComplete"
|
|
|
|
autocompletesearch="form-history"
|
|
|
|
autocompletesearchparam="searchbar-history"
|
2006-02-18 03:13:46 +03:00
|
|
|
completeselectedindex="true"
|
2006-02-18 03:13:43 +03:00
|
|
|
tabscrolling="true"
|
|
|
|
xbl:inherits="disableautocomplete,searchengine,src">
|
2006-03-17 10:16:00 +03:00
|
|
|
<xul:button class="searchbar-dropmarker"
|
|
|
|
type="menu"
|
|
|
|
anonid="searchbar-dropmarker"
|
|
|
|
popup="_child"
|
|
|
|
xbl:inherits="src">
|
|
|
|
<xul:menupopup anonid="searchbar-popup"
|
|
|
|
class="searchbar-popup"
|
|
|
|
position="after_start"
|
|
|
|
oncommand="this.parentNode.parentNode
|
|
|
|
.parentNode
|
|
|
|
.onEnginePopupCommand(event);"/>
|
2006-02-18 03:13:43 +03:00
|
|
|
</xul:button>
|
|
|
|
</xul:textbox>
|
|
|
|
</content>
|
2006-03-17 10:16:00 +03:00
|
|
|
<implementation implements="nsIObserver">
|
|
|
|
|
|
|
|
<constructor><![CDATA[
|
|
|
|
// Refresh the display (updating icon, etc)
|
|
|
|
this.updateDisplay();
|
|
|
|
this.populatePopup();
|
|
|
|
|
|
|
|
var os =
|
|
|
|
Components.classes["@mozilla.org/observer-service;1"]
|
|
|
|
.getService(Components.interfaces.nsIObserverService);
|
|
|
|
os.addObserver(this, "browser-search-engine-modified", false);
|
|
|
|
]]></constructor>
|
|
|
|
|
|
|
|
<destructor><![CDATA[
|
|
|
|
var os = Components.classes["@mozilla.org/observer-service;1"]
|
|
|
|
.getService(Components.interfaces.nsIObserverService);
|
|
|
|
os.removeObserver(this, "browser-search-engine-modified");
|
|
|
|
]]></destructor>
|
|
|
|
|
|
|
|
<field name="_stringBundle">document.getAnonymousNodes(this)[0];</field>
|
|
|
|
<field name="_textbox">document.getAnonymousNodes(this)[1];</field>
|
|
|
|
<field name="_popup">
|
|
|
|
document.getAnonymousElementByAttribute(this,
|
|
|
|
"anonid",
|
|
|
|
"searchbar-popup");
|
|
|
|
</field>
|
|
|
|
<field name="_ss">null</field>
|
|
|
|
|
|
|
|
<property name="currentEngine" onset="this.searchService.currentEngine = val;"
|
|
|
|
onget="return this.searchService.currentEngine;"/>
|
|
|
|
|
|
|
|
<property name="searchService" readonly="true">
|
|
|
|
<getter><![CDATA[
|
|
|
|
if (!this._ss) {
|
|
|
|
const nsIBSS = Components.interfaces.nsIBrowserSearchService;
|
|
|
|
this._ss =
|
|
|
|
Components.classes["@mozilla.org/browser/search-service;1"]
|
|
|
|
.getService(nsIBSS);
|
|
|
|
}
|
|
|
|
return this._ss;
|
|
|
|
]]></getter>
|
|
|
|
</property>
|
|
|
|
|
|
|
|
<property name="value"
|
|
|
|
onget="return this._textbox.value;"
|
|
|
|
onset="this._textbox.value = val; return val;"/>
|
|
|
|
|
2006-02-18 03:13:43 +03:00
|
|
|
<method name="focus">
|
|
|
|
<body><![CDATA[
|
2006-03-17 10:16:00 +03:00
|
|
|
this._textbox.focus();
|
2006-02-18 03:13:43 +03:00
|
|
|
]]></body>
|
|
|
|
</method>
|
2006-03-17 10:16:00 +03:00
|
|
|
|
2006-02-18 03:13:43 +03:00
|
|
|
<method name="select">
|
|
|
|
<body><![CDATA[
|
2006-03-17 10:16:00 +03:00
|
|
|
this._textbox.select();
|
|
|
|
]]></body>
|
|
|
|
</method>
|
|
|
|
|
|
|
|
<method name="observe">
|
|
|
|
<parameter name="aEngine"/>
|
|
|
|
<parameter name="aTopic"/>
|
|
|
|
<parameter name="aVerb"/>
|
|
|
|
<body><![CDATA[
|
|
|
|
switch (aVerb) {
|
|
|
|
case "engine-removed":
|
|
|
|
case "engine-added":
|
|
|
|
case "engine-changed":
|
|
|
|
// An engine was removed (or hidden), added, or an icon was
|
|
|
|
// changed
|
|
|
|
this.populatePopup();
|
|
|
|
// Fall through
|
|
|
|
case "engine-current":
|
|
|
|
// The current engine was changed
|
|
|
|
this.updateDisplay();
|
|
|
|
}
|
|
|
|
]]></body>
|
|
|
|
</method>
|
|
|
|
|
|
|
|
<method name="updateDisplay">
|
|
|
|
<body><![CDATA[
|
|
|
|
var uri = this.currentEngine.iconURI;
|
|
|
|
if (uri)
|
|
|
|
this.setAttribute("src", uri.spec);
|
2006-03-17 11:41:17 +03:00
|
|
|
else
|
|
|
|
this.setAttribute("src", "");
|
2006-03-17 10:16:00 +03:00
|
|
|
|
|
|
|
var name = this.currentEngine.name;
|
|
|
|
var text = this._stringBundle.getFormattedString("searchtip", [name]);
|
|
|
|
this.setAttribute("tooltiptext", text);
|
|
|
|
]]></body>
|
|
|
|
</method>
|
|
|
|
|
|
|
|
<method name="populatePopup">
|
|
|
|
<body><![CDATA[
|
|
|
|
var popup = this._popup;
|
|
|
|
|
|
|
|
// Clear the popup
|
|
|
|
while (popup.firstChild)
|
|
|
|
popup.removeChild(popup.firstChild);
|
|
|
|
|
|
|
|
var engines = this.searchService.getVisibleEngines({ });
|
|
|
|
const kXULNS =
|
|
|
|
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
|
|
|
|
for (var i = 0; i < engines.length; ++i) {
|
|
|
|
var menuitem = document.createElementNS(kXULNS, "menuitem");
|
|
|
|
menuitem.setAttribute("label", engines[i].name);
|
|
|
|
menuitem.setAttribute("id", engines[i].name);
|
|
|
|
menuitem.setAttribute("class", "menuitem-iconic");
|
|
|
|
if (engines[i].iconURI)
|
|
|
|
menuitem.setAttribute("src", engines[i].iconURI.spec);
|
|
|
|
popup.appendChild(menuitem);
|
|
|
|
menuitem.engine = engines[i];
|
|
|
|
}
|
|
|
|
|
|
|
|
// Add the "Get more engines" item
|
|
|
|
// XXX this will become "edit this list"
|
|
|
|
var separator = document.createElementNS(kXULNS, "menuseparator");
|
|
|
|
popup.appendChild(separator);
|
|
|
|
|
|
|
|
menuitem = document.createElementNS(kXULNS, "menuitem");
|
|
|
|
/* XXX
|
|
|
|
const label = this._stringBundle.getString("cmd_editList");
|
|
|
|
const accesskey = this._stringBundle.getString("cmd_editListAccesskey");
|
|
|
|
*/
|
|
|
|
const label = this._stringBundle.getString("cmd_addEngine");
|
|
|
|
const accesskey = this._stringBundle.getString("cmd_addEngine_accesskey");
|
|
|
|
menuitem.setAttribute("label", label);
|
|
|
|
menuitem.setAttribute("accesskey", accesskey);
|
|
|
|
menuitem.setAttribute("id", "editlist");
|
|
|
|
popup.appendChild(menuitem);
|
|
|
|
]]></body>
|
|
|
|
</method>
|
|
|
|
|
|
|
|
<method name="onEnginePopupCommand">
|
|
|
|
<parameter name="aEvent"/>
|
|
|
|
<body><![CDATA[
|
|
|
|
if (aEvent.target.id == "editlist") {
|
|
|
|
// XXX
|
|
|
|
/* openDialog("chrome://browser/content/search/edit-engines.xul", "",
|
|
|
|
"modal,centerscreen"); */
|
|
|
|
var regionBundle = document.getElementById("bundle_browser_region");
|
|
|
|
loadURI(regionBundle.getString("searchEnginesURL"), null, null);
|
|
|
|
} else {
|
|
|
|
this.currentEngine = aEvent.target.engine;
|
|
|
|
this.focus();
|
|
|
|
this.select();
|
|
|
|
}
|
2006-02-18 03:13:43 +03:00
|
|
|
]]></body>
|
|
|
|
</method>
|
2006-03-17 10:16:00 +03:00
|
|
|
|
|
|
|
<method name="selectEngine">
|
|
|
|
<parameter name="aEvent"/>
|
|
|
|
<parameter name="isNextEngine"/>
|
|
|
|
<body><![CDATA[
|
|
|
|
// XXX this seems suboptimal...
|
|
|
|
var currentEngine = this.currentEngine;
|
|
|
|
if (currentEngine) {
|
|
|
|
var engines = this.searchService.getVisibleEngines({ });
|
|
|
|
for (var i = 0; i < engines.length; ++i) {
|
|
|
|
if (engines[i] == currentEngine) {
|
|
|
|
var nextIndex = i + (isNextEngine ? 1 : -1);
|
|
|
|
if (nextIndex >= 0 && nextIndex < engines.length)
|
|
|
|
this.currentEngine = engines[nextIndex];
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
aEvent.preventDefault();
|
|
|
|
aEvent.stopPropagation();
|
|
|
|
]]></body>
|
|
|
|
</method>
|
|
|
|
|
|
|
|
<method name="doSearch">
|
|
|
|
<parameter name="aData"/>
|
|
|
|
<parameter name="aInNewTab"/>
|
|
|
|
<body><![CDATA[
|
|
|
|
var postData = { value: null };
|
|
|
|
var submission = this.currentEngine.getSubmission(aData);
|
|
|
|
if (submission) {
|
|
|
|
url = submission.uri.spec;
|
|
|
|
postData.value = submission.postData;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (aInNewTab) {
|
|
|
|
content.focus();
|
|
|
|
getBrowser().loadOneTab(url, null, null, postData.value, false);
|
|
|
|
if (gURLBar)
|
|
|
|
gURLBar.value = url;
|
|
|
|
} else
|
|
|
|
loadURI(url, null, postData.value);
|
|
|
|
content.focus();
|
|
|
|
]]></body>
|
|
|
|
</method>
|
|
|
|
|
2006-02-18 03:13:43 +03:00
|
|
|
</implementation>
|
|
|
|
</binding>
|
|
|
|
|
2006-03-17 10:16:00 +03:00
|
|
|
<binding id="searchbar-textbox"
|
|
|
|
extends="chrome://global/content/bindings/autocomplete.xml#autocomplete">
|
2006-02-18 03:13:07 +03:00
|
|
|
<implementation>
|
|
|
|
<constructor><![CDATA[
|
2006-02-18 03:13:43 +03:00
|
|
|
if (this.parentNode.parentNode.parentNode.localName ==
|
|
|
|
"toolbarpaletteitem")
|
|
|
|
return;
|
2006-02-18 03:13:10 +03:00
|
|
|
setTimeout(function(a) { a.initialize(); }, 0, this);
|
2006-02-18 03:13:07 +03:00
|
|
|
]]></constructor>
|
|
|
|
|
2006-02-18 03:13:43 +03:00
|
|
|
<destructor><![CDATA[
|
2006-02-18 03:13:51 +03:00
|
|
|
// Because XBL and the customize toolbar code interacts poorly,
|
2006-02-18 03:13:52 +03:00
|
|
|
// there may not be anything to remove here
|
2006-02-18 03:13:51 +03:00
|
|
|
try {
|
|
|
|
this.controllers.removeController(this.searchbarController);
|
|
|
|
} catch (ex) { }
|
2006-02-18 03:13:43 +03:00
|
|
|
]]></destructor>
|
|
|
|
|
2006-03-17 10:16:00 +03:00
|
|
|
<field name="_stringBundle">this.parentNode._stringBundle</field>
|
|
|
|
<field name="_formHistSvc"/>
|
|
|
|
<field name="_prefBranch"/>
|
2006-02-18 03:13:43 +03:00
|
|
|
|
2006-02-18 03:13:10 +03:00
|
|
|
<method name="initialize">
|
|
|
|
<body><![CDATA[
|
2006-03-17 10:16:00 +03:00
|
|
|
this._formHistSvc =
|
|
|
|
Components.classes["@mozilla.org/satchel/form-history;1"]
|
|
|
|
.getService(Components.interfaces.nsIFormHistory);
|
|
|
|
this._prefBranch =
|
2006-02-18 03:13:52 +03:00
|
|
|
Components.classes["@mozilla.org/preferences-service;1"]
|
2006-03-17 10:16:00 +03:00
|
|
|
.getService(Components.interfaces.nsIPrefBranch);
|
2006-02-18 03:13:52 +03:00
|
|
|
|
2006-03-17 10:16:00 +03:00
|
|
|
if (this._prefBranch.getBoolPref("browser.urlbar.clickSelectsAll"))
|
2006-02-18 03:14:00 +03:00
|
|
|
this.setAttribute("clickSelectsAll", true);
|
|
|
|
|
2006-03-17 10:16:00 +03:00
|
|
|
var textBox = document.getAnonymousElementByAttribute(this,
|
|
|
|
"anonid", "textbox-input-box");
|
|
|
|
var cxmenu = document.getAnonymousElementByAttribute(textBox,
|
|
|
|
"anonid", "input-box-contextmenu");
|
2006-02-18 03:13:43 +03:00
|
|
|
|
2006-03-17 10:16:00 +03:00
|
|
|
var element = document.createElementNS(XUL_NS, "menuseparator");
|
|
|
|
cxmenu.appendChild(element);
|
2006-02-18 03:13:43 +03:00
|
|
|
element = document.createElementNS(XUL_NS, "menuitem");
|
2006-03-17 10:16:00 +03:00
|
|
|
const label = this._stringBundle.getString("cmd_clearHistory");
|
|
|
|
const akey = this._stringBundle.getString("cmd_clearHistory_accesskey");
|
|
|
|
element.setAttribute("label", label);
|
|
|
|
element.setAttribute("accesskey", akey);
|
2006-02-18 03:13:43 +03:00
|
|
|
element.setAttribute("cmd", "cmd_clearhistory");
|
|
|
|
|
2006-03-17 10:16:00 +03:00
|
|
|
cxmenu.appendChild(element);
|
2006-02-18 03:13:52 +03:00
|
|
|
|
2006-03-17 10:16:00 +03:00
|
|
|
this.controllers.appendController(this.searchbarController);
|
2006-02-18 03:13:10 +03:00
|
|
|
]]></body>
|
|
|
|
</method>
|
2006-02-18 03:13:12 +03:00
|
|
|
|
2006-02-18 03:13:50 +03:00
|
|
|
<method name="openSearch">
|
|
|
|
<body>
|
|
|
|
<![CDATA[
|
2006-03-17 10:16:00 +03:00
|
|
|
// Don't open search popup if history popup is open
|
|
|
|
if (!this.popupOpen) {
|
2006-02-18 03:13:50 +03:00
|
|
|
document.getAnonymousElementByAttribute(this.parentNode,
|
2006-03-17 10:16:00 +03:00
|
|
|
"anonid", "searchbar-dropmarker").click();
|
2006-02-18 03:13:50 +03:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
]]>
|
|
|
|
</body>
|
|
|
|
</method>
|
|
|
|
|
2006-03-17 10:16:00 +03:00
|
|
|
<!-- overload |onTextEntered| in autocomplete.xml -->
|
2006-02-18 03:13:12 +03:00
|
|
|
<method name="onTextEntered">
|
2006-02-18 03:13:53 +03:00
|
|
|
<parameter name="aEvent"/>
|
2006-02-18 03:13:12 +03:00
|
|
|
<body><![CDATA[
|
|
|
|
// Save the current value in the form history
|
2006-02-18 03:13:57 +03:00
|
|
|
if (this.value && !this.hasAttribute("disableautocomplete"))
|
2006-03-17 10:16:00 +03:00
|
|
|
this._formHistSvc.addEntry(this.getAttribute(
|
2006-02-18 03:13:43 +03:00
|
|
|
"autocompletesearchparam"), this.value);
|
2006-02-18 03:13:53 +03:00
|
|
|
var evt = aEvent || this.mEnterEvent;
|
2006-03-17 10:16:00 +03:00
|
|
|
var newTab = this._prefBranch.getBoolPref("browser.search.openintab");
|
|
|
|
this.parentNode.doSearch(this.value, ((evt && evt.altKey) ^ newTab));
|
2006-02-18 03:13:12 +03:00
|
|
|
]]></body>
|
|
|
|
</method>
|
|
|
|
|
2006-02-18 03:13:43 +03:00
|
|
|
<!-- nsIController -->
|
2006-03-17 10:16:00 +03:00
|
|
|
<field name="searchbarController" readonly="true"><![CDATA[({
|
|
|
|
_self: this,
|
|
|
|
supportsCommand: function(aCommand) {
|
2006-02-18 03:13:43 +03:00
|
|
|
return aCommand == "cmd_clearhistory";
|
|
|
|
},
|
|
|
|
|
2006-03-17 10:16:00 +03:00
|
|
|
isCommandEnabled: function(aCommand) {
|
|
|
|
return this._self._formHistSvc.nameExists(
|
|
|
|
this._self.getAttribute("autocompletesearchparam"));
|
|
|
|
},
|
2006-02-18 03:14:01 +03:00
|
|
|
|
2006-03-17 10:16:00 +03:00
|
|
|
doCommand: function (aCommand) {
|
|
|
|
this._self._formHistSvc.removeEntriesForName(
|
|
|
|
this._self.getAttribute("autocompletesearchparam"));
|
|
|
|
this._self.value = "";
|
2006-02-18 03:13:43 +03:00
|
|
|
}
|
2006-03-17 10:16:00 +03:00
|
|
|
})]]></field>
|
2006-02-18 03:13:43 +03:00
|
|
|
|
|
|
|
<!-- DND Observer -->
|
2006-03-17 10:16:00 +03:00
|
|
|
<field name="searchbarDNDObserver" readonly="true"><![CDATA[({
|
2006-02-18 03:13:43 +03:00
|
|
|
mOuter: this,
|
2006-03-17 10:16:00 +03:00
|
|
|
|
|
|
|
onDrop: function (aEvent, aXferData, aDragSession) {
|
2006-02-18 03:13:43 +03:00
|
|
|
var data = transferUtils.retrieveURLFromData(aXferData.data,
|
|
|
|
aXferData.flavour.contentType);
|
|
|
|
if (data) {
|
2006-02-18 03:13:53 +03:00
|
|
|
this.mOuter.value = data;
|
|
|
|
this.mOuter.onTextEntered(aEvent);
|
2006-02-18 03:13:43 +03:00
|
|
|
}
|
|
|
|
},
|
2006-03-17 10:16:00 +03:00
|
|
|
|
|
|
|
getSupportedFlavours: function () {
|
2006-02-18 03:13:43 +03:00
|
|
|
var flavourSet = new FlavourSet();
|
2006-03-17 10:16:00 +03:00
|
|
|
|
2006-02-18 03:13:43 +03:00
|
|
|
flavourSet.appendFlavour("text/unicode");
|
|
|
|
flavourSet.appendFlavour("text/x-moz-url");
|
|
|
|
flavourSet.appendFlavour("application/x-moz-file", "nsIFile");
|
|
|
|
return flavourSet;
|
|
|
|
}
|
2006-03-17 10:16:00 +03:00
|
|
|
})]]></field>
|
2006-02-18 03:13:07 +03:00
|
|
|
</implementation>
|
2006-02-18 03:13:12 +03:00
|
|
|
|
|
|
|
<handlers>
|
2006-03-17 10:16:00 +03:00
|
|
|
<handler event="keypress" keycode="vk_up" modifiers="accel"
|
|
|
|
phase="capturing"
|
|
|
|
action="this.parentNode.selectEngine(event, false);"/>
|
2006-02-18 03:13:12 +03:00
|
|
|
|
2006-03-17 10:16:00 +03:00
|
|
|
<handler event="keypress" keycode="vk_down" modifiers="accel"
|
|
|
|
phase="capturing"
|
|
|
|
action="this.parentNode.selectEngine(event, true);"/>
|
|
|
|
|
|
|
|
<handler event="keypress" keycode="vk_down" modifiers="alt"
|
|
|
|
phase="capturing"
|
2006-02-18 03:13:50 +03:00
|
|
|
action="return this.openSearch();"/>
|
2006-03-17 10:16:00 +03:00
|
|
|
|
|
|
|
<handler event="keypress" keycode="vk_up" modifiers="alt"
|
|
|
|
phase="capturing"
|
2006-02-18 03:13:50 +03:00
|
|
|
action="return this.openSearch();"/>
|
|
|
|
|
|
|
|
#ifndef XP_MACOSX
|
2006-03-17 10:16:00 +03:00
|
|
|
<handler event="keypress" keycode="vk_f4"
|
|
|
|
phase="capturing"
|
2006-02-18 03:13:50 +03:00
|
|
|
action="return this.openSearch();"/>
|
|
|
|
#endif
|
2006-02-18 03:13:12 +03:00
|
|
|
|
2006-02-18 03:13:43 +03:00
|
|
|
<handler event="dragdrop" phase="capturing">
|
|
|
|
nsDragAndDrop.drop(event, this.searchbarDNDObserver);
|
|
|
|
</handler>
|
|
|
|
|
2006-02-18 03:13:12 +03:00
|
|
|
</handlers>
|
2006-02-18 03:13:07 +03:00
|
|
|
</binding>
|
2006-03-17 10:16:00 +03:00
|
|
|
|
|
|
|
<binding id="searchbar-dropmarker"
|
|
|
|
extends="chrome://browser/content/search/search.xml#searchbar-base">
|
2006-02-18 03:13:18 +03:00
|
|
|
<content>
|
|
|
|
<xul:stack flex="1">
|
2006-03-17 10:16:00 +03:00
|
|
|
<xul:hbox align="center" class="searchbar-engine-image-container">
|
2006-02-18 03:13:43 +03:00
|
|
|
<xul:image class="searchbar-engine-image" xbl:inherits="src"/>
|
2006-02-18 03:13:18 +03:00
|
|
|
</xul:hbox>
|
2006-02-18 03:13:43 +03:00
|
|
|
<xul:image class="searchbar-dropmarker-image"/>
|
2006-02-18 03:13:18 +03:00
|
|
|
</xul:stack>
|
2006-02-18 03:13:43 +03:00
|
|
|
<children/>
|
2006-03-17 10:16:00 +03:00
|
|
|
</content>
|
2006-02-18 03:13:18 +03:00
|
|
|
</binding>
|
2006-02-18 03:13:07 +03:00
|
|
|
|
|
|
|
</bindings>
|