browser/components/downloads/content/downloadsPanel.inc.xhtml
author dadaa <daisuke.akatsuka@birchill.co.jp>
Wed, 09 Jul 2025 04:53:58 +0000 (10 hours ago)
changeset 795836 a5500d271fe3a1fefb4d81d96fc4abd00d9eade7
parent 790842 2292c4106128f5f8ad0fadfe6a6abf0f1c0955b1
permissions -rw-r--r--
Bug 1957280: Limit user's mouse amount for tree component r=places-reviewers,reusable-components-reviewers,masayuki,mstriemer Differential Revision: https://phabricator.services.mozilla.com/D251224
<!-- 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/. -->

<!-- The commands are handled by DownloadsPanel.handleEvent -->
<commandset commandupdater="true" events="richlistbox-select"
            id="downloadPanelCommands">
  <command id="downloadsCmd_doDefault" />
  <command id="downloadsCmd_pauseResume" />
  <command id="downloadsCmd_cancel" />
  <command id="downloadsCmd_unblock" />
  <command id="downloadsCmd_chooseUnblock" />
  <command id="downloadsCmd_unblockAndOpen" />
  <command id="downloadsCmd_unblockAndSave" />
  <command id="downloadsCmd_confirmBlock" />
  <command id="downloadsCmd_open" />
  <command id="downloadsCmd_open:current" />
  <command id="downloadsCmd_open:tab" />
  <command id="downloadsCmd_open:tabshifted" />
  <command id="downloadsCmd_open:window" />
  <command id="downloadsCmd_show" />
  <command id="downloadsCmd_retry" />
  <command id="downloadsCmd_openReferrer" />
  <command id="downloadsCmd_copyLocation" />
  <command id="downloadsCmd_clearList" />
  <command id="downloadsCmd_openInSystemViewer" />
  <command id="downloadsCmd_alwaysOpenInSystemViewer" />
  <command id="downloadsCmd_alwaysOpenSimilarFiles" />
  <command id="downloadsCmd_deleteFile" />
  <command id="downloadsCmd_deletePrivate"/>
  <command id="downloadsCmd_dismissDeletePrivate"/>
</commandset>

<!-- For accessibility to screen readers, we use a label on the panel instead
  of the anchor because the panel can also be displayed without an anchor. -->
