<?xml version="1.0"?>

<!--

 Copyright 2005-2010 Xmarks Inc.
 
 foxmarks-overlay.xul: implements Foxmarks overlay into Firefox.
 
-->

<?xul-overlay href="chrome://foxmarks/content/foxmarks-statusbar.xul" ?>
<!DOCTYPE dialog SYSTEM "chrome://foxmarks/locale/foxmarks.dtd">

<overlay id="foxmarksBookmarksOverlay"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
      
    <script src="foxmarks-settings.js" />
    <script src="foxmarks-overlay.js" />
    <script src="newuser.js" />

<!--
    <script src="foxmarks-update.js" />
    <script src="foxmarks-clobber.js" />
    <script src="foxmarks-places.js" />
    <script src="foxmarks-nodes.js" />
    <script src="foxmarks-command.js" />
    <script src="foxmarks-core.js" />
    <script src="foxmarks-network.js" />
    <script src="foxmarks-json.js" />
    <script src="shared/CreateAESManager.js" />
    <script src="shared/Base64.js" />
    <script src="foxmarks-utils.js" />
    <script src="foxmarks-uitools.js" />
    <script src="foxmarks-password.js" />
    <script src="foxmarks-bookmark.js" />
    <script src="foxmarks-server.js" />
    <script src="foxmarks-test.js" />
-->
    <menupopup id="menu_ToolsPopup">
        <menu id="foxmarks-menuitem" label="Xmarks" class="menu-iconic"
            accesskey="&menu.accesskey.foxmarks;" 
            insertafter="devToolsSeparator">
            <menupopup id="foxmarks-menupopup" 
                onpopupshowing="return Xmarks.OnPopupShowing()">

<!--
                <menuitem label="Test "
                     oncommand="TestSync()" 
                    />
-->
                <menuitem label="&dialog.label.syncNow;   "
                    accesskey="&menu.accesskey.syncnow;" 
                    oncommand="Xmarks.Synch()" 
                    key="XmarksSyncNow" />
                <menuitem label="&menu.myFoxmarks;   "
                    accesskey="&menu.accesskey.myfoxmarks;" 
                    oncommand="Xmarks.MyFoxmarks()" />
                <menuitem label="&menu.settings;   "
                    accesskey="&menu.accesskey.settings;" 
                    oncommand="Xmarks.OpenFoxmarksSettingsDialog()" 
                    key="OpenFoxmarksDialog" />
                <menuitem label="&menu.opentabs;    "
                    accesskey="&menu.accesskey.opentabs;"
                    oncommand="Xmarks.OpenTabsPanel()" 
                    key="XmarksOpenTabs" />
                <menuseparator />
                <menuitem label="&menu.showstatus;" 
                    id="foxmarks-showstatusicon" 
                    accesskey="&menu.accesskey.icon;"
                    type="checkbox" oncommand="Xmarks.ToggleIcon()" />
            </menupopup>
        </menu>
    </menupopup>
    
    <keyset id="mainKeyset">
        <key id="XmarksSyncNow" modifiers="accel,shift" key="s" 
            oncommand="Xmarks.Synch();" />
        <key id="OpenFoxmarksDialog" modifiers="accel,shift" key="o" 
            oncommand="Xmarks.OpenFoxmarksSettingsDialog();" /> 
        <key id="FoxmarksSimSiteKey" modifiers="accel,shift" key="m" 
            oncommand="Xmarks.SimSites.showSimSites();" /> 
        <key id="XmarksOpenTabs" modifiers="accel shift" key="y"
            oncommand="Xmarks.OpenTabsPanel()" />
    </keyset>   

    <statusbar id="status-bar">
        <statusbarpanel id="foxmarks-statusbarpanel" /> 
    </statusbar>

    <toolbarpalette id="BrowserToolbarPalette">
        <toolbarbutton 
           id="foxmarks-toolbar-syncnow" 
            class="toolbarbutton-1"
            label="&dialog.label.syncNow;" 
            image="chrome://foxmarks/skin/images/foxmarks_sync_toolbutton.png" 
            oncommand="Xmarks.Synch();"
        />
        <toolbarbutton 
           id="foxmarks-toolbar-my" 
            class="toolbarbutton-1"
            label="&menu.myFoxmarks;" 
            image="chrome://foxmarks/skin/images/foxmarks_my_toolbutton.png" 
            oncommand="Xmarks.MyFoxmarks();"
        />
        <toolbarbutton 
           id="foxmarks-toolbar-settings" 
            class="toolbarbutton-1"
            label="&dialog.label.syncNow;" 
            image="chrome://foxmarks/skin/images/foxmarks_settings_toolbutton.png" 
            oncommand="Xmarks.OpenFoxmarksSettingsDialog();"
        />
        <toolbarbutton 
           id="foxmarks-toolbar-similarsite" 
            class="toolbarbutton-1"
            label="&similarsite.getsiteinfo.normalcase;" 
            image="chrome://foxmarks/skin/images/foxmarks_similarsites_toolbutton.png" 
            oncommand="Xmarks.SimSites.showSimSites();"
        />
    </toolbarpalette>

    <popupset id="mainPopupSet">
        <panel id="foxmarks-similarsites"  position="after_end" 
            onpopuphiding="return Xmarks.SimSites.onPopupHiding();">
            <vbox flex="1" minwidth="300">
                <hbox id="foxmarks-ss-progress" flex="1">
                    <label id="foxmarks-ss-progtitle" hidden="true"
                        style="padding: 8px; font-size: 14px; font-weight: bold;" />
                    <image 
                        src="chrome://foxmarks/skin/images/Throbber-small.gif" 
                        id="foxmarks-ss-throbber" hidden="true" height="16"
                        width="16"
                    />
                </hbox>
                    <vbox id="foxmarks-ss-body" hidden="true" flex="1"
                            style="background: white; opacity: 1.0;" >
                    <iframe id="foxmarks-bib" />
                </vbox>
            </vbox>
        </panel>
        <panel id="foxmarks-newuserwiz" position="before_end" 
            noautohide="true"
            onpopuphiding="return Xmarks.NewUserPopupHiding();"
            style="padding: 12px; background-color: transparent; opacity: 1.0; width: 312px; -moz-appearance: none; margin: 0px; padding: 0px; border: none;" >
            <vbox onclick="Xmarks.ClickNewUserPopup();" id="foxmarks-bubblebox" style="background: transparent url('chrome://foxmarks/skin/images/bubble_bkg.png') no-repeat; height: 111px; padding: 0; margin: 0;">
                <vbox style="width:150px" id="foxmarks-bubblecontainer">
                    <hbox id="foxmarks-bubbletextbox" style="margin: 12px 12px 4px 84px; width: 170px; padding: 0;" >
                        <label id="foxmarks-bubbletitle" value="&label.newuser.title2;" style="padding: 0; margin: 0; font-size: 12px; font-weight: bold;"/>
                        <image id='foxmarks-bubbletr' />
                        <spacer flex="1" />
                        <vbox onclick="Xmarks.CloseNewUserPopup();">
                            <image 
                            src="chrome://foxmarks/skin/images/bubble_close.png" 
                                id="foxmarks-bubbleclose" 
                                style="margin-right: 16px; cursor: pointer; height: 12px; width: 12px;"
                            />
                            <spacer flex="1" />
                        </vbox>
                    </hbox>
                </vbox>
                <description id="foxmarks-bubbledesc" style="margin: 0px 12px 4px 84px; font-size: 12px;">
                    &label.newuser.msg2; 
                 </description>
            </vbox>
        </panel>
    </popupset>
</overlay>
