Revised download UI.
git-svn-id: svn://10.0.0.236/trunk@130783 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -219,3 +219,20 @@ function createLocalFile(aFilePath)
|
||||
lf.initWithPath(aFilePath);
|
||||
return lf;
|
||||
}
|
||||
|
||||
function buildContextMenu()
|
||||
{
|
||||
var selectionCount = gDownloadHistoryView.selectedCount;
|
||||
if (!selectionCount)
|
||||
return false;
|
||||
|
||||
var launchItem = document.getElementById("menuitem_launch");
|
||||
var launchSep = document.getElementById("menuseparator_launch");
|
||||
var removeItem = document.getElementById("menuitem_remove");
|
||||
var showItem = document.getElementById("menuitem_show");
|
||||
showItem.hidden = selectionCount != 1;
|
||||
launchItem.hidden = selectionCount != 1;
|
||||
launchSep.hidden = selectionCount != 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,16 @@
|
||||
<keyset>
|
||||
<key id="key_remove" keycode="VK_DELETE" command="cmd_remove"/>
|
||||
</keyset>
|
||||
|
||||
<popup id="downloadHistoryPopup" onpopupshowing="return buildContextMenu();">
|
||||
<menuitem id="menuitem_launch" label="&cmd.openfile.label;" default="true"
|
||||
accesskey="&cmd.openfile.accesskey;" command="cmd_openfile"/>
|
||||
<menuseparator id="menuseparator_launch"/>
|
||||
<menuitem id="menuitem_show" label="&cmd.show.label;" accesskey="&cmd.show.accesskey;"
|
||||
command="cmd_showinshell"/>
|
||||
<menuitem id="menuitem_remove" label="&cmd.remove.label;" accesskey="&cmd.remove.accesskey;"
|
||||
command="cmd_remove"/>
|
||||
</popup>
|
||||
|
||||
<vbox flex="1">
|
||||
<vbox id="downloadView" flex="3" style="overflow: auto;"
|
||||
@@ -54,20 +64,10 @@
|
||||
<sidebarheader align="center">
|
||||
<label value="&finishedDownloads.label;"/>
|
||||
</sidebarheader>
|
||||
<toolbar id="download-toolbar" tbalign="stretch" class="chromeclass-toolbar" persist="collapsed">
|
||||
<toolbarbutton label="&cmd.remove.label;" accesskey="&cmd.remove.accesskey;"
|
||||
command="cmd_remove"/>
|
||||
<toolbarseparator/>
|
||||
<toolbarbutton id="btn_openfile" label="&cmd.openfile.label;" accesskey="&cmd.openfile.accesskey;"
|
||||
command="cmd_openfile"/>
|
||||
<toolbarbutton id="btn_showinshell" label="&cmd.show.label;"
|
||||
accesskey="&cmd.show.accesskey;" command="cmd_showinshell"/>
|
||||
</toolbar>
|
||||
|
||||
<listbox id="downloadHistoryView" flex="1" class="plain" seltype="multiple"
|
||||
datasources="rdf:null" ref="NC:DownloadsRoot" flags="dont-test-empty"
|
||||
enableColumnDrag="true"
|
||||
onselect="onSelect(event);">
|
||||
enableColumnDrag="true" ondblclick="goDoCommand('cmd_openfile');"
|
||||
onselect="onSelect(event);" context="downloadHistoryPopup">
|
||||
<listcols>
|
||||
<listcol id="Name" primary="true"
|
||||
label="&name.label;"
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
<!ENTITY cmd.remove.accesskey "r">
|
||||
<!ENTITY cmd.cancel.label "Cancel">
|
||||
<!ENTITY cmd.cancel.accesskey "c">
|
||||
<!ENTITY cmd.openfile.label "Launch">
|
||||
<!ENTITY cmd.openfile.accesskey "L">
|
||||
<!ENTITY cmd.openfile.label "Open">
|
||||
<!ENTITY cmd.openfile.accesskey "O">
|
||||
<!ENTITY cmd.show.label "Show">
|
||||
<!ENTITY cmd.show.accesskey "S">
|
||||
<!ENTITY confirmCancel "Are you sure you want to cancel the saving of this file?">
|
||||
|
||||
Reference in New Issue
Block a user