Closed
Bug 415082
Opened 17 years ago
Closed 17 years ago
Close "owned" dialogs when ChatZilla closed
Categories
(Other Applications Graveyard :: ChatZilla, defect)
Other Applications Graveyard
ChatZilla
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: bugzilla-mozilla-20000923, Assigned: bugzilla-mozilla-20000923)
References
Details
(Whiteboard: [cz-0.9.81])
Attachments
(1 file)
2.16 KB,
patch
|
Gijs
:
review+
|
Details | Diff | Splinter Review |
When we close ChatZilla, we leave our dialogs behind. We shouldn't. There are two dialogs I can think of currently:
- Preferences
- Join Channel
Assignee | ||
Updated•17 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•17 years ago
|
||
Attachment #300647 -
Flags: review?(gijskruitbosch+bugs)
Comment 2•17 years ago
|
||
Comment on attachment 300647 [details] [diff] [review]
Close preferences and join channel dialogs
>Index: xul/content/config.js
>===================================================================
>RCS file: /cvsroot/mozilla/extensions/irc/xul/content/config.js,v
>retrieving revision 1.12
>diff -d -p -u -6 -r1.12 config.js
>--- xul/content/config.js 6 Jan 2008 11:56:51 -0000 1.12
>+++ xul/content/config.js 31 Jan 2008 15:54:20 -0000
> <snip>
>@@ -1160,12 +1162,14 @@ function pwin_onLoad()
> }
>
> /* Closing the window. Clean up. */
> PrefWindow.prototype.onClose =
> function pwin_onClose()
> {
>+ if (this.ownerClient)
>+ delete this.ownerClient.configWindow;
> if (this.loaded)
> destroyPrefs();
> }
>
> /* OK button. */
> PrefWindow.prototype.onOK =
Are you sure onClose gets called? Why onClose and not onUnload?
>Index: xul/content/handlers.js
>===================================================================
>RCS file: /cvsroot/mozilla/extensions/irc/xul/content/handlers.js,v
>retrieving revision 1.168
>diff -d -p -u -6 -r1.168 handlers.js
>--- xul/content/handlers.js 26 Jan 2008 22:31:17 -0000 1.168
>+++ xul/content/handlers.js 31 Jan 2008 15:54:20 -0000
>@@ -139,12 +139,22 @@ function onClose()
> return false;
> }
>
> function onUnload()
> {
> dd("Shutting down ChatZilla.");
>+
>+ // Close all dialogs.
>+ for (var net in client.networks)
>+ {
>+ if (client.networks[net].joinDialog)
>+ client.networks[net].joinDialog.close();
>+ }
>+ if (client.configWindow)
>+ client.configWindow.close();
>+
You |delete| the properties, so you should check if they exist at all to avoid strict warnings.
r=me with more careful checks and some reasonable explanation about onClose rather than onUnload :-)
Attachment #300647 -
Flags: review?(gijskruitbosch+bugs) → review+
Assignee | ||
Comment 3•17 years ago
|
||
(In reply to comment #2)
> Are you sure onClose gets called? Why onClose and not onUnload?
config.xul will tell you that onClose is called when the unload event occurs. I don't know why the names don't match, but I don't particularly care either.
> You |delete| the properties, so you should check if they exist at all to avoid
> strict warnings.
Strict warnings can bite my shiny metal ass. :P
(I'll use the in operator, but it bugs me.)
Assignee | ||
Comment 4•17 years ago
|
||
Checked in --> FIXED.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Whiteboard: [cz-0.9.81]
Updated•2 months ago
|
Product: Other Applications → Other Applications Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•