How to prevent the window title from showing "Edited" for an infected NSDocument?
I manage saving and autosaving myself using a web service, and just don't want to get distracted in the title bar.
I tried overriding:
- NSDocument
-isDocumentEdited
and -hasUnautosavedChanges
always return NO
. -[NSWindowController setDocumentEdited]
do nothing or always use NO
regardless of the actual value of the parameter.-[NSWindowController synchronizeWindowTitleWithDocumentName]
do nothing.-[NSWindow setDocumentEdited]
do nothing or always use NO
regardless of the actual value of the parameter.
In all cases, the title bar still changes to βEditedβ when I make changes to the saved document.
If I override -[NSDocument updateChangeCount:]
and -[NSDocument updateChangeCountWithToken:forSaveOperation:]
to do nothing, I can prevent this, but it also affects saving, autosaving and other types of documents.
I also tried this:
[[self.window standardWindowButton: NSWindowDocumentVersionsButton] setTitle:nil];
This displayed an empty line instead of Edited, but a dash appeared - one that usually separates the document name and Edited.
Any idea how to separate this part of the window from the document?
source share