On Mac OS X, the window close button is supposed to have a dot in the middle, if the window contains unsaved changes. Editor windows don't support this. See page 55 of the Aqua HIG (Macworld draft).
We need to use the SetWindowModified API, or whatever it's called, and should probably have generic hooks for this. nsIDiskDocument would be a good place at the lower level, but this would need to communicate up to the widget layer somehow. This is kinda similar to the window icon problem.
I was looking at this for some of the window icon stuff and editor at least has an api where you can attach listeners to the ?document? who can observe whether its dirty or not. However since presumably mail compose windows want to do this too, it should be done at a lower level than editor. Henri, did you intend this bug to apply to more than the editor? ie, will you make another one for mailnews?
Why wouldn't mail compose windows also want this behavior? Wouldn't users want to know if the draft had been saved or not? I think this bug should cover both Composer and Mail Compose.
I haven't been testing Mail&News, but this probably applies to more than just the Editor.
Bugs targeted at mozilla1.0 without the mozilla1.0 keyword moved to mozilla1.0.1 (you can query for this string to delete spam or retrieve the list of bugs I've moved)
Pre-sabbatical bug triage.
*** Bug 317813 has been marked as a duplicate of this bug. ***
see also bug 370318
Now works in BlueGriffon ; see http://sources.disruptive-innovations.com/bluegriffon/trunk/src/diOSXDockIconBadger/ and |<method name="updateOSXCloseButton">| in http://sources.disruptive-innovations.com/bluegriffon/trunk/base/content/bluegriffon/bindings/tabeditor.xml
ehsan just made me the owner of this bug... Hey, ehsan, ask me next time ? Ok, I'll try to make a patch for composer here.
(In reply to comment #14) > ehsan just made me the owner of this bug... Hey, ehsan, ask me next time ? I didn't actually! You just seem to be the default assignee for this component (probably dating back to several years ago)! Please file a bug to get that fixed. :-) Sorry for the confusion. ;-)
(In reply to comment #15) > (In reply to comment #14) > > ehsan just made me the owner of this bug... Hey, ehsan, ask me next time ? > I didn't actually! You just seem to be the default assignee for this component I don't think composer is the right component for this anyway, it seems like something that should be fixed using either an attribute on the <window> or a property on nsIChromeWindow or maybe nsIXULWindow. At some point web pages (e.g. webmail) might want to be able to notify the chrome as to whether they have unsaved changes too, and chrome could then set the dot if any of the tabs has unsaved changes.
OK, moving over to XUL then.