<?xml version="1.0"?>
<?xml-stylesheet href="chrome://coralietab/skin/ietab.css" type="text/css"?>

<!DOCTYPE window [
<!ENTITY % ietabDTD SYSTEM "chrome://coralietab/locale/ietab.dtd" >
%ietabDTD;
]>

<overlay id="ietabOverlay"
   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

<script type="application/x-javascript">
<![CDATA[function IeTab() {}]]>
</script>

<script type="application/x-javascript" src="chrome://coralietab/content/ietabUtils.js"/>
<script type="application/x-javascript" src="chrome://coralietab/content/ietabDrag.js"/>
<script type="application/x-javascript" src="chrome://coralietab/content/ietabExtApp.js"/>
<script type="application/x-javascript" src="chrome://coralietab/content/seamonkeyOverlay.js"/>

<!-- contentArea context menu -->
<popup id="contentAreaContextMenu">
	<menu id="ietab-viewpage" insertbefore="context-bookmarkpage" label="&popup.viewpage;">
		<menupopup id="ietab-viewpage-menu" />
	</menu>
	<menuseparator id="ietab-viewpage-sep" insertbefore="context-bookmarkpage"/>

	<menu id="ietab-viewlink" insertafter="context-openlinkintab" label="&popup.viewlink;">
		<menupopup id="ietab-viewlink-menu" />
	</menu>
</popup>

<!-- statusbar -->
<statusbar id="status-bar">
   <deck id="ietab-status-deck" persist="insertbefore insertafter"
          ondraggesture="nsDragAndDrop.startDrag(event,ietab_statObserver);">
   <statusbarpanel id="ietab-status" hidden="true"
         tooltip="ietab-toolbar-tooltip"
         onclick="gIeTab.clickButton(event);">
      <image id="ietab-status-image" engine="fx"/>
   </statusbarpanel>
   <!-- Context menu -->
	<menupopup id="menu_context" onpopupshowing="gIeTab.statusbarContextMenuPopup();">
		<menuitem id="menu_switchEngine" label="&context.switchEngine;" accesskey="&popup.viewpage.key;" iconic="menuitem-iconic ietab-icon-toolsmenu" oncommand="gIeTab.viewPage(event, 0x0003);"/>
		<menuitem id="menu_switchEngine_NoCookie" label="&context.switchEngineNoCookie;" oncommand="gIeTab.viewPage(event, 0x4000);"/>
		<menuitem id="menu_switchEngine_SafeMode" label="&context.switchEngineSafe;" oncommand="gIeTab.viewPage(event, 0x4001);"/>
		<menuitem id="ietab-viewpage-extapp" label="&popup.viewpage.extapp;" accesskey="&popup.viewpage.extapp.key;" iconic="menuitem-iconic ietab-icon-viewpage-extapp" oncommand="gIeTab.viewPageInExtApp();"/>
		<menuseparator/>
		<menuitem id="menu_filters" label="&filter.label;..." oncommand="gIeTab.openFilterEditor();"/>
		<menuitem id="menu_settings" label="&context.settings;" oncommand="gIeTab.openPrefDialog();"/>
	</menupopup>
   </deck>
</statusbar>

<!-- bookmark context menu -->
<popup id="placesContext">
   <menuitem id="ietab-bookmark"
      label="&popup.bookmark;" accesskey="&popup.bookmark.key;"
      insertbefore="placesContext_openSeparator"
      iconic="menuitem-iconic ietab-icon-bookmark"/>
   <menuitem id="ietab-bookmark-extapp"
      label="&popup.bookmark.extapp;" accesskey="&popup.bookmark.extapp.key;"
      insertbefore="placesContext_openSeparator"
      iconic="menuitem-iconic ietab-icon-bookmark-extapp"/>
</popup>

<window id="main-window">
   <!-- tabbar context menu -->
   <popup id="ietabTabbarContextMenu">
      <menuseparator id="ietab-tabbar-sep"/>
      <menuitem id="ietab-tabbar-switch"
         label="&popup.tabbar.switch;" accesskey="&popup.tabbar.switch.key;"
         tooltip="ietab-toolbar-tooltip"
         iconic="menuitem-iconic ietab-icon-tabbar-switch" engine="fx"
         oncommand="gIeTab.viewPage(event);"/>
      <menuitem id="ietab-tabbar-extapp"
         label="&popup.tabbar.extapp;" accesskey="&popup.tabbar.extapp.key;"
         iconic="menuitem-iconic ietab-icon-tabbar-extapp"
         oncommand="gIeTab.viewPageInExtApp(gBrowser.mContextTab);"/>
   </popup>

   <!-- tooltips -->
	<tooltip id="ietab-toolbar-tooltip" noautohide="true" orient="vertical" position="before_start" style="padding:2px;">
		<vbox>
			<label value="&toolbar.button.tooltip0;" style="margin:2px;"/>
			<label value="&toolbar.button.tooltip1;" style="margin:2px;"/>
			<label value="&toolbar.button.tooltip2;" style="margin:2px;"/>
		</vbox>
	</tooltip>
</window>

<!-- firefox toolbar -->
<toolbarpalette id="BrowserToolbarPalette">
   <toolbarbutton id="ietab-button" engine="fx"
      class="toolbarbutton-1"
      label="&toolbar.button.label;"
      tooltip="ietab-toolbar-tooltip"
      onclick="gIeTab.clickButton(event);"/>
</toolbarpalette>

<!-- firefox toolsmenu -->
<menupopup id="taskPopup">
   <menuitem id="ietab-toolsmenu" hidden="true"
      label="&toolsmenu.label;" insertbefore="prefSep"
      iconic="menuitem-iconic ietab-icon-toolsmenu"
      oncommand="gIeTab.openPrefDialog();"/>
</menupopup>

</overlay>
