mail/components/im/content/imAccounts.xul
author Misak Khachatryan <misak.bugzilla@gmail.com>
Tue, 10 Dec 2013 11:18:27 +0400
changeset 16983 63baf8270c1cb8b380784b61c43905c688e051d6
parent 13210 4b4b1339d84e8062ced217f7b48525ec176ce13a
child 17243 75e8768c941d7c8078c9483f37ed8dea47fbe0ef
permissions -rw-r--r--
Bug 948293 - Build bustage after bug 713082. r+a=Neil CLOSED TREE

<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->

<?xml-stylesheet href="chrome://messenger/content/chat/imAccounts.css" type="text/css"?>
<?xml-stylesheet href="chrome://messenger/skin/imRichlistbox.css" type="text/css"?>
<?xml-stylesheet href="chrome://messenger/skin/imAccounts.css" type="text/css"?>
<?xml-stylesheet href="chrome://messenger/skin/chat.css" type="text/css"?>

<!DOCTYPE window [
 <!ENTITY % accountsDTD SYSTEM "chrome://messenger/locale/imAccounts.dtd">
 <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
 <!ENTITY % chatDTD SYSTEM "chrome://messenger/locale/chat.dtd">
 %accountsDTD;
 %brandDTD;
 %chatDTD;
]>

<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        id="accountManager"
        windowtype="Messenger:Accounts"
        onload="gAccountManager.load()"
        title="&accountsWindow.title;"
        style="&accountsWindow2.style;"
        persist="width height screenX screenY">
 <script type="application/javascript" src="chrome://messenger/content/chat/imAccounts.js"/>
 <script type="application/javascript" src="chrome://messenger/content/chat/imStatusSelector.js"/>
 <script type="application/javascript" src="chrome://global/content/nsDragAndDrop.js" />
 <script type="application/javascript" src="chrome://global/content/nsTransferable.js" />

 <stringbundle id="accountsBundle" src="chrome://messenger/locale/imAccounts.properties"/>
 <stringbundle id="chatBundle" src="chrome://messenger/locale/chat.properties"/>

 <commandset id="accountsCommands">
   <command id="cmd_connect"
            accesskey="&account.connect.accesskey;"
            label="&account.connect.label;"
            oncommand="gAccountManager.connect()"/>
   <command id="cmd_disconnect"
            label="&account.disconnect.label;"
            accesskey="&account.disconnect.accesskey;"
            oncommand="gAccountManager.disconnect()"/>
   <command id="cmd_cancelReconnection"
            label="&account.cancelReconnection.label;"
            accesskey="&account.cancelReconnection.accesskey;"
            oncommand="gAccountManager.cancelReconnection()"/>
   <command id="cmd_moveup"
            label="&account.moveup.label;"
            oncommand="gAccountManager.moveCurrentItem(-1)"/>
   <command id="cmd_movedown"
            label="&account.movedown.label;"
            oncommand="gAccountManager.moveCurrentItem(1)"/>
   <command id="cmd_edit"
            label="&account.edit.label;"
            accesskey="&account.edit.accesskey;"
            oncommand="gAccountManager.edit()"/>
   <command id="cmd_new"
            label="&accountManager.newAccount.label;"
            accesskey="&accountManager.newAccount.accesskey;"
            oncommand="gAccountManager.new()"/>
   <command id="cmd_close"
            label="&accountManager.close.label;"
            accesskey="&accountManager.close.accesskey;"
            oncommand="gAccountManager.close()"/>
 </commandset>

 <keyset id="accountsKeys">
   <key id="key_close1" key="w" modifiers="accel" command="cmd_close"/>
   <key id="key_close2" keycode="VK_ESCAPE" command="cmd_close"/>
   <key id="key_close3" command="cmd_close"
        key="&accountManager.close.commandkey;" modifiers="accel,shift"/>
 </keyset>

 <broadcasterset>
   <broadcaster id="contextAccountsItems"/>
 </broadcasterset>

 <menupopup id="accountsContextMenu"
            onpopupshowing="gAccountManager.onContextMenuShowing()">
   <menuitem id="context_connect"
             command="cmd_connect"
             observes="contextAccountsItems"/>
   <menuitem id="context_disconnect"
             command="cmd_disconnect"
             observes="contextAccountsItems"/>
   <menuitem id="context_cancelReconnection"
             command="cmd_cancelReconnection"
             observes="contextAccountsItems"/>
   <menuseparator id="context_accountsItemsSeparator"
                  observes="contextAccountsItems"/>
   <menuitem command="cmd_new"/>
   <menuseparator observes="contextAccountsItems"/>
   <menuitem command="cmd_moveup" observes="contextAccountsItems"/>
   <menuitem command="cmd_movedown" observes="contextAccountsItems"/>
   <menuseparator observes="contextAccountsItems"/>
   <menuitem command="cmd_edit" observes="contextAccountsItems"/>
 </menupopup>

 <toolbox id="mainToolbox">
   <toolbar id="statusArea">
     <stack id="statusImageStack">
       <image id="userIcon" onclick="statusSelector.userIconClick();"/>
       <button type="menu" id="statusTypeIcon" status="available">
         <menupopup id="setStatusTypeMenupopup"
                    oncommand="statusSelector.editStatus(event);">
           <menuitem id="statusTypeAvailable" label="&status.available;"
                     status="available" class="menuitem-iconic"/>
           <menuitem id="statusTypeUnavailable" label="&status.unavailable;"
                     status="unavailable" class="menuitem-iconic"/>
           <menuseparator id="statusTypeOfflineSeparator"/>
           <menuitem id="statusTypeOffline" label="&status.offline;"
                     status="offline" class="menuitem-iconic"/>
         </menupopup>
       </button>
     </stack>
     <stack id="displayNameAndstatusMessageStack" flex="1">
       <vbox flex="1" pack="center">
         <label id="displayName" onclick="statusSelector.displayNameClick();"/>
       </vbox>
       <label id="statusMessage" crop="end" value=""
              onclick="statusSelector.statusMessageClick();"/>
     </stack>
   </toolbar>
 </toolbox>

 <deck flex="1" id="accountsDesk" ondblclick="gAccountManager.new();">
   <vbox flex="1" id="noAccountScreen" align="center" pack="center">
     <hbox id="noAccountBox" align="top">
       <image id="noAccountImage"/>
       <vbox id="noAccountInnerBox" flex="1">
         <label id="noAccountTitle" value="&accountManager.noAccount.title;"/>
         <description id="noAccountDesc">&accountManager.noAccount.description;</description>
       </vbox>
     </hbox>
   </vbox>
   <notificationbox id="accountsNotificationBox" flex="1">
     <richlistbox id="accountlist" flex="1" context="accountsContextMenu"
                  onselect="gAccountManager.onAccountSelect();"
                  ondragstart="nsDragAndDrop.startDrag(event, gAMDragAndDrop);"
                  ondragover="nsDragAndDrop.dragOver(event, gAMDragAndDrop);"
                  ondragend="gAMDragAndDrop.cleanBorders(true);"
                  ondragdrop="nsDragAndDrop.drop(event, gAMDragAndDrop);"/>
   </notificationbox>
 </deck>
 <windowdragbox id="bottombuttons" align="center">
  <button id="newaccount" command="cmd_new"/>
  <spacer flex="1"/>
  <button id="close" command="cmd_close"/>
 </windowdragbox>
</window>