mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 257728 - Fix error on /quit (CEvent is not defined).
ChatZilla only. r=silver
This commit is contained in:
parent
d98f1d4cac
commit
d0645e169e
@ -151,7 +151,6 @@ function initCommands()
|
||||
["print", cmdPrint, CMD_CONSOLE],
|
||||
["query", cmdQuery, CMD_NEED_SRV | CMD_CONSOLE],
|
||||
["quit", cmdQuit, CMD_CONSOLE],
|
||||
["quit-mozilla", cmdQuitMozilla, CMD_CONSOLE],
|
||||
["quote", cmdQuote, CMD_NEED_SRV | CMD_CONSOLE],
|
||||
["reload-plugin", cmdReload, CMD_CONSOLE],
|
||||
["rlist", cmdRlist, CMD_NEED_SRV | CMD_CONSOLE],
|
||||
@ -202,7 +201,6 @@ function initCommands()
|
||||
/* aliases */
|
||||
["css", "motif", CMD_CONSOLE],
|
||||
["exit", "quit", CMD_CONSOLE],
|
||||
["exit-mozilla", "quit-mozilla", CMD_CONSOLE],
|
||||
["j", "join", CMD_CONSOLE],
|
||||
["part", "leave", CMD_CONSOLE],
|
||||
["raw", "quote", CMD_CONSOLE],
|
||||
@ -1451,14 +1449,7 @@ function cmdSSLServer(e)
|
||||
|
||||
function cmdQuit(e)
|
||||
{
|
||||
client.quit(e.reason);
|
||||
window.close();
|
||||
}
|
||||
|
||||
function cmdQuitMozilla(e)
|
||||
{
|
||||
client.quit(e.reason);
|
||||
goQuitApplication();
|
||||
client.wantToQuit(e.reason);
|
||||
}
|
||||
|
||||
function cmdDisconnect(e)
|
||||
|
@ -133,23 +133,7 @@ function onClose()
|
||||
}
|
||||
|
||||
/* otherwise, try to close out gracefully */
|
||||
var close = true;
|
||||
if (client.prefs["warnOnClose"])
|
||||
{
|
||||
const buttons = ["!yes", "!no"];
|
||||
var checkState = { value: true };
|
||||
var rv = confirmEx(MSG_CONFIRM_QUIT, buttons, 0, MSG_WARN_ON_EXIT,
|
||||
checkState);
|
||||
close = (rv == 0);
|
||||
client.prefs["warnOnClose"] = checkState.value;
|
||||
}
|
||||
|
||||
if (close)
|
||||
{
|
||||
client.userClose = true;
|
||||
display(MSG_CLOSING);
|
||||
client.quit();
|
||||
}
|
||||
client.wantToQuit();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -4402,6 +4402,29 @@ function cli_quit (reason)
|
||||
}
|
||||
}
|
||||
|
||||
client.wantToQuit =
|
||||
function cli_wantToQuit(reason)
|
||||
{
|
||||
|
||||
var close = true;
|
||||
if (client.prefs["warnOnClose"])
|
||||
{
|
||||
const buttons = ["!yes", "!no"];
|
||||
var checkState = { value: true };
|
||||
var rv = confirmEx(MSG_CONFIRM_QUIT, buttons, 0, MSG_WARN_ON_EXIT,
|
||||
checkState);
|
||||
close = (rv == 0);
|
||||
client.prefs["warnOnClose"] = checkState.value;
|
||||
}
|
||||
|
||||
if (close)
|
||||
{
|
||||
client.userClose = true;
|
||||
display(MSG_CLOSING);
|
||||
client.quit(reason);
|
||||
}
|
||||
}
|
||||
|
||||
/* gets a tab-complete match for the line of text specified by |line|.
|
||||
* wordStart is the position within |line| that starts the word being matched,
|
||||
* wordEnd marks the end position. |cursorPos| marks the position of the caret
|
||||
|
Loading…
Reference in New Issue
Block a user