Closed Bug 227093 Opened 21 years ago Closed 19 years ago

Close/exit confirmation when connected to servers/networks

Categories

(Other Applications :: ChatZilla, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bugzilla-mozilla-20000923, Assigned: rginda)

References

Details

(Whiteboard: [cz-patch][cz-0.9.68])

Attachments

(1 file, 3 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6b) Gecko/20031128 Firebird/0.7+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6b) Gecko/20031128 Firebird/0.7+

When you try to close Chatzilla, when connected to servers, it just closes
without any confirmation.

Reproducible: Always

Steps to Reproduce:
1. Connect to a server.
2. Click the [x] or whatever's appropriate for your window manager.
Actual Results:  
Chatzilla disconnected and closed.

Expected Results:  
Chatzilla should have asked first.

This is as much a reminder for me as anything else, since it's been reported at
least twice recently on irc://moznet/chatzilla.
Looks an awful lot like bug 39057.
Product: Core → Other Applications
Although this works even when not connected to a server and/or channel, it's
good enough.
Save this as a plugin (thanks to Silver/James Ross for showing me):
window.onClose = function onClose() {
if ("userClose" in client && client.userClose) {
return true;
}
if (!confirm("Are you sure you wish to quit ChatZilla? WARNING: Pressing Yes
will close the window and will disconnect from the servers and channels"))
return false;
client.userClose = true;
display(MSG_CLOSING);
if (!("getConnectionCount" in client) ||
client.getConnectionCount() == 0) {
return true;
}
client.quit(client.userAgent);
return false;
}
*** Bug 283854 has been marked as a duplicate of this bug. ***
Attached patch Adds a confirmation dialog (obsolete) — Splinter Review
This patch adds a confirmation dialog when connected to a server.
Attachment #175719 - Attachment is obsolete: true
Attached patch Adds quit confirmation dialog (obsolete) — Splinter Review
Small change from previous patch. Changes confirm to confirmEx.
(In reply to comment #5)
> Created an attachment (id=175724) [edit]
> Adds quit confirmation dialog
> 
> Small change from previous patch. Changes confirm to confirmEx.

Is there any chance of having a preference + checkbox for this confirmation
dialog, similar to what Suite and Firefox do when you have multiple tabs open?
confirmEx supports that :-). I can imagine some people won't like the dialog
showing up every time.
Attachment #175724 - Flags: review?(samuel)
Comment on attachment 175724 [details] [diff] [review]
Adds quit confirmation dialog

I agree, it definitely needs to be able to be disabled.
Attachment #175724 - Flags: review?(samuel) → review-
Attachment #175724 - Attachment is obsolete: true
Attachment #176272 - Flags: review?(samuel)
Attachment #176272 - Attachment is obsolete: true
Replaces:
var checkState = { value: client.prefs["warnOnClose"] };
With:
var checkState = { value: true };
Attachment #177394 - Flags: review?(samuel)
Attachment #177394 - Flags: review?(samuel) → review+
Whiteboard: cz-patch
Attachment #176272 - Flags: review?(samuel) → review-
Attachment #177394 - Flags: approval1.8b2?
Comment on attachment 177394 [details] [diff] [review]
Change to previous patch

a=asa
Attachment #177394 - Flags: approval1.8b2? → approval1.8b2+
Checked in --> FIXED.

Automated builds at http://twpol.dyndns.org/mozilla/chatzilla/nightly/ will
include this shortly.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Whiteboard: cz-patch → [cz-patch][cz-0.9.68]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: