diff --git a/ChangeLog b/ChangeLog index fe61928..15ff8a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-03-27 Riccardo Mottola + + * Framework/PCProject.m: save windows placements to a separate file with the username as name + 2009-03-24 Sergii Stoian * Framework/PCProjectBuilder.m: Add some comments diff --git a/Framework/PCProject.m b/Framework/PCProject.m index 2f8a023..baa8028 100644 --- a/Framework/PCProject.m +++ b/Framework/PCProject.m @@ -334,9 +334,8 @@ NSString NSString *projectFile = nil; NSMutableDictionary *projectFileDict = nil; - projectFile = [projectPath stringByAppendingPathComponent:@"PC.project"]; - projectFileDict = [NSMutableDictionary - dictionaryWithContentsOfFile:projectFile]; + projectFile = [projectPath stringByAppendingPathComponent:[NSUserName() stringByAppendingPathExtension:@"project"]]; + projectFileDict = [[NSMutableDictionary alloc] initWithCapacity:4]; // Project Window [windows setObject:[projectWindow stringWithSavedFrame] @@ -413,12 +412,15 @@ NSString // Don't notify about projectDict changes [projectDict setObject:windows forKey:@"PC_WINDOWS"]; - // Now save it directly to PC.project file + // Now save it directly to username.project file [projectFileDict setObject:windows forKey:@"PC_WINDOWS"]; + [projectFileDict writeToFile:projectFile atomically:YES]; // PCLogInfo(self, @"Windows and geometries saved"); + [projectFileDict release]; + return YES; }