Bug 254696 Download Manager should open file/display properties when you hit enter

patch by cst@andrew.cmu.edu r=neil sr=jag


git-svn-id: svn://10.0.0.236/trunk@160960 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
timeless%mozdev.org 2004-08-19 00:46:31 +00:00
parent e825a3bacc
commit 0ae5fac927
2 changed files with 5 additions and 6 deletions

View File

@ -139,10 +139,7 @@ function onSelect(aEvent) {
window.updateCommands("tree-select");
}
function onDoubleClick(aEvent) {
if (aEvent.button != 0)
return;
function onTrigger() {
if (downloadViewController.isCommandEnabled('cmd_properties'))
goDoCommand('cmd_properties');
else if (downloadViewController.isCommandEnabled('cmd_openfile'))

View File

@ -171,8 +171,10 @@
<tree id="downloadView" flex="1" class="plain" context="downloadPaneContext"
datasources="rdf:null" ref="NC:DownloadsRoot" flags="dont-test-empty"
ondblclick="onDoubleClick(event);" enableColumnDrag="true"
onselect="onSelect(event);">
enableColumnDrag="true" onselect="onSelect(event);"
ondblclick="if (event.button == 0) onTrigger();"
onkeypress="if ((event.keyCode == KeyEvent.DOM_VK_RETURN) ||
(event.keyCode == KeyEvent.DOM_VK_ENTER)) onTrigger();">
<treecols onclick="doSort(event.target)">
<treecol id="Name" primary="true"
label="&view.header.name.label;"