mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-03-14 06:31:31 +00:00
* Finish alert panels review. All situations that I've missed will
be worked out in future. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27954 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c3c4cfcc79
commit
9724c929cb
6 changed files with 11 additions and 30 deletions
|
@ -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 ---------------------------------------------
|
||||
|
|
Binary file not shown.
|
@ -118,7 +118,7 @@ ProjectCenter_LOCALIZED_RESOURCE_FILES = \
|
|||
ProjectDescription.gorm \
|
||||
FileAttributes.gorm \
|
||||
LogPanel.gorm \
|
||||
SaveModifiedFiles.gorm
|
||||
SaveModified.gorm
|
||||
|
||||
|
||||
ProjectCenter_LANGUAGES = \
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#import <ProjectCenter/PCProject.h>
|
||||
|
||||
#import <ProjectCenter/PCLogController.h>
|
||||
#import <ProjectCenter/PCSaveModified.h>
|
||||
|
||||
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"];
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue