<?xml version="1.0"?>

<!-- This Source Code is subject to the terms of the Mozilla Public License
	 - version 2.0 (the "License"). You can obtain a copy of the License at
	 - http://mozilla.org/MPL/2.0/. -->

<?xul-overlay href="chrome://adblockplus/content/ui/overlayGeneral.xul"?>

<overlay id="abp-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
	<!-- Window extensions -->
	<window id="main-window">
		<popupset id="abp-popupset"/>
		<keyset id="abp-keyset"/>
		<commandset id="abp-commandset"/>
		<box id="abp-hooks"
			getBrowser="return this.window.gBrowser;"
			addTab="
				if (arguments[1] &amp;&amp; 'openNewTabWith' in this.window)
					this.window.openNewTabWith(arguments[0], this.window.content.document, null, arguments[1], false);
				else
					this.window.gBrowser.loadOneTab(arguments[0], null, null, null, false);"
			getContextMenu="return this.E('contentAreaContextMenu');"
			getToolbox="return this.E('navigator-toolbox')"
			getDefaultToolbar="return this.E('addon-bar') || this.E('nav-bar');"
			toolbarInsertBefore="return this.E('addonbar-closebutton');"
			hasAddonBar="return this.E('addon-bar')"/>
	</window>

	<!-- Songbird window -->
	<sb-support id="mainSupportSet">
		<popupset id="abp-popupset"/>
		<keyset id="abp-keyset"/>
		<commandset id="abp-commandset"/>
		<box id="abp-hooks"
			getBrowser="return this.window.gBrowser;"
			addTab="this.window.gBrowser.loadOneTab(arguments[0], null, null, null, false);"
			getContextMenu="return this.E('contentAreaContextMenu');"
			getToolbox="return this.E('navigator-toolbox')"
			getDefaultToolbar="return this.E('nav-bar');"/>
	</sb-support>

	<!-- Status bar -->
	<statusbar id="status-bar">
		<statusbarpanel id="abp-status" mousethrough="never" insertbefore="resizerBottomRight"/>
	</statusbar> 

	<!-- Toolbar -->
	<toolbarpalette id="BrowserToolbarPalette">
		<toolbarbutton id="abp-toolbarbutton" type="menu-button" insertbefore="print-button"
				class="toolbarbutton-1"/>
	</toolbarpalette>

	<!-- Tools menu -->
	<menupopup id="menu_ToolsPopup">
		<menu id="abp-menuitem"/>
	</menupopup>

	<!-- Context menu -->
	<menupopup id="contentAreaContextMenu">
		<menuitem id="abp-image-menuitem"/>
		<menuitem id="abp-object-menuitem"/>
		<menuitem id="abp-media-menuitem"/>
		<menuitem id="abp-frame-menuitem"/>
		<menuitem id="abp-removeWhitelist-menuitem"/>
	</menupopup>

	<!-- Fake sidebar -->
	<statuspanel id="statusbar-display" fixed="true"/>  <!-- Make sure not to resize this element -->
	<vbox id="appcontent">
		<splitter id="abp-sidebar-splitter"/>
		<vbox id="abp-sidebar"/>
	</vbox>
</overlay>
