Andy Balholm
(509) 276-9718
an...@balholm.com
The filename -- path behavior is Cocotron and platform specific, it
should probably be pushed into the NSWindow behavior at least with
setTitleWithRepresentedFilename:/setRepresentedFilename:, or maybe
into a themeing layer. The NSWindowController behavior would then use
setTitle:/setTitleWithRepresentedFilename:/setRepresentedFilename
appropriately.
The documentation for windowTitleForDocumentDisplayName: says it
returns displayName, so I'd rather not mess with the default
implementation to include the path formatting.
If the current formatting is interfering with your window titles, is
there a better alternative? Turning off the filename -- path
formatting entirely? What do you want it to look like?
Chris
Moving it to NSWindow would make it easier to have it platform
specific, but having the default title-bar behavior built in at a low
level (in NSWindow or a theme layer) would make it harder to override.
> The documentation for windowTitleForDocumentDisplayName: says it
> returns displayName, so I'd rather not mess with the default
> implementation to include the path formatting.
But the documentation for synchronizeWindowTitleWithDocumentName says
that it uses the result of windowTitleForDocumentDisplayName:, too.
> If the current formatting is interfering with your window titles, is
> there a better alternative? Turning off the filename -- path
> formatting entirely? What do you want it to look like?
I don't know what Microsoft's human interface guidelines say (if there
is such a document—Office 2007 gives me the impression that MS doesn't
believe in UI standards), but it looks to me like the standard for
Windows title bars is something like "test.txt - Notepad". It seems to
me that we should either make Cocotron's behavior the same as Cocoa's
(just the filename, perhaps without the extension if extensions are
hidden in Expolorer) or make it match this de facto Windows standard,
rather than putting the full path in the title bar.
By the way, when an MS application puts an asterisk in the title bar
to show that the file isn't saved, it seems to put it after the title,
not before like Cocotron does it. At least that's how Visual Studio
Express does it.
Andy