mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-03-20 09:30:59 +00:00
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:
parent
f7b4c54b34
commit
457634d06f
3 changed files with 17 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue