mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-02-19 01:51:09 +00:00
Prevent a crash when opening a subproject in ProjectCenter and fix bug
where ProjectCenter would not quit after opening a subproject. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@30721 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
082fb0ae70
commit
bd0738109c
2 changed files with 30 additions and 20 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
||||||
|
2010-06-15 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||||
|
|
||||||
|
* Framework/PCProjectManager.m(-openProjectAt:makeActive:):
|
||||||
|
Prevent a crash when opening a subproject by not creating a new
|
||||||
|
project window for the subproject. This window is immediately
|
||||||
|
released again when the new project's super project is set anyway.
|
||||||
|
|
||||||
|
* Framework/PCProjectManager.m(-closeAllProjects): Fix bug where
|
||||||
|
PC would not quit after opening a subproject due to a bogus
|
||||||
|
enumerator loop.
|
||||||
|
|
||||||
2010-06-07 Wolfgang Lux <wolfgang.lux@gmail.com>
|
2010-06-07 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||||
|
|
||||||
* Framework/PCProjectWindow.m (-dealloc):
|
* Framework/PCProjectWindow.m (-dealloc):
|
||||||
|
|
|
@ -633,25 +633,25 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
|
||||||
}
|
}
|
||||||
|
|
||||||
[loadedProjects setObject:project forKey: [project projectPath]];
|
[loadedProjects setObject:project forKey: [project projectPath]];
|
||||||
[project setProjectManager:self];
|
|
||||||
|
|
||||||
// Windows and panels
|
|
||||||
wap = [projectFile objectForKey:PCWindows];
|
|
||||||
if ([[wap allKeys] containsObject:@"ProjectBuild"])
|
|
||||||
{
|
|
||||||
[[project projectWindow] showProjectBuild:self];
|
|
||||||
}
|
|
||||||
if ([[wap allKeys] containsObject:@"ProjectLaunch"])
|
|
||||||
{
|
|
||||||
[[project projectWindow] showProjectLaunch:self];
|
|
||||||
}
|
|
||||||
if ([[wap allKeys] containsObject:@"LoadedFiles"])
|
|
||||||
{
|
|
||||||
[[project projectWindow] showProjectLoadedFiles:self];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (flag)
|
if (flag)
|
||||||
{
|
{
|
||||||
|
[project setProjectManager:self];
|
||||||
|
|
||||||
|
// Windows and panels
|
||||||
|
wap = [projectFile objectForKey:PCWindows];
|
||||||
|
if ([[wap allKeys] containsObject:@"ProjectBuild"])
|
||||||
|
{
|
||||||
|
[[project projectWindow] showProjectBuild:self];
|
||||||
|
}
|
||||||
|
if ([[wap allKeys] containsObject:@"ProjectLaunch"])
|
||||||
|
{
|
||||||
|
[[project projectWindow] showProjectLaunch:self];
|
||||||
|
}
|
||||||
|
if ([[wap allKeys] containsObject:@"LoadedFiles"])
|
||||||
|
{
|
||||||
|
[[project projectWindow] showProjectLoadedFiles:self];
|
||||||
|
}
|
||||||
|
|
||||||
[[project projectWindow] makeKeyAndOrderFront:self];
|
[[project projectWindow] makeKeyAndOrderFront:self];
|
||||||
[self setActiveProject: project];
|
[self setActiveProject: project];
|
||||||
}
|
}
|
||||||
|
@ -1023,13 +1023,12 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
|
||||||
- (BOOL)closeAllProjects
|
- (BOOL)closeAllProjects
|
||||||
{
|
{
|
||||||
PCProject *project = nil;
|
PCProject *project = nil;
|
||||||
NSEnumerator *enumerator = [loadedProjects objectEnumerator];
|
NSEnumerator *enumerator = [[loadedProjects allValues] objectEnumerator];
|
||||||
|
|
||||||
// PCLogInfo(self, @"loaded %i projects", [loadedProjects count]);
|
// PCLogInfo(self, @"loaded %i projects", [loadedProjects count]);
|
||||||
|
|
||||||
while ([loadedProjects count] > 0)
|
while ((project = [enumerator nextObject]) != nil)
|
||||||
{
|
{
|
||||||
project = [enumerator nextObject];
|
|
||||||
if ([prefController boolForKey:SaveOnQuit])
|
if ([prefController boolForKey:SaveOnQuit])
|
||||||
{
|
{
|
||||||
[project save];
|
[project save];
|
||||||
|
|
Loading…
Reference in a new issue