Don't ask for a project directory with an extension project or pcproj

when creating a new project in PC and do not arbitrarily strip
extensions from the project name.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@31706 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Wolfgang Lux 2010-12-04 08:08:50 +00:00
parent d334376dd6
commit 84dc841e64
2 changed files with 9 additions and 3 deletions

View file

@ -1,3 +1,10 @@
2010-12-04 Wolfgang Lux <wolfgang.lux@gmail.com>
* Framework/PCProjectManager.m (-newProject):
Improve Riccardo's previous patch. Don't ask for a new project
directory with an extension project or pcproj and do not
arbitrarily strip extensions from the project name.
2010-12-04 German Arias <german@xelalug.org>
* Modules/Projects/Application/PCAppProject.m:

View file

@ -800,18 +800,17 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
{
NSArray *files;
NSString *filePath;
NSArray *fileTypes = [NSArray arrayWithObjects:@"project",@"pcproj",nil];
NSString *projectType;
PCProject *project;
[self createProjectTypeAccessaryView];
files = [fileManager filesOfTypes:fileTypes
files = [fileManager filesOfTypes:nil
operation:PCSaveFileOperation
multiple:NO
title:@"New Project"
accView:projectTypeAccessaryView];
filePath = [[files objectAtIndex:0] stringByDeletingPathExtension];
filePath = [files objectAtIndex:0];
if (filePath != nil)
{
if ([filePath rangeOfString: @" "].location != NSNotFound ||