removed bunches of duplicate calls, retains and releases.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@13543 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2002-04-26 03:12:50 +00:00
parent e72a9d2f0c
commit e56b2c6901
16 changed files with 59 additions and 35 deletions

View file

@ -1,3 +1,8 @@
2002-04-25 Adam Fedor <fedor@gnu.org>
* PCAppProject.m ([PCAppProject -init]): Remove call to _iniUI -
already in [PCProject -init].
2002-03-01 14:30 probert
* PCAppProject.m: Removed old include statements.

View file

@ -136,7 +136,6 @@
PCClasses,@"Classes",
nil] retain];
[self _initUI];
}
return self;
}

View file

@ -1,3 +1,8 @@
2002-04-25 Adam Fedor <fedor@gnu.org>
* PCBundleProject.m (-init): Remove call to _iniUI -
already in [PCProject -init].
2002-03-01 15:22 probert
* PCBundleProj.m: Fix to avoid warning

View file

@ -95,7 +95,6 @@
PCClasses,@"Classes",
nil] retain];
[self _initUI];
}
return self;
}

View file

@ -1,3 +1,8 @@
2002-04-25 Adam Fedor <fedor@gnu.org>
* PCGormProject.m (-init): Remove call to _iniUI -
already in [PCProject -init].
2002-03-01 15:38 probert
* GNUmakefile, PCGormMakefileFactory.h, PCGormMakefileFactory.m,

View file

@ -133,7 +133,6 @@
PCClasses,@"Classes",
nil] retain];
[self _initUI];
}
return self;
}

View file

@ -1,8 +1,9 @@
2002-04-25 Adam Fedor <fedor@gnu.org>
* PCHistoryController.m (-setBrowser:): ASSIGN browser
(-dealloc): Release it.
* PCBrowserController.m: Idem.
* PCHistoryController.m (-click:): Don't send notification.
* PCProject.m: Don't retain or release projectManger.
(-dealloc): Don't release window (releasedWhenClosed).
2002-03-03 14:47 probert

View file

@ -10,11 +10,14 @@
include $(GNUSTEP_MAKEFILES)/common.make
include Version
#
#
# Subprojects
#
#
# Library
#
@ -24,20 +27,20 @@ LIBRARY_VAR=PROJECTCENTER
LIBRARY_NAME=libProjectCenter
libProjectCenter_HEADER_FILES_DIR=.
libProjectCenter_HEADER_FILES_INSTALL_DIR=/ProjectCenter
ADDITIONAL_INCLUDE_DIRS = -I..
srcdir = .
GNUSTEP_INSTALLATION_DIR=$(GNUSTEP_SYSTEM_ROOT)
PROJECTCENTER_INSTALLATION_DIR=$(GNUSTEP_INSTALLATION_DIR)
PROJECTCENTER_INSTALL_PREFIX=$(GNUSTEP_INSTALLATION_DIR)
ADDITIONAL_INCLUDE_DIRS = -I..
srcdir = .
#
#
# Additional libraries
#
libProjectCenter_LIBRARIES_DEPEND_UPON += -lgnustep-gui
#
# Header files
#
@ -73,7 +76,6 @@ PCHistoryController.h \
PCMakefileFactory.h
#
# Class files
#
@ -99,7 +101,6 @@ PCHistoryController.m \
PCMakefileFactory.m
#
# C files
#

View file