<panel id="downloadsPanel"
       data-l10n-id="downloads-panel"
       class="cui-widget-panel panel-no-padding"
       role="group"
       type="arrow"
       orient="vertical"
       hidden="true">

  <linkset>
    <html:link rel="localization" href="browser/downloads.ftl" />
  </linkset>

  <!-- The following popup menu should be a child of the panel element,
       otherwise flickering may occur when the cursor is moved over the area
       of a disabled menu item that overlaps the panel.  See bug 492960. -->
  <menupopup id="downloadsContextMenu"
             class="download-state">
    <menuitem command="downloadsCmd_pauseResume"
              class="downloadPauseMenuItem"
              data-l10n-id="downloads-cmd-pause"/>
    <menuitem command="downloadsCmd_pauseResume"
              class="downloadResumeMenuItem"
              data-l10n-id="downloads-cmd-resume"/>
    <menuitem command="downloadsCmd_unblock"
              class="downloadUnblockMenuItem"
              data-l10n-id="downloads-cmd-unblock"/>
    <menuitem command="downloadsCmd_openInSystemViewer"
              class="downloadUseSystemDefaultMenuItem"
              data-l10n-id="downloads-cmd-use-system-default"/>
    <menuitem command="downloadsCmd_alwaysOpenInSystemViewer"
              type="checkbox"
              class="downloadAlwaysUseSystemDefaultMenuItem"
              data-l10n-id="downloads-cmd-always-use-system-default"/>
    <menuitem command="downloadsCmd_alwaysOpenSimilarFiles"
              type="checkbox"
              class="downloadAlwaysOpenSimilarFilesMenuItem"
              data-l10n-id="downloads-cmd-always-open-similar-files"/>
    <menuitem command="downloadsCmd_show"
              class="downloadShowMenuItem"
              data-l10n-id="downloads-cmd-show-menuitem-2"/>

    <menuseparator class="downloadCommandsSeparator"/>

    <menuitem command="downloadsCmd_openReferrer"
              class="downloadOpenReferrerMenuItem"
              data-l10n-id="downloads-cmd-go-to-download-page"/>
    <menuitem command="downloadsCmd_copyLocation"
              class="downloadCopyLocationMenuItem"
              data-l10n-id="downloads-cmd-copy-download-link"/>

    <menuseparator/>

    <menuitem command="downloadsCmd_deleteFile"
              class="downloadDeleteFileMenuItem"
              data-l10n-id="downloads-cmd-delete-file"/>
    <menuitem command="cmd_delete"
              class="downloadRemoveFromHistoryMenuItem"
              data-l10n-id="downloads-cmd-remove-from-history"/>
    <menuitem command="downloadsCmd_clearList"
              data-l10n-id="downloads-cmd-clear-list"/>
    <menuitem command="downloadsCmd_clearDownloads"
              hidden="true"
              data-l10n-id="downloads-cmd-clear-downloads"/>
  </menupopup>

  <panelmultiview id="downloadsPanel-multiView"
                  mainViewId="downloadsPanel-mainView"
                  disablekeynav="true">

    <panelview id="downloadsPanel-mainView">
      <vbox class="panel-view-body-unscrollable">
        <richlistbox id="downloadsListBox"
                     data-l10n-id="downloads-panel-items"
                     data-l10n-attrs="style"
                     context="downloadsContextMenu"/>
        <description id="emptyDownloads"
                     data-l10n-id="downloads-panel-empty"/>
      </vbox>
      <vbox id="downloadsFooter">
        <stack>
          <hbox id="downloadsSummary"
                align="center"
                orient="horizontal">
            <image class="downloadTypeIcon" />
            <vbox pack="center"
                  flex="1"
                  class="downloadContainer">
              <description id="downloadsSummaryDescription"/>
              <html:progress id="downloadsSummaryProgress"
                             class="downloadProgress"
                             max="100"/>
              <description id="downloadsSummaryDetails"
                           crop="end"/>
            </vbox>
          </hbox>
          <vbox id="downloadsFooterButtons">
            <toolbarseparator />
            <button id="downloadsHistory"
                    data-l10n-id="downloads-history"
                    class="downloadsPanelFooterButton subviewbutton panel-subview-footer-button toolbarbutton-1"
                    flex="1"
                    pack="start"/>
          </vbox>
        </stack>
      </vbox>
    </panelview>

    <panelview id="downloadsPanel-blockedSubview"
               data-l10n-id="downloads-details"
               class="PanelUI-subView">
      <vbox class="panel-view-body-unscrollable">
        <hbox class="downloadsPanel-blockedSubview-title-box">
          <description id="downloadsPanel-blockedSubview-title"/>
          <image class="downloadsPanel-blockedSubview-image"/>
        </hbox>
        <description id="downloadsPanel-blockedSubview-details1"/>
        <description id="downloadsPanel-blockedSubview-details2"/>
      </vbox>
      <html:moz-button-group id="downloadsPanel-blockedSubview-buttons"
            class="panel-footer">
        <button id="downloadsPanel-blockedSubview-unblockButton"
                class="footer-button"
                command="downloadsCmd_unblockAndOpen"/>
        <button id="downloadsPanel-blockedSubview-deleteButton"
                class="footer-button"
                default="true"/>
      </html:moz-button-group>
    </panelview>

    <panelview id="downloadsPanel-privateBrowsing"
               class="PanelUI-subview"
               data-l10n-id="downloads-private-browsing-details"
               no-panelview-transition="true"
               has-custom-header="true"
               no-back-button="true">
      <box class="panel-header panel-header-with-additional-element">
        <html:h1>
          <html:span/>
        </html:h1>
      </box>
      <vbox class="panel-view-body-unscrollable">
        <description data-l10n-id="downloads-private-browsing-message"/>
      </vbox>
      <html:moz-button-group
          class="panel-footer">
        <button class="footer-button secondary"
                command="downloadsCmd_deletePrivate"
                data-l10n-id="downloads-private-browsing-delete-button"/>
        <button class="footer-button primary"
                default="true"
                command="downloadsCmd_dismissDeletePrivate"
                data-l10n-id="downloads-private-browsing-accept-button"/>
    </html:moz-button-group>
    </panelview>
  </panelmultiview>

</panel>