mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-24 03:51:22 +00:00
Saves w/ window template when appropriate.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@21566 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
223da3ea64
commit
71f668b9f2
4 changed files with 27 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2005-07-30 04:16 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||||
|
|
||||||
|
* GormCore/GormDocument.m: use versionOfClass: in
|
||||||
|
_replaceObjectsWithTemplates: method.
|
||||||
|
* GormCore/GormFilePrefsManager.[hm]: Added versionOfClass:.
|
||||||
|
|
||||||
2005-07-28 23:09 Gregory John Casamento <greg_casamento@yahoo.com>
|
2005-07-28 23:09 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||||
|
|
||||||
* Palettes/1Windows/GormNSWindowSizeInspector.gorm: Corrected layout.
|
* Palettes/1Windows/GormNSWindowSizeInspector.gorm: Corrected layout.
|
||||||
|
|
|
@ -2991,7 +2991,8 @@ static NSImage *fileImage = nil;
|
||||||
withClassName: customClass
|
withClassName: customClass
|
||||||
withSuperClassName: superClass];
|
withSuperClassName: superClass];
|
||||||
}
|
}
|
||||||
else if([object isKindOfClass: [NSWindow class]])
|
else if([object isKindOfClass: [NSWindow class]]
|
||||||
|
&& [filePrefsManager versionOfClass: @"GSWindowTemplate"] > 0)
|
||||||
{
|
{
|
||||||
template = [GSTemplateFactory templateForObject: object
|
template = [GSTemplateFactory templateForObject: object
|
||||||
withClassName: [object className]
|
withClassName: [object className]
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
// set class versions
|
// set class versions
|
||||||
- (void) setClassVersions;
|
- (void) setClassVersions;
|
||||||
- (void) restoreClassVersions;
|
- (void) restoreClassVersions;
|
||||||
|
- (int) versionOfClass: (NSString *)className;
|
||||||
|
|
||||||
+ (int) currentVersion;
|
+ (int) currentVersion;
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -169,6 +169,24 @@ NSString *formatVersion(int version)
|
||||||
return [NSArchiver archiveRootObject: self toFile: path];
|
return [NSArchiver archiveRootObject: self toFile: path];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (int) versionOfClass: (NSString *)className
|
||||||
|
{
|
||||||
|
int result = -1;
|
||||||
|
|
||||||
|
NSDictionary *clsProfile = [currentProfile objectForKey: className];
|
||||||
|
if(clsProfile != nil)
|
||||||
|
{
|
||||||
|
NSString *versionString = [clsProfile objectForKey: @"version"];
|
||||||
|
if(versionString != nil)
|
||||||
|
{
|
||||||
|
result = [versionString intValue];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
- (BOOL) loadFromFile: (NSString *)path
|
- (BOOL) loadFromFile: (NSString *)path
|
||||||
{
|
{
|
||||||
BOOL result = YES;
|
BOOL result = YES;
|
||||||
|
|
Loading…
Reference in a new issue