<?xml version="1.0"?>
<?xml-stylesheet href="chrome://unplug/content/ui/unplug_result_skin.css" type="text/css"?>
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>

<bindings xmlns="http://www.mozilla.org/xbl" xmlns:xbl="http://www.mozilla.org/xbl" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

	
	<!--
		a result to display in searchpage.xul
		these are created as we find the search results
	-->	
	<binding id="unplug_result">




		<!--
		<handlers>
			<handler event="event-name" action="script"/>
		</handlers>
		-->


		<!-- example .doAlert("foo")
		https://developer.mozilla.org/en/XUL_Tutorial/Adding_Methods_to_XBL-defined_Elements
		on accessing annonymous nodes -->
		<implementation>
			<constructor>
				// pass
			</constructor>
			<method name="addCallbacks">
				<parameter name="callbackobj"/>
				<body>
					alert(callbackobj);
				</body>
			</method>
		</implementation>





		<content>
			<xul:vbox flex="1" style="border: 1px black solid" xbl:inherits="tooltiptext=url">
				<xul:toolbar id="test-toolbar" flex="1">
					<xul:vbox flex="1">
						<xul:label xul:class="unplug-heading" xbl:inherits="value=title" />
						<xul:label xul:class="unplug-sub-heading" xbl:inherits="value=description" />
					</xul:vbox>
					<!--
						we want these to be drop-down buttons
						ie Open / Open in a new window
						and Download / Dowload with dTa / download with XXX
						and Play / Play in vlc / Play in totem / Look for media players
					-->
					<!-- aternative is type="menu" -->
					<xul:toolbarbutton accesskey="o" label="Open" type="menu-button" oncommand="UnPlug2SearchPage.open_new_tab(document.getBindingParent(this));">
						<xul:menupopup>
							<xul:menuitem accesskey="t" label="Open in a new tab" oncommand="UnPlug2SearchPage.open_new_tab(document.getBindingParent(this)); return false;"/>
							<xul:menuitem accesskey="n" label="Open in a new window" oncommand="UnPlug2SearchPage.open_new_window(document.getBindingParent(this)); return false;"/>
							<xul:menuitem accesskey="v" label="Open in over window" oncommand="UnPlug2SearchPage.open_over_window(document.getBindingParent(this)); return false;"/>
							<xul:menuseperator />
							<xul:menuitem accesskey="c" label="Configure" class="config" disabled="true" />
						</xul:menupopup>
					</xul:toolbarbutton>
					<xul:toolbarbutton accesskey="d" label="Download" type="menu-button" oncommand="UnPlug2SearchPage.download_saveas(document.getBindingParent(this));">
						<xul:menupopup>
							<xul:menuitem accesskey="s" label="Save file" oncommand="UnPlug2SearchPage.download_saveas(document.getBindingParent(this)); return false;" />
							<xul:menuseperator />
							<xul:menuitem accesskey="c" label="Configure" class="config" disabled="true" />
						</xul:menupopup>
					</xul:toolbarbutton>
				</xul:toolbar>

			
				<!-- this is some sort of hidden drop-down box with more information -->
				<!--
				<xul:vbox>
					<xul:label xul:class="unplug-text" xbl:inherits="value=url"/>
				</xul:vbox>
				-->
			</xul:vbox>
		</content>
	</binding>

</bindings>

