Bug 329274 - Quit when connected prompt is too enthusiastic.

ChatZilla Only.
r=samuel
This commit is contained in:
gijskruitbosch%gmail.com 2006-03-04 22:43:53 +00:00
Родитель 7b046091e6
Коммит 12f49379e7
3 изменённых файлов: 14 добавлений и 8 удалений

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

@ -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 };