зеркало из https://github.com/mozilla/pjs.git
Bug 329274 - Quit when connected prompt is too enthusiastic.
ChatZilla Only. r=samuel
This commit is contained in:
Родитель
87bdde5d12
Коммит
fa290e7cdd
|
@ -1454,7 +1454,16 @@ function cmdSSLServer(e)
|
|||
|
||||
function cmdQuit(e)
|
||||
{
|
||||
client.wantToQuit(e.reason);
|
||||
// if we're not connected to anything, just close the window
|
||||
if (!("getConnectionCount" in client) || (client.getConnectionCount() == 0))
|
||||
{
|
||||
client.userClose = true;
|
||||
window.close();
|
||||
return;
|
||||
}
|
||||
|
||||
// Otherwise, try to close gracefully:
|
||||
client.wantToQuit(e.reason, true);
|
||||
}
|
||||
|
||||
function cmdDisconnect(e)
|
||||
|
|
|
@ -125,12 +125,9 @@ function onClose()
|
|||
if ("userClose" in client && client.userClose)
|
||||
return true;
|
||||
|
||||
if (!("getConnectionCount" in client) ||
|
||||
client.getConnectionCount() == 0)
|
||||
{
|
||||
/* if we're not connected to anything, just close the window */
|
||||
// if we're not connected to anything, just close the window
|
||||
if (!("getConnectionCount" in client) || (client.getConnectionCount() == 0))
|
||||
return true;
|
||||
}
|
||||
|
||||
/* otherwise, try to close out gracefully */
|
||||
client.wantToQuit();
|
||||
|
|
|
@ -4420,11 +4420,11 @@ function cli_quit (reason)
|
|||
}
|
||||
|
||||
client.wantToQuit =
|
||||
function cli_wantToQuit(reason)
|
||||
function cli_wantToQuit(reason, deliberate)
|
||||
{
|
||||
|
||||
var close = true;
|
||||
if (client.prefs["warnOnClose"])
|
||||
if (client.prefs["warnOnClose"] && !deliberate)
|
||||
{
|
||||
const buttons = ["!yes", "!no"];
|
||||
var checkState = { value: true };
|
||||
|
|
Загрузка…
Ссылка в новой задаче