mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-03-17 08:01:24 +00:00
* Framework/PCProjectBrowser.m:
(click:): Do not call editor if subproject name selected. (fileNameIconImage): Set "FileProject" icon if subproject name selected. * Framework/PCProjectManager.m: Remove unused methods projectPath and selectedFileName. * Framework/PCFileManager.m: Add alert panels if operation ends with error. * Framework/PCMakefileFactory.m: Add alert panels on error of creating files. * Framework/PCProjectBuilder.m: Review all situations when alert panels should be opened. Panels text corrected according to OpenStep UIG. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27864 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6817d12843
commit
7ea7dc4063
11 changed files with 106 additions and 51 deletions
32
ChangeLog
32
ChangeLog
|
@ -1,3 +1,35 @@
|
|||
2009-02-15 Sergii Stoian <stoyan255@gmail.com>
|
||||
|
||||
* Framework/PCProjectBrowser.m:
|
||||
(click:): Do not call editor if subproject name selected.
|
||||
(fileNameIconImage): Set "FileProject" icon if subproject name selected.
|
||||
* Framework/PCProjectManager.m: Remove unused methods projectPath and
|
||||
selectedFileName.
|
||||
* Framework/PCFileManager.m: Add alert panels if operation ends with
|
||||
error.
|
||||
* Framework/PCMakefileFactory.m: Add alert panels on error of creating
|
||||
files.
|
||||
* Framework/PCProjectBuilder.m: Review all situations when alert panels
|
||||
should be opened. Panels text corrected according to OpenStep UIG.
|
||||
|
||||
2009-02-14 Sergii Stoian <stoyan255@gmail.com>
|
||||
|
||||
* PCMenuController.m:
|
||||
(showInfoPanel:): Use appController intead of [NSApp delegate].
|
||||
* GNUmakefile: Change version to 0.5.1.
|
||||
* Resources/Info-gnustep.plist: ditto.
|
||||
* Framework/PCProjectManager.m:
|
||||
(open): Move ordering front project window for here...
|
||||
(openProjectAt:): to here.
|
||||
* Framework/PCProjectBrowser.m:
|
||||
(nameOfSelectedCategory): Edit comment text.
|
||||
* Framework/PCLogController.m:
|
||||
(showPanel): Call makeKeyAndOrderFront instead of orderFront.
|
||||
* Headers/PCInfoController.[hm]:
|
||||
(showInfoWindow:): Get version info from Info-gnustep.plist.
|
||||
* PCPrefController.m:
|
||||
(showPanel:): Call makeKeyAndOrderFront instead of orderFront.
|
||||
|
||||
2009-02-14 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||
|
||||
* Modules/GNUmakefile (SUBPROJECTS): Removed
|
||||
|
|
|
@ -48,26 +48,28 @@ 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 [50% done]
|
||||
- Review all situations when dialogs must be popped up [75% done]
|
||||
- Rewrite Preferences (3rd party sections etc.) stoyan
|
||||
--- Project Editor ---------------------------------------------
|
||||
- Implement indentation stoyan
|
||||
- Implement interaction with Builder (errors, warnings) stoyan
|
||||
- undo inside editor ???
|
||||
- go to line ???
|
||||
- Implement interaction with Builder (errors, warnings) stoyan
|
||||
- Implement indentation stoyan
|
||||
- undo inside editor ???
|
||||
--- Project Builder --------------------------------------------
|
||||
- Finish parsing gcc output (make errors, etc.)
|
||||
- Implement interaction with Editor (errors, warnings) stoyan
|
||||
- Finish parsing gcc output (make errors, etc.)
|
||||
- Think about imlementing pending adding/removal of files ???
|
||||
- New icons. Need volonteers!!! ???
|
||||
- Split "Application GORM" and "Application Renaissance"
|
||||
project types ???
|
||||
- Add "Palette" project type ???
|
||||
- Add "Component" project type ???
|
||||
- New icons. Need volonteers!!! ???
|
||||
|
||||
ProjectCenter 0.7
|
||||
-----------------
|
||||
|
||||
- Add support for browsing 'Library' category entries ???
|
||||
- Add support for non-project files ???
|
||||
- An initial project wide find feature ???
|
||||
- Better integration with other tools (GORM) ???
|
||||
- CVS/SVN integration ???
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -150,13 +150,17 @@ static PCFileManager *_mgr = nil;
|
|||
directoryPath = [toFile stringByDeletingLastPathComponent];
|
||||
if ([self createDirectoriesIfNeededAtPath:directoryPath] == NO)
|
||||
{
|
||||
NSLog(@"PCFileManager: createDirectoriesIfNeededAtPath: == NO");
|
||||
NSRunAlertPanel(@"Copy File",
|
||||
@"Couldn't create directories at path %@",
|
||||
@"Ok",nil,nil, directoryPath);
|
||||
return NO;
|
||||
}
|
||||
|
||||
if ([fm copyPath:file toPath:toFile handler:self] == NO)
|
||||
{
|
||||
NSLog(@"PCFileManager: copyPath:toPath: == NO");
|
||||
NSRunAlertPanel(@"Copy File",
|
||||
@"Couldn't copy file %@ to %@",
|
||||
@"Ok",nil,nil, file, toFile);
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
@ -176,7 +180,7 @@ static PCFileManager *_mgr = nil;
|
|||
path = [directory stringByAppendingPathComponent:[file lastPathComponent]];
|
||||
|
||||
if (![self copyFile:file toFile:path])
|
||||
{
|
||||
{ // No need to open aler panel here
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
@ -234,6 +238,9 @@ static PCFileManager *_mgr = nil;
|
|||
{
|
||||
if ([fm removeFileAtPath:path handler:nil] == NO)
|
||||
{
|
||||
NSRunAlertPanel(@"Remove Directory",
|
||||
@"Couldn't remove empty directory at path %@",
|
||||
@"Ok",nil,nil, path);
|
||||
return NO;
|
||||
}
|
||||
path = [path stringByDeletingLastPathComponent];
|
||||
|
@ -257,7 +264,9 @@ static PCFileManager *_mgr = nil;
|
|||
path = [directory stringByAppendingPathComponent:file];
|
||||
if (![fm removeFileAtPath:path handler:nil])
|
||||
{
|
||||
NSLog(@"PCFileManager: removeFileAtPath: == NO");
|
||||
NSRunAlertPanel(@"Remove File",
|
||||
@"Couldn't remove file at path %@",
|
||||
@"Ok",nil,nil, path);
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
@ -310,6 +319,9 @@ static PCFileManager *_mgr = nil;
|
|||
}
|
||||
else
|
||||
{
|
||||
NSRunAlertPanel(@"Move File",
|
||||
@"Couldn't move file %@ to %@",
|
||||
@"Ok",nil,nil, file, directory);
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
|
|
@ -226,12 +226,15 @@ static PCMakefileFactory *_factory = nil;
|
|||
|
||||
// Write the new file to disc!
|
||||
mfl = [projectPath stringByAppendingPathComponent:@"GNUmakefile.preamble"];
|
||||
if ([mfp writeToFile:mfl atomically:YES])
|
||||
if (![mfp writeToFile:mfl atomically:YES])
|
||||
{
|
||||
return YES;
|
||||
NSRunAlertPanel(@"Create Makefile",
|
||||
@"Couldn't create %@",
|
||||
@"Ok",nil,nil, mfl);
|
||||
return NO;
|
||||
}
|
||||
|
||||
return NO;
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)createPostambleForProject:(PCProject *)project
|
||||
|
@ -246,7 +249,15 @@ static PCMakefileFactory *_factory = nil;
|
|||
postamble = [[project projectPath]
|
||||
stringByAppendingPathComponent:@"GNUmakefile.postamble"];
|
||||
|
||||
return [fm copyPath:template toPath:postamble handler:nil];
|
||||
if (![fm copyPath:template toPath:postamble handler:nil])
|
||||
{
|
||||
NSRunAlertPanel(@"Create Makefile",
|
||||
@"Couldn't create %@",
|
||||
@"Ok",nil,nil, postamble);
|
||||
return NO;
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)appendString:(NSString *)aString
|
||||
|
|
|
@ -188,8 +188,10 @@ NSString
|
|||
{
|
||||
[self updateProjectDict];
|
||||
|
||||
NSRunAlertPanel(@"Project updated!",
|
||||
@"The project file was converted from previous version!\nPlease make sure that every project attribute contain valid values!",
|
||||
NSRunAlertPanel(@"Open Project!",
|
||||
@"The project file was converted from previous version!\n"
|
||||
"Please make sure that every project attribute contain"
|
||||
" valid values!",
|
||||
@"OK",nil,nil);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -368,6 +368,7 @@ NSString *PCBrowserDidSetPathNotification = @"PCBrowserDidSetPathNotification";
|
|||
PCProject *activeProject;
|
||||
NSString *browserPath;
|
||||
NSString *filePath;
|
||||
NSString *fileName;
|
||||
|
||||
if (sender != browser)
|
||||
{
|
||||
|
@ -379,13 +380,14 @@ NSString *PCBrowserDidSetPathNotification = @"PCBrowserDidSetPathNotification";
|
|||
activeProject = [[project projectManager] activeProject];
|
||||
browserPath = [self path];
|
||||
filePath = [self pathToSelectedFile];
|
||||
fileName = [self nameOfSelectedFile];
|
||||
|
||||
NSLog(@"category: %@ forProject: %@",
|
||||
category, [activeProject projectName]);
|
||||
|
||||
if (filePath &&
|
||||
[filePath isEqualToString:browserPath] &&
|
||||
![category isEqualToString:[activeProject projectName]] &&
|
||||
![fileName isEqualToString:[activeProject projectName]] &&
|
||||
![[ud objectForKey:SeparateEditor] isEqualToString:@"YES"])
|
||||
{
|
||||
// NSLog(@"[click] category: %@ filePath: %@", category, filePath);
|
||||
|
@ -565,11 +567,12 @@ NSString *PCBrowserDidSetPathNotification = @"PCBrowserDidSetPathNotification";
|
|||
|
||||
- (NSImage *)fileNameIconImage
|
||||
{
|
||||
NSString *categoryName = nil;
|
||||
NSString *fileName = nil;
|
||||
NSString *fileExtension = nil;
|
||||
NSString *iconName = nil;
|
||||
NSImage *icon = nil;
|
||||
NSString *categoryName = nil;
|
||||
NSString *fileName = nil;
|
||||
NSString *fileExtension = nil;
|
||||
NSString *iconName = nil;
|
||||
NSImage *icon = nil;
|
||||
PCProject *activeProject = [[project projectManager] activeProject];
|
||||
|
||||
fileName = [self nameOfSelectedFile];
|
||||
if (fileName)
|
||||
|
@ -592,7 +595,9 @@ NSString *PCBrowserDidSetPathNotification = @"PCBrowserDidSetPathNotification";
|
|||
{
|
||||
iconName = [[NSString alloc] initWithString:@"MultiFiles"];
|
||||
}
|
||||
else if (!categoryName && !fileName) // Nothing selected
|
||||
// Nothing or subproject name selected
|
||||
else if ((!categoryName && !fileName) ||
|
||||
[fileName isEqualToString:[activeProject projectName]])
|
||||
{
|
||||
iconName = [[NSString alloc] initWithString:@"FileProject"];
|
||||
}
|
||||
|
|
|
@ -231,8 +231,9 @@
|
|||
|
||||
if (!makePath || ![[NSFileManager defaultManager] fileExistsAtPath:makePath])
|
||||
{
|
||||
NSRunAlertPanel(@"Build terminated",
|
||||
@"Build tool not found.\nFile \"%@\" doesn't exist!",
|
||||
NSRunAlertPanel(@"Project Build",
|
||||
@"Build tool '%@' not found.\n"
|
||||
"Build process terminated.",
|
||||
@"OK", nil, nil, makePath);
|
||||
return NO;
|
||||
}
|
||||
|
@ -373,9 +374,9 @@
|
|||
if ([[[[NSUserDefaults standardUserDefaults] dictionaryRepresentation]
|
||||
objectForKey:PromptOnClean] isEqualToString:@"YES"])
|
||||
{
|
||||
if (NSRunAlertPanel(@"Clean Project?",
|
||||
if (NSRunAlertPanel(@"Project Clean",
|
||||
@"Do you really want to clean project '%@'?",
|
||||
@"Yes", @"No", nil, [project projectName])
|
||||
@"Clean", @"Stop", nil, [project projectName])
|
||||
== NSAlertAlternateReturn)
|
||||
{
|
||||
[cleanButton setState:NSOffState];
|
||||
|
@ -454,7 +455,6 @@
|
|||
// --- Actions
|
||||
- (BOOL)prebuildCheck
|
||||
{
|
||||
// PCPrefController *prefs = [PCPrefController sharedPCPreferences];
|
||||
id <PCPreferences> prefs = [[project projectManager] prefController];
|
||||
NSString *buildDir = [prefs objectForKey:RootBuildDirectory];
|
||||
PCFileManager *pcfm = [PCFileManager defaultManager];
|
||||
|
@ -466,16 +466,23 @@
|
|||
// Checking prerequisites
|
||||
if ([project isProjectChanged])
|
||||
{
|
||||
if (NSRunAlertPanel(@"Project Changed!",
|
||||
@"Should it be saved first?",
|
||||
@"Yes", @"No", nil) == NSAlertDefaultReturn)
|
||||
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
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Synchronize PC.project and generated files just for case
|
||||
// Synchronize PC.project and generate files
|
||||
[project save];
|
||||
}
|
||||
|
||||
|
@ -503,9 +510,6 @@
|
|||
NSPipe *logPipe;
|
||||
NSPipe *errorPipe;
|
||||
|
||||
// TODO: Support build options!!!
|
||||
// NSDictionary *optionDict = [project buildOptions];
|
||||
|
||||
// Checking build conditions
|
||||
if ([self prebuildCheck] == NO)
|
||||
{
|
||||
|
|
|
@ -74,7 +74,6 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
|
|||
object:nil];
|
||||
|
||||
fileManager = [[PCFileManager alloc] initWithProjectManager:self];
|
||||
|
||||
}
|
||||
|
||||
return self;
|
||||
|
@ -335,16 +334,6 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
|
|||
return findPanel;
|
||||
}
|
||||
|
||||
- (NSString *)projectPath
|
||||
{
|
||||
return [activeProject projectPath];
|
||||
}
|
||||
|
||||
- (NSString *)selectedFileName
|
||||
{
|
||||
return [[activeProject projectBrowser] nameOfSelectedFile];
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// ==== Project management
|
||||
// ============================================================================
|
||||
|
@ -771,7 +760,7 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
|
|||
{
|
||||
NSRunAlertPanel(@"Save Project",
|
||||
@"Couldn't save project %@!",
|
||||
@"OK", nil, nil, [activeProject projectName]);
|
||||
@"OK", nil, nil, [rootProject projectName]);
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
|
|
@ -119,15 +119,13 @@ extern NSString *PCActiveProjectDidChangeNotification;
|
|||
- (NSPanel *)buildPanel;
|
||||
- (NSPanel *)launchPanel;
|
||||
- (NSPanel *)projectFinderPanel;
|
||||
- (NSString *)projectPath;
|
||||
- (NSString *)selectedFileName;
|
||||
|
||||
// ============================================================================
|
||||
// ==== Project management
|
||||
// ============================================================================
|
||||
|
||||
// Returns all currently loaded projects. They are stored with their absolut
|
||||
// paths as the keys.
|
||||
// Returns all currently loaded projects. They are stored with their absolute
|
||||
// paths as keys.
|
||||
- (NSMutableDictionary *)loadedProjects;
|
||||
- (PCProject *)activeProject;
|
||||
- (PCProject *)rootActiveProject;
|
||||
|
|
Loading…
Reference in a new issue