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

<!DOCTYPE window [
<!ENTITY % ietabDTD SYSTEM "chrome://ietab/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://ietab/content/ietabUtils.js"/>
<script type="application/x-javascript" src="chrome://ietab/content/ietabDrag.js"/>
<script type="application/x-javascript" src="chrome://ietab/content/ietabExtApp.js"/>
<script type="application/x-javascript" src="chrome://ietab/content/ietabOverlay.js"/>

<!-- contentArea context menu -->
<popup id="contentAreaContextMenu">
   <menuitem id="ietab-viewpage" insertbefore="context-bookmarkpage"
      label="&popup.viewpage;" accesskey="&popup.viewpage.key;"
      tooltip="ietab-toolbar-tooltip"
      iconic="menuitem-iconic ietab-icon-viewpage"
      onclick="gIeTab.viewPage(event);"
      oncommand="gIeTab.viewPage(event);"/>

   <menuitem id="ietab-viewpage-extapp" insertbefore="context-bookmarkpage"
      label="&popup.viewpage.extapp;" accesskey="&popup.viewpage.extapp.key;"
      iconic="menuitem-iconic ietab-icon-viewpage-extapp"
      oncommand="gIeTab.viewPageInExtApp();"/>

   <menuseparator id="ietab-viewpage-sep" insertbefore="context-bookmarkpage"/>

   <menuitem id="ietab-viewlink-extapp" insertafter="context-openlinkintab"
      label="&popup.viewlink.extapp;" accesskey="&popup.viewlink.extapp.key;"
      iconic="menuitem-iconic ietab-icon-viewlink-extapp"
      oncommand="gIeTab.viewLinkInExtApp();"/>

   <menuitem id="ietab-viewlink" insertafter="context-openlinkintab"
      label="&popup.viewlink;" accesskey="&popup.viewlink.key;"
      iconic="menuitem-iconic ietab-icon-viewlink"
      onclick="gIeTab.viewLink(event);"
      oncommand="gIeTab.viewLink(event);"/>
</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>
   </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"
         onclick="gIeTab.viewPage(event);"
         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="menu_ToolsPopup">
   <menuitem id="ietab-toolsmenu" hidden="true"
      label="&toolsmenu.label;" insertbefore="prefSep"
      iconic="menuitem-iconic ietab-icon-toolsmenu"
      oncommand="gIeTab.openPrefDialog();"/>
</menupopup>

</overlay>
