Added NuTemplateEditor and nameForEditorWindow.

This commit is contained in:
Uli Kusterer 2003-08-05 06:08:19 +02:00
parent 1b2cc9ce34
commit 486ec07d07
2 changed files with 5 additions and 5 deletions

View File

@ -42,8 +42,8 @@ OSStatus Plug_InitInstance( Plug_PlugInRef plug, Plug_ResourceRef resource )
// load the window from the nib file and set it's title
[self window]; // implicitly loads nib
if( ![[resource name] isEqualToString:@""] )
[[self window] setTitle:[resource name]];
[[self window] setTitle:[resource nameForEditorWindow]];
return self;
}
@ -227,9 +227,7 @@ OSStatus Plug_InitInstance( Plug_PlugInRef plug, Plug_ResourceRef resource )
- (void)resourceNameDidChange:(NSNotification *)notification
{
if( ![[(id <ResKnifeResourceProtocol>)[notification object] name] isEqualToString:@""] )
[[self window] setTitle:[(id <ResKnifeResourceProtocol>)[notification object] name]];
else [[self window] setTitle:NSLocalizedStringFromTableInBundle(@"Untitled Resource", @"Localizable", [NSBundle mainBundle], nil)];
[[self window] setTitle:[(id <ResKnifeResourceProtocol>)[notification object] nameForEditorWindow]];
}
- (void)resourceDataDidChange:(NSNotification *)notification

View File

@ -17,6 +17,7 @@
M. Uli Kusterer, witness(at)zathras.de, (c) 2003.
REVISIONS:
2003-08-05 UK Added nameForEditorWindow.
2003-07-31 UK Added document accessor, commented.
========================================================================== */
@ -38,6 +39,7 @@
-(NSString*) name;
-(void) setName: (NSString*)newName;
-(NSString*) nameForEditorWindow;
-(NSString*) type;
-(void) setType: (NSString*)newType;