mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-03-18 08:33:06 +00:00
* Framework/PCProjectBuilder.m: Cleanup.
* Framework/PCEditorManager.m: (openEditorForFile:editable:windowed:): Add alert panel that ordeder front when file to open doesn't exist. Remove commented out call to [self orderFrontEditorForFile:filePath] (this method should be called directly to PCEditorManager or PCProjectEditor classes). * Documentation/TODO: Added "Fix reported bugs" to list. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27896 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d40f593b64
commit
ae3f0a1870
4 changed files with 35 additions and 27 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2009-02-17 Sergii Stoian <stoyan255@gmail.com>
|
||||
|
||||
* Framework/PCProjectBuilder.m: Cleanup.
|
||||
* Framework/PCEditorManager.m:
|
||||
(openEditorForFile:editable:windowed:): Add alert panel that
|
||||
ordeder front when file to open doesn't exist. Remove commented
|
||||
out call to [self orderFrontEditorForFile:filePath] (this method
|
||||
should be called directly to PCEditorManager or PCProjectEditor
|
||||
classes).
|
||||
* Documentation/TODO: Added "Fix reported bugs" to list.
|
||||
|
||||
2009-02-16 Sergii Stoian <stoyan255@gmail.com>
|
||||
|
||||
* Framework/PCProjectManager.m:
|
||||
|
|
|
@ -63,6 +63,7 @@ ProjectCenter 0.6
|
|||
project types ???
|
||||
- Add "Palette" project type ???
|
||||
- Add "Component" project type ???
|
||||
- Fix reported bugs ???
|
||||
- New icons. Need volonteers!!! ???
|
||||
|
||||
ProjectCenter 0.7
|
||||
|
|
|
@ -152,18 +152,21 @@ NSString *PCEditorDidResignActiveNotification =
|
|||
// Determine if file not exist or file is directory
|
||||
if (![fm fileExistsAtPath:filePath isDirectory:&isDir] || isDir)
|
||||
{
|
||||
NSLog(@"%@ doesn't exist!", filePath);
|
||||
NSRunAlertPanel(@"Open Editor",
|
||||
@"Couldn't open editor for file '%@'.\n"
|
||||
"File doesn't exist.",
|
||||
@"Ok", nil, nil, filePath);
|
||||
return nil;
|
||||
}
|
||||
|
||||
// Determine if file is text file
|
||||
if (![[PCFileManager defaultManager] isTextFile:filePath])
|
||||
{
|
||||
NSLog(@"%@ is not plan text file!", filePath);
|
||||
NSLog(@"%@ is not plain text file!", filePath);
|
||||
return nil;
|
||||
}
|
||||
|
||||
NSLog(@"EditorManager 1: %@", _editorsDict);
|
||||
// NSLog(@"EditorManager 1: %@", _editorsDict);
|
||||
editor = [_editorsDict objectForKey:filePath];
|
||||
if (editor == nil)
|
||||
{
|
||||
|
@ -195,7 +198,6 @@ NSString *PCEditorDidResignActiveNotification =
|
|||
}
|
||||
|
||||
[editor setWindowed:windowed];
|
||||
// [self orderFrontEditorForFile:filePath];
|
||||
|
||||
return editor;
|
||||
}
|
||||
|
|
|
@ -232,7 +232,7 @@
|
|||
if (!makePath || ![[NSFileManager defaultManager] fileExistsAtPath:makePath])
|
||||
{
|
||||
NSRunAlertPanel(@"Project Build",
|
||||
@"Build tool '%@' not found.\n"
|
||||
@"Build tool '%@' not found. Check preferences.\n"
|
||||
"Build process terminated.",
|
||||
@"OK", nil, nil, makePath);
|
||||
return NO;
|
||||
|
@ -461,24 +461,24 @@
|
|||
NSFileManager *fm = [NSFileManager defaultManager];
|
||||
NSString *projectBuildDir;
|
||||
PCProjectEditor *projectEditor;
|
||||
|
||||
NSLog (@"BuildDir = %@", buildDir);
|
||||
int ret;
|
||||
|
||||
// Checking for project 'edited' state
|
||||
if ([project isProjectChanged])
|
||||
{
|
||||
int ret;
|
||||
ret = NSRunAlertPanel(@"Project Build",
|
||||
@"Project was changed and not saved.\n"
|
||||
"Do you want to save project before building it?",
|
||||
@"Save Project", @"Stop Build", nil);
|
||||
if (ret == NSAlertDefaultReturn)
|
||||
{
|
||||
[project save];
|
||||
}
|
||||
else
|
||||
switch (ret)
|
||||
{
|
||||
case NSAlertDefaultReturn: // Stop Build
|
||||
return NO;
|
||||
break;
|
||||
|
||||
case NSAlertAlternateReturn: // Save Project
|
||||
[project save];
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -491,27 +491,19 @@
|
|||
projectEditor = [project projectEditor];
|
||||
if ([projectEditor hasModifiedFiles])
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = NSRunAlertPanel(@"Project Build",
|
||||
@"Project has unsaved files.\n"
|
||||
"Do you want to save files before build a project?",
|
||||
@"Review Unsaved", @"Build Anyway", @"Stop Build");
|
||||
@"Stop Build", @"Save and Build", nil);
|
||||
switch (ret)
|
||||
{
|
||||
case NSAlertDefaultReturn: // Review Unsaved
|
||||
if ([projectEditor reviewUnsaved:[projectEditor modifiedFiles]] == NO)
|
||||
{ // Operation was canceled
|
||||
return NO;
|
||||
}
|
||||
break;
|
||||
|
||||
case NSAlertAlternateReturn: // Build Anyway
|
||||
break;
|
||||
|
||||
case NSAlertOtherReturn: // Stop Build
|
||||
case NSAlertDefaultReturn: // Stop Build
|
||||
return NO;
|
||||
break;
|
||||
|
||||
case NSAlertAlternateReturn: // Save and Build
|
||||
[projectEditor saveAllFiles];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -521,6 +513,7 @@
|
|||
return NO;
|
||||
}
|
||||
|
||||
NSLog (@"BuildDir = %@", buildDir);
|
||||
// Create root build directory if not exist
|
||||
projectBuildDir = [NSString stringWithFormat:@"%@.build",
|
||||
[project projectName]];
|
||||
|
@ -1161,6 +1154,7 @@
|
|||
if (editor)
|
||||
{
|
||||
position = NSPointFromString([error objectForKey:@"Position"]);
|
||||
[projectEditor orderFrontEditorForFile:[error objectForKey:@"File"]];
|
||||
[editor scrollToLineNumber:(unsigned int)position.x];
|
||||
|
||||
/* NSLog(@"%i: %@(%@): %@",
|
||||
|
|
Loading…
Reference in a new issue