Bug 471459 - Add "Go to Folder" option for finished DCC sends.

r=silver@warwickcompsoc.co.uk (James Ross)
ChatZilla Only. NPOTFFB.


git-svn-id: svn://10.0.0.236/trunk@256386 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
gijskruitbosch%gmail.com 2009-03-02 11:25:22 +00:00
parent 426efa2673
commit fd4d3c9eda
3 changed files with 28 additions and 3 deletions

View File

@ -271,6 +271,9 @@ cmd.dcc-send.params = [<nickname> [<file>]]
cmd.dcc-send.help = Offers a file to |nickname|. On a query view, |nickname| may be omitted to send the offer to the query view's user. A file may be specified directly by passing |file| or, if omitted, selected from a browse dialog.
cmd.dcc-send.label = Send File…
cmd.dcc-show-file.params = <file>
cmd.dcc-show-file.help = Opens the folder containing the file you downloaded.
cmd.delete-view.key = accel W
cmd.delete-view.label = &Close Tab
cmd.delete-view.params = [<view>]
@ -1088,7 +1091,10 @@ msg.dccfile.aborted = Aborted DCC File Transfer of ``%S'' %S ``%S'' (%S:%S)
msg.dccfile.failed = Failed DCC File Transfer of ``%S'' %S ``%S'' (%S:%S).
msg.dccfile.opened = DCC File Transfer of ``%S'' %S ``%S'' (%S:%S) started.
msg.dccfile.closed.sent = DCC File Transfer of ``%S'' %S ``%S'' (%S:%S) finished.
msg.dccfile.closed.saved = DCC File Transfer of ``%S'' %S ``%S'' (%S:%S) finished. File saved to ``%S''.
# 6 = path, 7 = command for opening the folder
msg.dccfile.closed.saved = DCC File Transfer of ``%S'' %S ``%S'' (%S:%S) finished. File saved to ``%S''. [[Open Containing Folder][Open the folder containing the downloaded file][%S]]
msg.dccfile.closed.saved.mac = DCC File Transfer of ``%S'' %S ``%S'' (%S:%S) finished. File saved to ``%S''. [[Show In Finder][Show the folder containing the file in Finder][%S]]
# 1 = percent, 2 = current pos, 3 = total size, 4 = speed.
msg.dccfile.progress = %S%% complete, %S of %S, %S.
msg.dccfile.send = Pick file to send

View File

@ -87,6 +87,7 @@ function initCommands()
["dcc-decline", cmdDCCDecline, CMD_CONSOLE],
["dcc-list", cmdDCCList, CMD_CONSOLE],
["dcc-send", cmdDCCSend, CMD_NEED_SRV | CMD_CONSOLE],
["dcc-show-file", cmdDCCShowFile, CMD_CONSOLE],
["deop", cmdChanUserMode, CMD_NEED_CHAN | CMD_CONSOLE],
["describe", cmdDescribe, CMD_NEED_SRV | CMD_CONSOLE],
["hop", cmdChanUserMode, CMD_NEED_CHAN | CMD_CONSOLE],
@ -4519,6 +4520,22 @@ function cmdDCCDecline(e)
return true;
}
function cmdDCCShowFile(e)
{
var f = nsLocalFile(e.file);
if (f && f.parent && f.parent.exists())
{
try
{
f.reveal();
}
catch (ex)
{
dd(formatException(ex));
}
}
}
function cmdTextDirection(e)
{
var direction;

View File

@ -3230,8 +3230,10 @@ function my_dccfiledisconnect(e)
if (this.state.dir == DCC_DIR_GETTING)
{
msg = getMsg(MSG_DCCFILE_CLOSED_SAVED,
this._getParams().concat(this.localPath));
var cmd = "dcc-file-show " + this.localPath;
var msgId = (client.platform == "Mac") ? MSG_DCCFILE_CLOSED_SAVED_MAC :
MSG_DCCFILE_CLOSED_SAVED;
msg = getMsg(msgId, this._getParams().concat(this.localPath, cmd));
}
else
{