diff --git a/Documentation/TODO b/Documentation/TODO index da0bfa0..26b8f1f 100644 --- a/Documentation/TODO +++ b/Documentation/TODO @@ -48,7 +48,7 @@ ProjectCenter 0.6 - change project type from file to bundle casamento/mottola - Finish FileNameIcon (draggable, files can be dragged to it) [done!] - More options for file creation [done!] -- Review all situations when dialogs must be popped up [75% done] +- Review all situations when dialogs must be popped up [done!] - Check all textfields if 'scrollable' attribute set stoyan - Rewrite Preferences (3rd party sections etc.) stoyan --- Project Editor --------------------------------------------- diff --git a/Framework/English.lproj/SaveModified.gorm/objects.gorm b/Framework/English.lproj/SaveModified.gorm/objects.gorm index df3c135..28072e5 100644 Binary files a/Framework/English.lproj/SaveModified.gorm/objects.gorm and b/Framework/English.lproj/SaveModified.gorm/objects.gorm differ diff --git a/Framework/GNUmakefile b/Framework/GNUmakefile index 250f262..a344484 100644 --- a/Framework/GNUmakefile +++ b/Framework/GNUmakefile @@ -118,7 +118,7 @@ ProjectCenter_LOCALIZED_RESOURCE_FILES = \ ProjectDescription.gorm \ FileAttributes.gorm \ LogPanel.gorm \ - SaveModifiedFiles.gorm + SaveModified.gorm ProjectCenter_LANGUAGES = \ diff --git a/Framework/PCEditorManager.m b/Framework/PCEditorManager.m index 936a731..cab46cf 100644 --- a/Framework/PCEditorManager.m +++ b/Framework/PCEditorManager.m @@ -31,6 +31,7 @@ #import #import +#import NSString *PCEditorDidChangeFileNameNotification = @"PCEditorDidChangeFileNameNotification"; @@ -304,35 +305,15 @@ NSString *PCEditorDidResignActiveNotification = - (BOOL)closeAllEditors { NSArray *modifiedFiles = [self modifiedFiles]; - int ret; - - NSLog(@"[PCEditorManager] modified files: %@", modifiedFiles); if ([modifiedFiles count]) { - ret = NSRunAlertPanel(@"Close", - @"Project has unsaved files.", - @"Review Unsaved", - @"Close Anyway", - @"Save and Close"); - switch (ret) + if (!PCRunSaveModifiedFilesPanel(self, + @"Save and Close", + @"Close Anyway", + @"Cancel")) { - case NSAlertDefaultReturn: // Review Unsaved - if ([self reviewUnsaved:modifiedFiles] == NO) - { // Operation was canceled - return NO; - } - break; - - case NSAlertAlternateReturn: // Close Anyway - break; - - case NSAlertOtherReturn: // Save and Close - if ([self saveAllFiles] == NO) - { - return NO; - } - break; + return NO; } } @@ -501,7 +482,7 @@ NSString *PCEditorDidResignActiveNotification = [_editorsDict setObject:_editor forKey:_newFileName]; } -- (void) debuggerDidHitBreakpoint: (NSNotification *)aNotif +- (void)debuggerDidHitBreakpoint:(NSNotification *)aNotif { id object = [aNotif object]; NSString *filePath = [object objectForKey: @"file"]; diff --git a/Framework/PCSaveModified.m b/Framework/PCSaveModified.m index c4cf612..af902c1 100644 --- a/Framework/PCSaveModified.m +++ b/Framework/PCSaveModified.m @@ -59,7 +59,7 @@ BOOL PCRunSaveModifiedFilesPanel(PCEditorManager *manager, { if ([NSBundle loadNibNamed:@"SaveModified" owner:self] == NO) { - NSLog(@"Error loading SaveModifiedFiles NIB file!"); + NSLog(@"Error loading SaveModified NIB file!"); return NO; } diff --git a/Modules/Editors/ProjectCenter/PCEditor.m b/Modules/Editors/ProjectCenter/PCEditor.m index 19eefcf..cf8bce3 100644 --- a/Modules/Editors/ProjectCenter/PCEditor.m +++ b/Modules/Editors/ProjectCenter/PCEditor.m @@ -723,7 +723,7 @@ } ret = NSRunAlertPanel(@"Close File", - @"File has been modified. Save?", + @"File %@ has been modified. Save?", @"Save and Close", @"Don't save", @"Cancel", [_path lastPathComponent]); switch (ret)