reopening projects is now possible - finally...

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@8490 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Robert Slover 2001-01-07 12:12:17 +00:00
parent f7b4c54b34
commit 457634d06f
3 changed files with 17 additions and 7 deletions

View file

@ -73,7 +73,10 @@ NSString *FileShouldOpenNotification = @"FileShouldOpenNotification";
- (void)projectDictDidChange:(NSNotification *)aNotif
{
[browser loadColumnZero];
if (browser) {
NSLog(@"%@ %x loads column!",browser,[browser class]);
[browser loadColumnZero];
}
}
- (NSString *)nameOfSelectedFile

View file

@ -75,7 +75,8 @@
[browserController setBrowser:browser];
[browserController setProject:self];
[browser autorelease];
RELEASE(browser);
box = [[NSBox alloc] initWithFrame:NSMakeRect (0,-1,560,252)];
[box setTitlePosition:NSNoTitle];
@ -371,7 +372,6 @@
*
*/
// Redisplay!
[browser loadColumnZero];
}
@ -998,12 +998,17 @@
}
else if (object == [self projectWindow]) {
if ([[self projectWindow] isDocumentEdited]) {
if (NSRunAlertPanel(@"Project changed!",@"The project %@ has unsaved files! Should they be saved before closing it?",@"Yes",@"No",nil,[self projectName])) {
if (NSRunAlertPanel(@"Project changed!",
@"The project %@ has unsaved files! Should they be saved before closing?",
@"Yes",
@"No",
nil,[self projectName])) {
[self save];
}
}
// The PCProjectController is our delegate!
[[NSNotificationCenter defaultCenter] removeObserver:browserController];
[projectManager closeProject:self];
}
}

View file

@ -356,9 +356,11 @@ NSString *ActiveProjectDidChangeNotification = @"ActiveProjectDidChange";
[loadedProjects removeObjectForKey:key];
[self setActiveProject:[[loadedProjects allValues] lastObject]];
[currentProject autorelease];
//~ Should I activate another project here?!
if ([loadedProjects count] == 0) {
[inspector performClose:self];
}
AUTORELEASE(currentProject);
}
- (void)closeProject