<?xml version="1.0"?>
<!-- See license.txt for terms of usage -->

<?xul-overlay href="chrome://firebug/content/firebugOverlay.xul"?>

<?xml-stylesheet href="chrome://global/skin/global.css"?>
<?xml-stylesheet href="../firebug.css"?>
<?xml-stylesheet href="chrome://firebug/skin/window.css"?>
<?xml-stylesheet href="chrome://browser/skin/browser.css"?>

<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        id="firebug"
        title="Firebug"
        width="800" height="600"
        persist="screenX,screenY,width,height,sizemode">

    <script type="application/x-javascript" src="chrome://firebug/content/trace.js"/>
    <script type="application/x-javascript" src="chrome://firebug/content/legacy.js"/>
    <script type="application/x-javascript">
        window.Firebug = top.Firebug;
        window.goDoCommand = function(aCommand) {
            try
            {
                var controller = document.commandDispatcher.getControllerForCommand(aCommand);
                if (controller &amp;&amp; controller.isCommandEnabled(aCommand))
                    controller.doCommand(aCommand);
            }
            catch (e)
            {
                Components.utils.reportError("An error occurred executing the " + aCommand + ": " + e);
            }
        };
    </script>
    <script type="application/x-javascript" src="chrome://firebug/content/firefox/panelBarWaiter.js"/>

    <script type="application/x-javascript" src="resource://firebug/mini-require.js"/>
    <script type="application/x-javascript" src="resource://firebug/require-debug.js"/>
    <script type="application/x-javascript" src="chrome://firebug/content/main.js"/>

    <stringbundleset id="stringbundleset"/>
    <commandset id="baseMenuCommandSet"/>
    <keyset id="baseMenuKeyset"/>

    <commandset id="mainCommandSet">
        <command id="cmd_undo" oncommand="goDoCommand('cmd_undo')"/>
        <command id="cmd_redo" oncommand="goDoCommand('cmd_redo')"/>
        <command id="cmd_cut" oncommand="goDoCommand('cmd_cut')"/>
        <command id="cmd_copy" oncommand="goDoCommand('cmd_copy')"/>
        <command id="cmd_paste" oncommand="goDoCommand('cmd_paste')"/>
        <command id="cmd_delete" oncommand="goDoCommand('cmd_delete')"/>
        <command id="cmd_selectAll" oncommand="goDoCommand('cmd_selectAll')"/>
        <command id="cmd_reload" oncommand="Firebug.chrome.reload()"/>
        <command id="cmd_firebug_reloadSkipCache" oncommand="Firebug.chrome.reload(true)"/>
        <command id="cmd_firebug_toggleOrient" oncommand="Firebug.chrome.toggleOrient()"/>
    </commandset>

    <keyset id="mainKeyset"/>

    <broadcasterset id="mainBroadcasterSet"/>

    <popupset id="mainPopupSet"/>

    <!-- Entire Firebug UI -->
    <vbox id="fbContentBox" flex="1">
    </vbox>

    <!-- If Firebug is displayed in this external window, but not active for currently selected
         Firefox tab, the following button allows to resume it. -->
    <vbox id="fbResumeBox" flex="1" collapsed="true">
        <hbox id="fbWindowButtons" role="toolbar" class="innerToolbar" aria-label="a11y.labels.firebug window">
            <spacer flex="1"/>
            <!-- Allow to minimize/attach Firebug if deactivated -->
            <toolbarbutton id="fbMinimizeButton" class="toolbarbutton-iconic fbInternational"
                tooltiptext="Minimize Firebug" command="cmd_firebug_minimizeFirebug"/>
        </hbox>
        <hbox flex="1" pack="center" align="center">
            <button id="fbResumeBoxButton"
                label="label.Activate Firebug for the current website"
                command="cmd_firebug_toggleSuspendFirebug" class="fbInternational"/>
        </hbox>
    </vbox>

</window>
