mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 02:20:48 +00:00
Show a document's represented file name in the title of its window
also when its display name is equal to the last path component of the file name, since that is what NSDocument uses by default for compatibility with OS X. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30052 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6fe88f9e37
commit
515f6d28de
2 changed files with 10 additions and 1 deletions
|
@ -399,7 +399,11 @@
|
|||
NSString *title = [self windowTitleForDocumentDisplayName: displayName];
|
||||
|
||||
/* If they just want to display the filename, use the fancy method */
|
||||
if (filename != nil && [title isEqualToString: filename])
|
||||
/* NB For compatibility with Mac OS X, a document display name is equal
|
||||
to its last path component, so we check for that here too */
|
||||
if (filename != nil &&
|
||||
([title isEqualToString: filename] ||
|
||||
[title isEqualToString: [filename lastPathComponent]]))
|
||||
{
|
||||
[_window setTitleWithRepresentedFilename: filename];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue