Add Files fixes

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@19574 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Sergii Stoian 2004-06-21 20:35:37 +00:00
parent 5137d57150
commit 9084d3fa4b
10 changed files with 46 additions and 68 deletions

View file

@ -1,4 +1,4 @@
Announcement
ANNOUNCE
************
This is version 0.4.0 of ProjectCenter.

View file

@ -1,5 +1,13 @@
2004-06-21 Serg Stoyan <stoyan255@ukr.net>
* Library/PCFileManager.m:
(panel:shouldShowFilename:): Fix filtering out files already
included in project. Optimized.
2004-06-20 Serg Stoyan <stoyan255@ukr.net>
* Release 0.4.0.
* Library/PCProjectWindow.m:
(activeProjectDidChange:): Take into account subprojects of
subprojects.

View file

@ -8,11 +8,10 @@ GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_SYSTEM_ROOT)
#
# Main application
#
VERSION = 0.4.1pre
PACKAGE_NAME = ProjectCenter
APP_NAME = ProjectCenter
ProjectCenter_APPLICATION_ICON = Images/ProjectCenter.tiff
VERSION = 0.4
COMPRESSION = gzip
#
# Subprojects

View file

@ -29,13 +29,13 @@
#
# Additional flags to pass to the preprocessor
ADDITIONAL_CPPFLAGS += -Wall
ADDITIONAL_CPPFLAGS +=
# Additional flags to pass to the Objective-C compiler
ADDITIONAL_OBJCFLAGS += -Wall -Werror -DDEVELOPMENT
ADDITIONAL_OBJCFLAGS +=
# Additional flags to pass to the C compiler
ADDITIONAL_CFLAGS += -Wall
ADDITIONAL_CFLAGS +=
# Additional include directories the compiler should search
ADDITIONAL_INCLUDE_DIRS += -I./Library
@ -55,9 +55,3 @@ ADDITIONAL_TOOL_LIBS +=
# Additional directories to be created during installation
ADDITIONAL_INSTALL_DIRS +=
#
# Local configuration
#

View file

@ -38,13 +38,13 @@
#
# Additional flags to pass to the preprocessor
ADDITIONAL_CPPFLAGS += -Wall -Werror
ADDITIONAL_CPPFLAGS +=
# Additional flags to pass to the Objective-C compiler
ADDITIONAL_OBJCFLAGS += -Wall -Werror -DDEVELOPMENT
ADDITIONAL_OBJCFLAGS +=
# Additional flags to pass to the C compiler
ADDITIONAL_CFLAGS += -Wall -Werror
ADDITIONAL_CFLAGS +=
# Additional include directories the compiler should search
ADDITIONAL_INCLUDE_DIRS += -I../

View file

@ -84,7 +84,9 @@
- (void)dealloc
{
#ifdef DEVELOPMENT
NSLog(@"PCBuildPanel: dealloc");
#endif
[[NSNotificationCenter defaultCenter] removeObserver:self];

View file

@ -459,8 +459,6 @@
- (BOOL)closeFile:(id)sender save:(BOOL)save
{
NSLog(@"PCEditor: closeFile");
if ((save == NO) || [self editorShouldClose])
{
// Close window first if visible

View file

@ -434,57 +434,34 @@ static PCFileManager *_mgr = nil;
- (BOOL)panel:(id)sender shouldShowFilename:(NSString *)filename
{
NSFileManager *fileManager = [NSFileManager defaultManager];
PCProject *project = [projectManager activeProject];
BOOL isDir;
PCProject *project = nil;
NSArray *fileTypes = nil;
NSString *fileType = nil;
NSString *categoryKey = nil;
BOOL isDir;
if (sender != addFilesPanel)
{
// This is not "Add Files" panel (Open... or Save...)
return YES;
}
if (sender == addFilesPanel
&& [fileManager fileExistsAtPath:filename isDirectory:&isDir]
&& !isDir)
{
project = [projectManager activeProject];
fileType = [fileTypePopup titleOfSelectedItem];
categoryKey = [project keyForCategory:fileType];
fileTypes = [project fileTypesForCategoryKey:categoryKey];
// Wrong file extension
if (fileTypes
&& ![fileTypes containsObject:[filename pathExtension]])
{
return NO;
}
// File is already in project
if (![project doesAcceptFile:filename forKey:categoryKey])
{
return NO;
}
}
// Directories must be shown
if ([fileManager fileExistsAtPath:filename isDirectory:&isDir] && isDir)
{
return YES;
}
if (!(fileType = [fileTypePopup titleOfSelectedItem]))
{
PCLogWarning(self, @"Selected File type is nil!");
return YES;
}
categoryKey = [project keyForCategory:fileType];
fileTypes = [project fileTypesForCategoryKey:categoryKey];
if (fileTypes == nil)
{
PCLogWarning(self,
@"Project file types is nil! Category: %@", categoryKey);
return YES;
}
if (fileTypes && [fileTypes containsObject:[filename pathExtension]])
{
NSString *filePath;
NSString *projectPath;
filePath = [[filename stringByDeletingLastPathComponent]
stringByResolvingSymlinksInPath];
projectPath = [[project projectPath] stringByResolvingSymlinksInPath];
if ([filePath isEqualToString:projectPath])
{
return NO;
}
return YES;
}
return NO;
return YES;
}
// Test if we should accept file name selected or entered

View file

@ -1,9 +1,9 @@
#
# Options common to bundles
#
ADDITIONAL_OBJCFLAGS += -Wall -Werror
ADDITIONAL_CFLAGS += -Wall
ADDITIONAL_CPPFLAGS += -Wall
ADDITIONAL_OBJCFLAGS +=
ADDITIONAL_CFLAGS +=
ADDITIONAL_CPPFLAGS +=
ADDITIONAL_INCLUDE_DIRS += -I../../Library
ADDITIONAL_LIB_DIRS += -L../../Library/$(GNUSTEP_OBJ_DIR)

View file

@ -3,8 +3,8 @@
ApplicationName = "ProjectCenter";
ApplicationDescription = "GNUstep IDE";
ApplicationIcon = "ProjectCenter.tiff";
ApplicationRelease = "0.4.0";
FullVersionID = "ProjectCenter 0.4.0";
ApplicationRelease = "0.4.1pre";
FullVersionID = "development";
Authors = (
"Philippe C.D. Robert",
"Serg Stoyan",