Bug 410201 - Make /help do something useful on non-browser-apps

r=ajvincent@gmail.com (Alex Vincent)
Venkman Only. NPOTDB.
This commit is contained in:
gijskruitbosch%gmail.com 2008-01-20 12:08:45 +00:00
Родитель 94ec797158
Коммит 33fefab8d4
2 изменённых файлов: 19 добавлений и 16 удалений

Просмотреть файл

@ -332,6 +332,8 @@ msg.files.rec = Files
#msg.doc.popuphdr = Popups
#msg.doc.keyhdr = Keys
msg.help.hostproblem = You're running Venkman in an application which doesn't have a browser. Therefore, we can't show you this help content. If you install Venkman in Firefox, SeaMonkey or Flock, you can copy this URL into the address bar to show the help: x-jsd:help . You can also use the help command with a parameter to get help information on a specific command.
msg.note.console = This command is available from the console.
msg.note.noconsole = This command is NOT available from the console.
msg.note.needstack = You must be stopped at a breakpoint to use this command.

Просмотреть файл

@ -1180,27 +1180,28 @@ function cmdHelp (e)
var ary;
if (!e.pattern)
{
openTopWin ("x-jsd:help", "venkman-help");
if (!console.haveBrowser)
{
display(MSG_HELP_HOSTPROBLEM, MT_ERROR);
return false;
}
openTopWin("x-jsd:help", "venkman-help");
return true;
}
else
{
ary = console.commandManager.list (e.pattern, CMD_CONSOLE);
ary = console.commandManager.list(e.pattern, CMD_CONSOLE);
if (ary.length == 0)
{
display (getMsg(MSN_ERR_NO_COMMAND, e.pattern), MT_ERROR);
display(getMsg(MSN_ERR_NO_COMMAND, e.pattern), MT_ERROR);
return false;
}
for (var i in ary)
{
display (getMsg(MSN_FMT_USAGE, [ary[i].name, ary[i].usage]),
MT_USAGE);
display (ary[i].help, MT_HELP);
display(getMsg(MSN_FMT_USAGE, [ary[i].name, ary[i].usage]), MT_USAGE);
display(ary[i].help, MT_HELP);
}
}
return true;
}