rem: var item = aEvent.target; if (item.getAttribute("type") == "download" && aEvent.button == 0) { var state = parseInt(item.getAttribute("state")); switch (state) { case nsIDM.DOWNLOAD_FINISHED: gDownloadViewController.doCommand("cmd_open"); break; case nsIDM.DOWNLOAD_DOWNLOADING: gDownloadViewController.doCommand("cmd_pause"); break; case nsIDM.DOWNLOAD_PAUSED: gDownloadViewController.doCommand("cmd_resume"); break; case nsIDM.DOWNLOAD_CANCELED: case nsIDM.DOWNLOAD_BLOCKED: case nsIDM.DOWNLOAD_DIRTY: case nsIDM.DOWNLOAD_FAILED: gDownloadViewController.doCommand("cmd_retry"); break; } } 
add:  if (aEvent.button == 0) doDefaultForSelected(); 
context: function onDownloadDblClick(aEvent){  var item = aEvent.target;  if (item.getAttribute("type") == "download" && aEvent.button == 0) {    var state = parseInt(item.getAttribute("state"));    switch (state) {      case nsIDM.DOWNLOAD_FINISHED:        gDownloadViewController.doCommand("cmd_open");        break;      case nsIDM.DOWNLOAD_DOWNLOADING:        gDownloadViewController.doCommand("cmd_pause");        break;      case nsIDM.DOWNLOAD_PAUSED:        gDownloadViewController.doCommand("cmd_resume");        break;      case nsIDM.DOWNLOAD_CANCELED:      case nsIDM.DOWNLOAD_BLOCKED:      case nsIDM.DOWNLOAD_DIRTY:      case nsIDM.DOWNLOAD_FAILED:        gDownloadViewController.doCommand("cmd_retry");        break;    }  }}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/8395/092de713ae81cdd753d78089cf32482897829f5d/downloads.js/clean/toolkit/mozapps/downloads/content/downloads.js