Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | <?xml version="1.0"?> |
michael@0 | 2 | |
michael@0 | 3 | # This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | # License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
michael@0 | 6 | |
michael@0 | 7 | <?xml-stylesheet href="chrome://browser/content/downloads/allDownloadsViewOverlay.css"?> |
michael@0 | 8 | <?xml-stylesheet href="chrome://browser/skin/downloads/allDownloadsViewOverlay.css"?> |
michael@0 | 9 | |
michael@0 | 10 | <!DOCTYPE overlay [ |
michael@0 | 11 | <!ENTITY % downloadsDTD SYSTEM "chrome://browser/locale/downloads/downloads.dtd"> |
michael@0 | 12 | %downloadsDTD; |
michael@0 | 13 | ]> |
michael@0 | 14 | |
michael@0 | 15 | <!-- This overlay provides a downloads view that lists both session downloads, |
michael@0 | 16 | using the DownloadsView API, and history downloads, using places queries. |
michael@0 | 17 | The view also implements a command controller and a context menu for |
michael@0 | 18 | managing the downloads list. In order to use this view: |
michael@0 | 19 | 1. Apply this overlay to your window. |
michael@0 | 20 | 2. Insert in all the overlay entry-points, namely: |
michael@0 | 21 | <richlistbox id="downloadsRichListBox"/> |
michael@0 | 22 | <commandset id="downloadCommands"/> |
michael@0 | 23 | <menupopup id="downloadsContextMenu"/> |
michael@0 | 24 | 3. Make sure your window has the editMenuOverlay overlay applied, |
michael@0 | 25 | because the view implements cmd_copy and cmd_delete. |
michael@0 | 26 | 4. Make sure your window has the globalOverlay.js script loaded. |
michael@0 | 27 | 5. To initialize the view |
michael@0 | 28 | let view = new DownloadsPlacesView(document.getElementById("downloadsRichListBox")); |
michael@0 | 29 | // This is what the Places Library uses. It could be tweaked a bit as long as the |
michael@0 | 30 | // transition-type is set correctly |
michael@0 | 31 | view.place = "place:transition=7&sort=4"; |
michael@0 | 32 | --> |
michael@0 | 33 | <overlay id="downloadsViewOverlay" |
michael@0 | 34 | xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
michael@0 | 35 | xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> |
michael@0 | 36 | |
michael@0 | 37 | <script type="application/javascript" |
michael@0 | 38 | src="chrome://browser/content/downloads/allDownloadsViewOverlay.js"/> |
michael@0 | 39 | <script type="application/javascript" |
michael@0 | 40 | src="chrome://global/content/contentAreaUtils.js"/> |
michael@0 | 41 | |
michael@0 | 42 | <richlistbox flex="1" |
michael@0 | 43 | seltype="multiple" |
michael@0 | 44 | id="downloadsRichListBox" context="downloadsContextMenu" |
michael@0 | 45 | onscroll="return this._placesView.onScroll();" |
michael@0 | 46 | onkeypress="return this._placesView.onKeyPress(event);" |
michael@0 | 47 | ondblclick="return this._placesView.onDoubleClick(event);" |
michael@0 | 48 | oncontextmenu="return this._placesView.onContextMenu(event);" |
michael@0 | 49 | ondragstart="this._placesView.onDragStart(event);" |
michael@0 | 50 | ondragover="this._placesView.onDragOver(event);" |
michael@0 | 51 | ondrop="this._placesView.onDrop(event);" |
michael@0 | 52 | onfocus="goUpdateDownloadCommands();" |
michael@0 | 53 | onselect="this._placesView.onSelect();" |
michael@0 | 54 | onblur="goUpdateDownloadCommands();"/> |
michael@0 | 55 | |
michael@0 | 56 | <commandset id="downloadCommands" |
michael@0 | 57 | commandupdater="true" |
michael@0 | 58 | events="focus,select,contextmenu" |
michael@0 | 59 | oncommandupdate="goUpdateDownloadCommands();"> |
michael@0 | 60 | <command id="downloadsCmd_pauseResume" |
michael@0 | 61 | oncommand="goDoCommand('downloadsCmd_pauseResume')"/> |
michael@0 | 62 | <command id="downloadsCmd_cancel" |
michael@0 | 63 | oncommand="goDoCommand('downloadsCmd_cancel')"/> |
michael@0 | 64 | <command id="downloadsCmd_open" |
michael@0 | 65 | oncommand="goDoCommand('downloadsCmd_open')"/> |
michael@0 | 66 | <command id="downloadsCmd_show" |
michael@0 | 67 | oncommand="goDoCommand('downloadsCmd_show')"/> |
michael@0 | 68 | <command id="downloadsCmd_retry" |
michael@0 | 69 | oncommand="goDoCommand('downloadsCmd_retry')"/> |
michael@0 | 70 | <command id="downloadsCmd_openReferrer" |
michael@0 | 71 | oncommand="goDoCommand('downloadsCmd_openReferrer')"/> |
michael@0 | 72 | <command id="downloadsCmd_clearDownloads" |
michael@0 | 73 | oncommand="goDoCommand('downloadsCmd_clearDownloads')"/> |
michael@0 | 74 | </commandset> |
michael@0 | 75 | |
michael@0 | 76 | <menupopup id="downloadsContextMenu" class="download-state"> |
michael@0 | 77 | <menuitem command="downloadsCmd_pauseResume" |
michael@0 | 78 | class="downloadPauseMenuItem" |
michael@0 | 79 | label="&cmd.pause.label;" |
michael@0 | 80 | accesskey="&cmd.pause.accesskey;"/> |
michael@0 | 81 | <menuitem command="downloadsCmd_pauseResume" |
michael@0 | 82 | class="downloadResumeMenuItem" |
michael@0 | 83 | label="&cmd.resume.label;" |
michael@0 | 84 | accesskey="&cmd.resume.accesskey;"/> |
michael@0 | 85 | <menuitem command="downloadsCmd_cancel" |
michael@0 | 86 | class="downloadCancelMenuItem" |
michael@0 | 87 | label="&cmd.cancel.label;" |
michael@0 | 88 | accesskey="&cmd.cancel.accesskey;"/> |
michael@0 | 89 | <menuitem command="cmd_delete" |
michael@0 | 90 | class="downloadRemoveFromHistoryMenuItem" |
michael@0 | 91 | label="&cmd.removeFromHistory.label;" |
michael@0 | 92 | accesskey="&cmd.removeFromHistory.accesskey;"/> |
michael@0 | 93 | <menuitem command="downloadsCmd_show" |
michael@0 | 94 | class="downloadShowMenuItem" |
michael@0 | 95 | #ifdef XP_MACOSX |
michael@0 | 96 | label="&cmd.showMac.label;" |
michael@0 | 97 | accesskey="&cmd.showMac.accesskey;" |
michael@0 | 98 | #else |
michael@0 | 99 | label="&cmd.show.label;" |
michael@0 | 100 | accesskey="&cmd.show.accesskey;" |
michael@0 | 101 | #endif |
michael@0 | 102 | /> |
michael@0 | 103 | |
michael@0 | 104 | <menuseparator class="downloadCommandsSeparator"/> |
michael@0 | 105 | |
michael@0 | 106 | <menuitem command="downloadsCmd_openReferrer" |
michael@0 | 107 | label="&cmd.goToDownloadPage.label;" |
michael@0 | 108 | accesskey="&cmd.goToDownloadPage.accesskey;"/> |
michael@0 | 109 | <menuitem command="cmd_copy" |
michael@0 | 110 | label="&cmd.copyDownloadLink.label;" |
michael@0 | 111 | accesskey="&cmd.copyDownloadLink.accesskey;"/> |
michael@0 | 112 | |
michael@0 | 113 | <menuseparator/> |
michael@0 | 114 | |
michael@0 | 115 | <menuitem command="downloadsCmd_clearDownloads" |
michael@0 | 116 | label="&cmd.clearDownloads.label;" |
michael@0 | 117 | accesskey="&cmd.clearDownloads.accesskey;"/> |
michael@0 | 118 | </menupopup> |
michael@0 | 119 | </overlay> |