@ -34,8 +34,6 @@
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
RELEASE(browser);
[super dealloc];
}
@ -122,7 +120,7 @@
- (void)setBrowser:(NSBrowser *)aBrowser
{
ASSIGN(browser, aBrowser);
browser = aBrowser;
[browser setTitled:NO];

View file

@ -30,7 +30,6 @@
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
RELEASE(browser);
RELEASE(editedFiles);
[super dealloc];
@ -42,8 +41,11 @@
[project browserDidClickFile:file category:nil];
[[NSNotificationCenter defaultCenter] postNotificationName:@"FileBecomesEditedNotification" object:file];
//[browser selectRow:0 inColumn:0];
/* This causes a problem because we try to reloadColumn on the browser
in the middle of someone clicking in it (-click: sends notification
which is received by histortDidChange:, etc. Is there a better
way around this? */
//[[NSNotificationCenter defaultCenter] postNotificationName:@"FileBecomesEditedNotification" object:file];
AUTORELEASE(file);
}
@ -52,7 +54,7 @@
{
NSAssert(browser==nil,@"The browser is already set!");
ASSIGN(browser, aBrowser);
browser = aBrowser;
[browser setTitled:NO];

View file

@ -465,7 +465,6 @@
RELEASE(projectName);
RELEASE(projectPath);
RELEASE(projectDict);
RELEASE(projectManager);
if( projectBuilder) RELEASE(projectBuilder);
if( projectDebugger) RELEASE(projectDebugger);
@ -473,7 +472,6 @@
RELEASE(historyController);
RELEASE(browserController);
RELEASE(projectWindow);
RELEASE(buildTargetPanel);
RELEASE(buildTargetHostField);
@ -585,8 +583,9 @@
- (void)setProjectBuilder:(id<ProjectBuilder,NSObject>)aBuilder
{
AUTORELEASE(projectManager);
projectManager = RETAIN(aBuilder);
// This is our owner, don't retain.
//projectManager = aBuilder;
ASSIGN(projectManager, aBuilder);
}
- (id<ProjectBuilder>)projectBuilder
@ -1074,7 +1073,7 @@
keys = [origin allKeys];
enumerator = [keys objectEnumerator];
while( key = [enumerator nextObject] )
while( (key = [enumerator nextObject]) )
{
if( [aDict objectForKey:key] == nil )
{

View file

@ -242,7 +242,7 @@ NSString *ActiveProjectDidChangeNotification = @"ActiveProjectDidChange";
BOOL ret;
PCProject *project;
while ( key = [enumerator nextObject] )
while ( (key = [enumerator nextObject]) )
{
project = [loadedProjects objectForKey:key];
ret = [project save];
@ -364,7 +364,7 @@ NSString *ActiveProjectDidChangeNotification = @"ActiveProjectDidChange";
BOOL ret;
if (![self activeProject]) {
return;
return NO;
}
// Save all files that need to be saved
@ -382,6 +382,7 @@ NSString *ActiveProjectDidChangeNotification = @"ActiveProjectDidChange";
@"Couldn't save project %@!",
@"OK",nil,nil,[activeProject projectName]);
}
return YES;
}
- (BOOL)saveProjectAs:(NSString *)projName
@ -468,23 +469,25 @@ NSString *ActiveProjectDidChangeNotification = @"ActiveProjectDidChange";
key = [path stringByAppendingPathComponent:projectName];
key = [key stringByAppendingPathExtension:@"pcproj"];
currentProject = RETAIN( [loadedProjects objectForKey:key] );
currentProject = RETAIN([loadedProjects objectForKey:key]);
if( !currentProject )
{
return;
}
// Remove it from the loaded projects!
// Remove it from the loaded projects! This is the only place it
// is retained, so it should dealloc after this.
[loadedProjects removeObjectForKey:key];
[self setActiveProject:[[loadedProjects allValues] lastObject]];
if ([loadedProjects count] == 0)
[self setActiveProject: nil];
else if (currentProject == [self activeProject])
[self setActiveProject:[[loadedProjects allValues] lastObject]];
if ([loadedProjects count] == 0)
{
[inspector performClose:self];
}
AUTORELEASE( currentProject );
RELEASE(currentProject);
}
- (void)closeProject

View file

@ -1,3 +1,8 @@
2002-04-25 Adam Fedor <fedor@gnu.org>
* PCToolProject.m (-init): Remove call to _iniUI -
already in [PCProject -init].
2002-03-03 16:31 probert
* PCLibProject.m: Forgot to include the Version file - fixed.

View file

@ -63,7 +63,6 @@
PCClasses,@"Classes",
nil] retain];
[self _initUI];
}
return self;
}

View file

@ -1,3 +1,8 @@
2002-04-25 Adam Fedor <fedor@gnu.org>
* PCToolProject.m (-init): Remove call to _iniUI -
already in [PCProject -init].
2002-03-01 16:32 probert
* GNUmakefile, PCToolMakefileFactory.h, PCToolMakefileFactory.m,

View file

@ -64,7 +64,6 @@
PCClasses,@"Classes",
nil] retain];
[self _initUI];
}
return self;
}