toolkit/mozapps/downloads/content/downloads.xul

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

michael@0 1 <?xml version="1.0"?>
michael@0 2
michael@0 3 # -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
michael@0 4 # This Source Code Form is subject to the terms of the Mozilla Public
michael@0 5 # License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 6 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
michael@0 7
michael@0 8 #ifdef XP_UNIX
michael@0 9 #ifndef XP_MACOSX
michael@0 10 #define XP_GNOME 1
michael@0 11 #endif
michael@0 12 #endif
michael@0 13
michael@0 14 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
michael@0 15 <?xml-stylesheet href="chrome://mozapps/content/downloads/downloads.css"?>
michael@0 16 <?xml-stylesheet href="chrome://mozapps/skin/downloads/downloads.css"?>
michael@0 17
michael@0 18 <!DOCTYPE window [
michael@0 19 <!ENTITY % downloadManagerDTD SYSTEM "chrome://mozapps/locale/downloads/downloads.dtd">
michael@0 20 %downloadManagerDTD;
michael@0 21 <!ENTITY % editMenuOverlayDTD SYSTEM "chrome://global/locale/editMenuOverlay.dtd">
michael@0 22 %editMenuOverlayDTD;
michael@0 23 ]>
michael@0 24
michael@0 25 <window xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
michael@0 26 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
michael@0 27 id="downloadManager" windowtype="Download:Manager"
michael@0 28 orient="vertical" title="&downloads.title;"
michael@0 29 width="&window.width2;" height="&window.height;" screenX="10" screenY="10"
michael@0 30 persist="width height screenX screenY sizemode"
michael@0 31 onload="Startup();" onunload="Shutdown();"
michael@0 32 onclose="return closeWindow(false);">
michael@0 33
michael@0 34 <script type="application/javascript" src="chrome://mozapps/content/downloads/downloads.js"/>
michael@0 35 <script type="application/javascript" src="chrome://mozapps/content/downloads/DownloadProgressListener.js"/>
michael@0 36 <script type="application/javascript" src="chrome://global/content/contentAreaUtils.js"/>
michael@0 37 <script type="application/javascript" src="chrome://global/content/globalOverlay.js"/>
michael@0 38
michael@0 39 <stringbundleset id="downloadSet">
michael@0 40 <stringbundle id="brandStrings" src="chrome://branding/locale/brand.properties"/>
michael@0 41 <stringbundle id="downloadStrings" src="chrome://mozapps/locale/downloads/downloads.properties"/>
michael@0 42 </stringbundleset>
michael@0 43
michael@0 44 <!-- Use this commandset for command which do not depened on focus or selection -->
michael@0 45 <commandset id="generalCommands">
michael@0 46 <command id="cmd_findDownload" oncommand="setSearchboxFocus();"/>
michael@0 47 <command id="cmd_selectAllDownloads" oncommand="gDownloadsView.selectAll();"/>
michael@0 48 <command id="cmd_clearList" oncommand="clearDownloadList();"/>
michael@0 49 </commandset>
michael@0 50
michael@0 51 <keyset id="downloadKeys">
michael@0 52 <key keycode="VK_RETURN" oncommand="doDefaultForSelected();"/>
michael@0 53 <key id="key_pauseResume" key=" " oncommand="performCommand('cmd_pauseResume');"/>
michael@0 54 <key id="key_removeFromList" keycode="VK_DELETE" oncommand="performCommand('cmd_removeFromList');"/>
michael@0 55 #ifdef XP_MACOSX
michael@0 56 <key id="key_removeFromList2" keycode="VK_BACK" oncommand="performCommand('cmd_removeFromList');"/>
michael@0 57 #endif
michael@0 58 <key id="key_close" key="&cmd.close.commandKey;" oncommand="closeWindow(true);" modifiers="accel"/>
michael@0 59 #ifdef XP_GNOME
michael@0 60 <key id="key_close2" key="&cmd.close2Unix.commandKey;" oncommand="closeWindow(true);" modifiers="accel,shift"/>
michael@0 61 #else
michael@0 62 <key id="key_close2" key="&cmd.close2.commandKey;" oncommand="closeWindow(true);" modifiers="accel"/>
michael@0 63 #endif
michael@0 64 <key keycode="VK_ESCAPE" oncommand="closeWindow(true);"/>
michael@0 65
michael@0 66 <key id="key_findDownload"
michael@0 67 key="&cmd.find.commandKey;"
michael@0 68 modifiers="accel"
michael@0 69 command="cmd_findDownload"/>
michael@0 70 <key id="key_findDownload2"
michael@0 71 key="&cmd.search.commandKey;"
michael@0 72 modifiers="accel"
michael@0 73 command="cmd_findDownload"/>
michael@0 74 <key id="key_selectAllDownloads"
michael@0 75 key="&selectAllCmd.key;"
michael@0 76 modifiers="accel"
michael@0 77 command="cmd_selectAllDownloads"/>
michael@0 78 <key id="pasteKey"
michael@0 79 key="V"
michael@0 80 modifiers="accel"
michael@0 81 oncommand="pasteHandler();"/>
michael@0 82 </keyset>
michael@0 83
michael@0 84 <vbox id="contextMenuPalette" hidden="true">
michael@0 85 <menuitem id="menuitem_pause"
michael@0 86 label="&cmd.pause.label;" accesskey="&cmd.pause.accesskey;"
michael@0 87 oncommand="performCommand('cmd_pause');"
michael@0 88 cmd="cmd_pause"/>
michael@0 89 <menuitem id="menuitem_resume"
michael@0 90 label="&cmd.resume.label;" accesskey="&cmd.resume.accesskey;"
michael@0 91 oncommand="performCommand('cmd_resume');"
michael@0 92 cmd="cmd_resume"/>
michael@0 93 <menuitem id="menuitem_cancel"
michael@0 94 label="&cmd.cancel.label;" accesskey="&cmd.cancel.accesskey;"
michael@0 95 oncommand="performCommand('cmd_cancel');"
michael@0 96 cmd="cmd_cancel"/>
michael@0 97
michael@0 98 <menuitem id="menuitem_open" default="true"
michael@0 99 label="&cmd.open.label;" accesskey="&cmd.open.accesskey;"
michael@0 100 oncommand="performCommand('cmd_open');"
michael@0 101 cmd="cmd_open"/>
michael@0 102 <menuitem id="menuitem_show"
michael@0 103 #ifdef XP_MACOSX
michael@0 104 label="&cmd.showMac.label;"
michael@0 105 accesskey="&cmd.showMac.accesskey;"
michael@0 106 #else
michael@0 107 label="&cmd.show.label;"
michael@0 108 accesskey="&cmd.show.accesskey;"
michael@0 109 #endif
michael@0 110 oncommand="performCommand('cmd_show');"
michael@0 111 cmd="cmd_show"/>
michael@0 112
michael@0 113 <menuitem id="menuitem_retry" default="true"
michael@0 114 label="&cmd.retry.label;" accesskey="&cmd.retry.accesskey;"
michael@0 115 oncommand="performCommand('cmd_retry');"
michael@0 116 cmd="cmd_retry"/>
michael@0 117
michael@0 118 <menuitem id="menuitem_removeFromList"
michael@0 119 label="&cmd.removeFromList.label;" accesskey="&cmd.removeFromList.accesskey;"
michael@0 120 oncommand="performCommand('cmd_removeFromList');"
michael@0 121 cmd="cmd_removeFromList"/>
michael@0 122
michael@0 123 <menuseparator id="menuseparator"/>
michael@0 124
michael@0 125 <menuitem id="menuitem_openReferrer"
michael@0 126 label="&cmd.goToDownloadPage.label;"
michael@0 127 accesskey="&cmd.goToDownloadPage.accesskey;"
michael@0 128 oncommand="performCommand('cmd_openReferrer');"
michael@0 129 cmd="cmd_openReferrer"/>
michael@0 130
michael@0 131 <menuitem id="menuitem_copyLocation"
michael@0 132 label="&cmd.copyDownloadLink.label;"
michael@0 133 accesskey="&cmd.copyDownloadLink.accesskey;"
michael@0 134 oncommand="performCommand('cmd_copyLocation');"
michael@0 135 cmd="cmd_copyLocation"/>
michael@0 136
michael@0 137 <menuitem id="menuitem_selectAll"
michael@0 138 label="&selectAllCmd.label;"
michael@0 139 accesskey="&selectAllCmd.accesskey;"
michael@0 140 command="cmd_selectAllDownloads"/>
michael@0 141 </vbox>
michael@0 142
michael@0 143 <menupopup id="downloadContextMenu" onpopupshowing="return buildContextMenu(event);"/>
michael@0 144
michael@0 145 <richlistbox id="downloadView" seltype="multiple" flex="1"
michael@0 146 context="downloadContextMenu"
michael@0 147 ondblclick="onDownloadDblClick(event);"
michael@0 148 ondragstart="gDownloadDNDObserver.onDragStart(event);"
michael@0 149 ondragover="gDownloadDNDObserver.onDragOver(event);event.stopPropagation();"
michael@0 150 ondrop="gDownloadDNDObserver.onDrop(event)">
michael@0 151 </richlistbox>
michael@0 152
michael@0 153 <windowdragbox id="search" align="center">
michael@0 154 <button id="clearListButton" command="cmd_clearList"
michael@0 155 label="&cmd.clearList.label;"
michael@0 156 accesskey="&cmd.clearList.accesskey;"
michael@0 157 tooltiptext="&cmd.clearList.tooltip;"/>
michael@0 158 <spacer flex="1"/>
michael@0 159 <textbox type="search" id="searchbox" class="compact"
michael@0 160 aria-controls="downloadView"
michael@0 161 oncommand="buildDownloadList();" placeholder="&searchBox.label;"/>
michael@0 162 </windowdragbox>
michael@0 163
michael@0 164 </window>

mercurial