mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-03-18 00:21:22 +00:00
PCProject bugfixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@19661 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
aacf8a79b1
commit
6781fde41f
13 changed files with 74 additions and 81 deletions
|
@ -104,19 +104,19 @@
|
|||
[contentBox display];
|
||||
}
|
||||
|
||||
PCLogInfo(self, @"orderFront: %@ -> %@",
|
||||
builderView, [builderView superview]);
|
||||
/* PCLogInfo(self, @"orderFront: %@ -> %@",
|
||||
builderView, [builderView superview]);*/
|
||||
|
||||
[super orderFront:self];
|
||||
}
|
||||
|
||||
- (void)close
|
||||
{
|
||||
PCLogInfo(self, @"close: %@", [contentBox contentView]);
|
||||
// PCLogInfo(self, @"close: %@", [contentBox contentView]);
|
||||
|
||||
[contentBox setContentView:emptyBox];
|
||||
|
||||
PCLogInfo(self, @"close: %@", [contentBox contentView]);
|
||||
// PCLogInfo(self, @"close: %@", [contentBox contentView]);
|
||||
|
||||
[super close];
|
||||
}
|
||||
|
@ -132,8 +132,8 @@
|
|||
|
||||
currentProject = rootProject;
|
||||
|
||||
PCLogInfo(self, @"activeProjectDidChange to: %@",
|
||||
[rootProject projectName]);
|
||||
/* PCLogInfo(self, @"activeProjectDidChange to: %@",
|
||||
[rootProject projectName]);*/
|
||||
|
||||
if (!rootProject)
|
||||
{
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
NSRect rect;
|
||||
float windowWidth;
|
||||
|
||||
PCLogInfo(self, @"[_createWindow]");
|
||||
// PCLogInfo(self, @"[_createWindow]");
|
||||
|
||||
style = NSTitledWindowMask
|
||||
| NSClosableWindowMask
|
||||
|
|
|
@ -209,13 +209,13 @@ static PCFileManager *_mgr = nil;
|
|||
NSDictionary *theCreator = [creators objectForKey:fileType];
|
||||
NSString *key = [theCreator objectForKey:@"ProjectKey"];
|
||||
|
||||
PCLogInfo(self, @"[createFile] %@", fileName);
|
||||
// PCLogInfo(self, @"[createFile] %@", fileName);
|
||||
|
||||
path = [projectManager fileManager:self
|
||||
willCreateFile:fileName
|
||||
withKey:key];
|
||||
|
||||
PCLogInfo(self, @"creating file at %@", path);
|
||||
// PCLogInfo(self, @"creating file at %@", path);
|
||||
|
||||
// Create file
|
||||
if (path)
|
||||
|
|
|
@ -104,19 +104,19 @@
|
|||
[contentBox display];
|
||||
}
|
||||
|
||||
PCLogInfo(self, @"orderFront: %@ -> %@",
|
||||
launcherView, [launcherView superview]);
|
||||
/* PCLogInfo(self, @"orderFront: %@ -> %@",
|
||||
launcherView, [launcherView superview]);*/
|
||||
|
||||
[super orderFront:self];
|
||||
}
|
||||
|
||||
- (void)close
|
||||
{
|
||||
PCLogInfo(self, @"close: %@", [contentBox contentView]);
|
||||
// PCLogInfo(self, @"close: %@", [contentBox contentView]);
|
||||
|
||||
[contentBox setContentView:emptyBox];
|
||||
|
||||
PCLogInfo(self, @"close: %@", [contentBox contentView]);
|
||||
// PCLogInfo(self, @"close: %@", [contentBox contentView]);
|
||||
|
||||
[super close];
|
||||
}
|
||||
|
|
|
@ -210,9 +210,9 @@ extern NSString *PCProjectDictDidSaveNotification;
|
|||
- (BOOL)hasChildrenAtCategoryPath:(NSString *)keyPath;
|
||||
|
||||
- (NSString *)rootCategoryForCategoryPath:(NSString *)categoryPath;
|
||||
- (NSString *)categoryForCategoryPath:(NSString *)categoryPath;
|
||||
//- (NSString *)categoryForCategoryPath:(NSString *)categoryPath;
|
||||
- (NSString *)keyForRootCategoryInCategoryPath:(NSString *)categoryPath;
|
||||
- (NSString *)keyForCategoryPath:(NSString *)categoryPath;
|
||||
//- (NSString *)keyForCategoryPath:(NSString *)categoryPath;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@ NSString
|
|||
|
||||
- (BOOL)close:(id)sender
|
||||
{
|
||||
PCLogInfo(self, @"Closing %@ project", projectName);
|
||||
// PCLogInfo(self, @"Closing %@ project", projectName);
|
||||
|
||||
// Save visible windows and panels positions to project dictionary
|
||||
if (isSubproject == NO)
|
||||
|
@ -283,7 +283,7 @@ NSString
|
|||
[projectFileDict setObject:windows forKey:@"PC_WINDOWS"];
|
||||
[projectFileDict writeToFile:projectFile atomically:YES];
|
||||
|
||||
PCLogInfo(self, @"Windows and geometries saved");
|
||||
// PCLogInfo(self, @"Windows and geometries saved");
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
@ -688,7 +688,7 @@ NSString
|
|||
complementaryDir = [self dirForCategoryKey:complementaryKey];
|
||||
}
|
||||
|
||||
PCLogInfo(self, @"{%@} {addAndCopyFiles} %@", projectName, fileList);
|
||||
// PCLogInfo(self, @"{%@} {addAndCopyFiles} %@", projectName, fileList);
|
||||
|
||||
// Validate files
|
||||
while ((file = [fileEnum nextObject]))
|
||||
|
@ -711,7 +711,7 @@ NSString
|
|||
}
|
||||
}
|
||||
|
||||
PCLogInfo(self, @"{addAndCopyFiles} %@", fileList);
|
||||
// PCLogInfo(self, @"{addAndCopyFiles} %@", fileList);
|
||||
|
||||
// Copy files
|
||||
if (![key isEqualToString:PCLibraries]) // Don't copy libraries
|
||||
|
@ -724,7 +724,7 @@ NSString
|
|||
return NO;
|
||||
}
|
||||
|
||||
PCLogInfo(self, @"Complementary files: %@", complementaryFiles);
|
||||
// PCLogInfo(self, @"Complementary files: %@", complementaryFiles);
|
||||
// Complementaries
|
||||
if (![fileManager copyFiles:complementaryFiles
|
||||
intoDirectory:complementaryDir])
|
||||
|
@ -835,8 +835,8 @@ NSString
|
|||
}
|
||||
}
|
||||
|
||||
PCLogInfo(self, @"{%@} move %@ to %@ category: %@",
|
||||
projectName, fromPath, toPath, selectedCategory);
|
||||
/* PCLogInfo(self, @"{%@} move %@ to %@ category: %@",
|
||||
projectName, fromPath, toPath, selectedCategory);*/
|
||||
|
||||
if ([fm movePath:fromPath toPath:toPath handler:nil] == YES)
|
||||
{
|
||||
|
@ -951,8 +951,14 @@ NSString
|
|||
// Key - the uppercase names located in PC.roject, e.g. "CLASS_FILES"
|
||||
- (NSString *)keyForCategory:(NSString *)category
|
||||
{
|
||||
int index = [rootCategories indexOfObject:category];
|
||||
int index = -1;
|
||||
|
||||
if (![rootCategories containsObject:category])
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
index = [rootCategories indexOfObject:category];
|
||||
return [rootKeys objectAtIndex:index];
|
||||
}
|
||||
|
||||
|
@ -1145,8 +1151,8 @@ NSString
|
|||
// Subproject in project but not loaded
|
||||
if ([[projectDict objectForKey:PCSubprojects] containsObject:name])
|
||||
{
|
||||
PCLogInfo(self, @"{%@}Searching for loaded subproject: %@",
|
||||
projectName, name);
|
||||
/* PCLogInfo(self, @"{%@}Searching for loaded subproject: %@",
|
||||
projectName, name);*/
|
||||
// Search for subproject with name among loaded subprojects
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
|
@ -1165,8 +1171,8 @@ NSString
|
|||
spFile = [projectPath stringByAppendingPathComponent:name];
|
||||
spFile = [spFile stringByAppendingPathExtension:@"subproj"];
|
||||
spFile = [spFile stringByAppendingPathComponent:@"PC.project"];
|
||||
PCLogInfo(self, @"Not found! Load subproject: %@ at path: %@",
|
||||
name, spFile);
|
||||
/* PCLogInfo(self, @"Not found! Load subproject: %@ at path: %@",
|
||||
name, spFile);*/
|
||||
sp = [projectManager loadProjectAt:spFile];
|
||||
if (sp)
|
||||
{
|
||||
|
@ -1249,8 +1255,8 @@ NSString
|
|||
|
||||
pathArray = [categoryPath componentsSeparatedByString:@"/"];
|
||||
|
||||
PCLogInfo(self, @"{%@}{contentAtCategoryPath:} %@",
|
||||
projectName, categoryPath);
|
||||
/* PCLogInfo(self, @"{%@}{contentAtCategoryPath:} %@",
|
||||
projectName, categoryPath);*/
|
||||
|
||||
// Click on /Category
|
||||
if ([pathArray count] == 2)
|
||||
|
@ -1302,22 +1308,16 @@ NSString
|
|||
return [activeProject hasChildrenAtCategoryPath:categoryPath];
|
||||
}
|
||||
|
||||
PCLogInfo(self, @"{%@} hasChildrenAtCategoryPath: %@",
|
||||
[self projectName], categoryPath);
|
||||
|
||||
listEntry = [[categoryPath componentsSeparatedByString:@"/"] lastObject];
|
||||
if ([rootCategories containsObject:listEntry])
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
category = [projectBrowser nameOfSelectedCategory];
|
||||
categoryKey = [self keyForCategory:category];
|
||||
if ([categoryKey isEqualToString:PCSubprojects]
|
||||
&& [[projectDict objectForKey:PCSubprojects] containsObject:listEntry])
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
if ([[projectDict objectForKey:PCSubprojects] containsObject:listEntry])
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
@ -1336,7 +1336,7 @@ NSString
|
|||
return [pathComponents objectAtIndex:1];
|
||||
}
|
||||
|
||||
- (NSString *)categoryForCategoryPath:(NSString *)categoryPath
|
||||
/*- (NSString *)categoryForCategoryPath:(NSString *)categoryPath
|
||||
{
|
||||
NSString *category = nil;
|
||||
NSString *key = nil;
|
||||
|
@ -1375,7 +1375,7 @@ NSString
|
|||
}
|
||||
|
||||
return category;
|
||||
}
|
||||
}*/
|
||||
|
||||
- (NSString *)keyForRootCategoryInCategoryPath:(NSString *)categoryPath
|
||||
{
|
||||
|
@ -1392,16 +1392,16 @@ NSString
|
|||
category = [self rootCategoryForCategoryPath:categoryPath];
|
||||
key = [self keyForCategory:category];
|
||||
|
||||
PCLogInfo(self, @"{%@}(keyForRootCategoryInCategoryPath): %@ key:%@",
|
||||
projectName, categoryPath, key);
|
||||
/* PCLogInfo(self, @"{%@}(keyForRootCategoryInCategoryPath): %@ key:%@",
|
||||
projectName, categoryPath, key);*/
|
||||
|
||||
return key;
|
||||
}
|
||||
|
||||
- (NSString *)keyForCategoryPath:(NSString *)categoryPath
|
||||
/*- (NSString *)keyForCategoryPath:(NSString *)categoryPath
|
||||
{
|
||||
return [self keyForCategory:[self categoryForCategoryPath:categoryPath]];
|
||||
}
|
||||
}*/
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -57,6 +57,7 @@ NSString *PCBrowserDidSetPathNotification = @"PCBrowserDidSetPathNotification";
|
|||
[browser setTarget:self];
|
||||
[browser setAction:@selector(click:)];
|
||||
[browser setDoubleAction:@selector(doubleClick:)];
|
||||
[browser setRefusesFirstResponder:YES];
|
||||
[browser loadColumnZero];
|
||||
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
|
@ -236,15 +237,7 @@ NSString *PCBrowserDidSetPathNotification = @"PCBrowserDidSetPathNotification";
|
|||
return YES;
|
||||
}
|
||||
|
||||
// HACK!!! NSBrowser needs fixing!!!
|
||||
while ((selectedColumn = [browser selectedColumn]) >= 0)
|
||||
{
|
||||
columnMatrix = [browser matrixInColumn:selectedColumn];
|
||||
[columnMatrix deselectAllCells];
|
||||
}
|
||||
// End of HACK
|
||||
|
||||
PCLogInfo(self, @"[setPath]: %@", path);
|
||||
// PCLogInfo(self, @"[setPath]: %@", path);
|
||||
|
||||
res = [browser setPath:path];
|
||||
|
||||
|
@ -340,8 +333,8 @@ NSString *PCBrowserDidSetPathNotification = @"PCBrowserDidSetPathNotification";
|
|||
filePath = [activeProject dirForCategoryKey:key];
|
||||
filePath = [filePath stringByAppendingPathComponent:fileName];
|
||||
|
||||
PCLogInfo(self, @"[click] category: %@ filePath: %@",
|
||||
category, filePath);
|
||||
/* PCLogInfo(self, @"[click] category: %@ filePath: %@",
|
||||
category, filePath);*/
|
||||
|
||||
if ([activeProject isEditableCategory:category]
|
||||
&& [fm fileExistsAtPath:filePath isDirectory:&isDir] && !isDir)
|
||||
|
|
|
@ -357,7 +357,7 @@
|
|||
{
|
||||
NSAssert(aProject, @"No project specified!");
|
||||
|
||||
PCLogInfo(self, @"initWithProject %@", [aProject projectName]);
|
||||
// PCLogInfo(self, @"initWithProject %@", [aProject projectName]);
|
||||
|
||||
if ((self = [super init]))
|
||||
{
|
||||
|
@ -390,8 +390,8 @@
|
|||
[buildArgs release];
|
||||
[makePath release];
|
||||
|
||||
PCLogInfo(self, @"componentView RC: %i", [componentView retainCount]);
|
||||
PCLogInfo(self, @"RC: %i", [self retainCount]);
|
||||
// PCLogInfo(self, @"componentView RC: %i", [componentView retainCount]);
|
||||
// PCLogInfo(self, @"RC: %i", [self retainCount]);
|
||||
[componentView release];
|
||||
|
||||
[super dealloc];
|
||||
|
|
|
@ -774,8 +774,8 @@
|
|||
return;
|
||||
}
|
||||
|
||||
PCLogInfo(self, @"{%@} file name changed from: %@ to: %@",
|
||||
[project projectName], fileName, [fileNameField stringValue]);
|
||||
/* PCLogInfo(self, @"{%@} file name changed from: %@ to: %@",
|
||||
[project projectName], fileName, [fileNameField stringValue]);*/
|
||||
|
||||
if ([project renameFile:fileName toFile:[fileNameField stringValue]] == NO)
|
||||
{
|
||||
|
|
|
@ -245,7 +245,7 @@ enum {
|
|||
fp = [fp stringByAppendingPathComponent:pn];
|
||||
fp = [fp stringByAppendingPathComponent:dp];
|
||||
|
||||
PCLogInfo(self, @"debug: %@", fp);
|
||||
// PCLogInfo(self, @"debug: %@", fp);
|
||||
|
||||
if ([fm isExecutableFileAtPath:fp] == NO)
|
||||
{
|
||||
|
|
|
@ -226,7 +226,7 @@
|
|||
- (void)doubleClick:(id)sender
|
||||
{
|
||||
// TODO: Open separate editor window for file
|
||||
PCLogInfo(self, @"ProjectLoadedFiles doubleClick received");
|
||||
// PCLogInfo(self, @"ProjectLoadedFiles doubleClick received");
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
@ -245,7 +245,7 @@
|
|||
return;
|
||||
}
|
||||
|
||||
PCLogInfo(self, @"File did open in project %@", [project projectName]);
|
||||
// PCLogInfo(self, @"File did open in project %@", [project projectName]);
|
||||
|
||||
filePath = [editor path];
|
||||
|
||||
|
|
|
@ -366,7 +366,7 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
|
|||
{
|
||||
NSUserDefaults *defs = [NSUserDefaults standardUserDefaults];
|
||||
|
||||
PCLogInfo(self, @"saveAllProjectsIfNeeded");
|
||||
// PCLogInfo(self, @"saveAllProjectsIfNeeded");
|
||||
|
||||
// If this method was called not by NSTimer, check if we should save projects
|
||||
if ([[defs objectForKey:SaveOnQuit] isEqualToString:@"YES"])
|
||||
|
@ -702,7 +702,7 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
|
|||
return NO;
|
||||
}
|
||||
|
||||
PCLogInfo(self, @"save root project: %@", [rootProject projectName]);
|
||||
// PCLogInfo(self, @"save root project: %@", [rootProject projectName]);
|
||||
|
||||
// Save PC.project and the makefiles!
|
||||
if ([rootProject save] == NO)
|
||||
|
@ -725,8 +725,8 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
|
|||
|
||||
files = [fileManager filesForAdd];
|
||||
|
||||
PCLogInfo(self, @"[addProjectFiles] %@ to category: %@ of project %@",
|
||||
files, categoryKey, [activeProject projectName]);
|
||||
/* PCLogInfo(self, @"[addProjectFiles] %@ to category: %@ of project %@",
|
||||
files, categoryKey, [activeProject projectName]);*/
|
||||
|
||||
// No files was selected
|
||||
if (!files)
|
||||
|
@ -772,9 +772,9 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
|
|||
project = activeProject;
|
||||
}
|
||||
|
||||
PCLogInfo(self, @"%@: %@ from %@", removeString, files, directory);
|
||||
/* PCLogInfo(self, @"%@: %@ from %@", removeString, files, directory);
|
||||
PCLogInfo(self, @"[removeProjectFiles]:%@ KEY:%@",
|
||||
[activeProject projectName], categoryKey);
|
||||
[activeProject projectName], categoryKey);*/
|
||||
|
||||
if (files)
|
||||
{
|
||||
|
@ -905,7 +905,7 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
|
|||
NSEnumerator *enumerator = [loadedProjects objectEnumerator];
|
||||
NSUserDefaults *defs = [NSUserDefaults standardUserDefaults];
|
||||
|
||||
PCLogInfo(self, @"loaded %i projects", [loadedProjects count]);
|
||||
// PCLogInfo(self, @"loaded %i projects", [loadedProjects count]);
|
||||
|
||||
while ([loadedProjects count] > 0)
|
||||
{
|
||||
|
@ -1093,7 +1093,7 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
|
|||
|
||||
- (BOOL)newSubproject
|
||||
{
|
||||
PCLogInfo(self, @"newSubproject");
|
||||
// PCLogInfo(self, @"newSubproject");
|
||||
|
||||
if (!nsPanel)
|
||||
{
|
||||
|
@ -1192,7 +1192,7 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
|
|||
[subproject setSuperProject:activeProject];
|
||||
[subproject setProjectManager:self];
|
||||
|
||||
PCLogInfo(self, @"{createSubproject} add to %@", [activeProject projectName]);
|
||||
// PCLogInfo(self, @"{createSubproject} add to %@", [activeProject projectName]);
|
||||
[activeProject addSubproject:subproject];
|
||||
|
||||
return subproject;
|
||||
|
@ -1240,7 +1240,7 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
|
|||
}
|
||||
}
|
||||
|
||||
PCLogInfo(self, @"{addSubproject} %@", files);
|
||||
// PCLogInfo(self, @"{addSubproject} %@", files);
|
||||
|
||||
if (![fileManager copyFiles:files
|
||||
intoDirectory:[activeProject projectPath]])
|
||||
|
@ -1255,7 +1255,7 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
|
|||
spDict = [NSDictionary dictionaryWithContentsOfFile:pcProject];
|
||||
spName = [spDict objectForKey:PCProjectName];
|
||||
|
||||
PCLogInfo(self, @"{addSubproject} dir: %@ file: %@", spDir, pcProject);
|
||||
// PCLogInfo(self, @"{addSubproject} dir: %@ file: %@", spDir, pcProject);
|
||||
|
||||
[activeProject addSubprojectWithName:spName];
|
||||
}
|
||||
|
|
|
@ -266,7 +266,7 @@
|
|||
|
||||
pcWindows = [[project projectDict] objectForKey:@"PC_WINDOWS"];
|
||||
windowFrame = [pcWindows objectForKey:@"ProjectWindow"];
|
||||
PCLogInfo(self, @"window frame %@", windowFrame);
|
||||
// PCLogInfo(self, @"window frame %@", windowFrame);
|
||||
if (windowFrame != nil)
|
||||
{
|
||||
PCLogStatus(self, @"PCProjectWindow: set frame from project");
|
||||
|
@ -547,7 +547,7 @@
|
|||
NSPanel *panel = [[project projectManager] loadedFilesPanel];
|
||||
NSScrollView *componentView = [[project projectLoadedFiles] componentView];
|
||||
|
||||
PCLogInfo(self, @"showProjectLoadedFiles");
|
||||
// PCLogInfo(self, @"showProjectLoadedFiles");
|
||||
|
||||
if ([self hasLoadedFilesView])
|
||||
{
|
||||
|
@ -840,7 +840,7 @@
|
|||
|
||||
- (void)makeKeyAndOrderFront:(id)sender
|
||||
{
|
||||
PCLogInfo(self, @"makeKeyAndOrderFront sender: %@", [sender className]);
|
||||
// PCLogInfo(self, @"makeKeyAndOrderFront sender: %@", [sender className]);
|
||||
[projectWindow makeKeyAndOrderFront:nil];
|
||||
}
|
||||
|
||||
|
@ -896,8 +896,8 @@
|
|||
[projectWindow makeMainWindow];
|
||||
// [projectWindow makeFirstResponder:(NSResponder *)firstResponder];
|
||||
|
||||
PCLogInfo(self, @"windowDidBecomeKey: activeSubproject %@",
|
||||
[[project activeSubproject] projectName]);
|
||||
/* PCLogInfo(self, @"windowDidBecomeKey: activeSubproject %@",
|
||||
[[project activeSubproject] projectName]);*/
|
||||
|
||||
if ([[project projectManager] rootActiveProject] != project)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue