From c15a5811153dd56da013bfe7c7312435bbddf9be Mon Sep 17 00:00:00 2001 From: Sergii Stoian Date: Tue, 30 Mar 2004 07:14:07 +0000 Subject: [PATCH] fixes in Build, Launch, History panels git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/UNSTABLE_0_4@18967 72102866-910b-0410-8b05-ffd578937521 --- Library/PCBuildPanel.m | 23 +++++++++++++++++------ Library/PCDefines.h | 32 +++++++++++++++++++++++--------- Library/PCLaunchPanel.m | 17 ++++++++++++++--- Library/PCProject.m | 12 +++++------- Library/PCProjectBuilder.m | 2 -- Library/PCProjectLauncher.m | 4 +--- Library/PCProjectWindow.m | 2 +- PCAppController.m | 6 ++---- 8 files changed, 63 insertions(+), 35 deletions(-) diff --git a/Library/PCBuildPanel.m b/Library/PCBuildPanel.m index bfc33c6..1daff64 100644 --- a/Library/PCBuildPanel.m +++ b/Library/PCBuildPanel.m @@ -54,7 +54,7 @@ [contentBox setBorderType:NSNoBorder]; [self setContentView:contentBox]; - [self setContentView: [projectBuilder componentView]]; + [self setContentView:[projectBuilder componentView]]; // Track project switching [[NSNotificationCenter defaultCenter] @@ -73,18 +73,28 @@ - (void)dealloc { - NSLog (@"PCBuildPanel: dealloc"); - NSLog (@"PCBuildePanel: view RC: %i", + NSLog (@"PCBuildPanel: dealloc (CV RC:%i)", [[contentBox contentView] retainCount]); [[NSNotificationCenter defaultCenter] removeObserver:self]; [super dealloc]; } +- (NSView *)contentView +{ + if (contentBox) + { + return [contentBox contentView]; + } + + return [super contentView]; +} + - (void)setContentView:(NSView *)view { if (view == contentBox) { + NSLog(@""); [super setContentView:view]; } else @@ -97,10 +107,10 @@ { PCProject *activeProject = [aNotif object]; - if (![self isVisible]) +/* if (![self isVisible]) { return; - } + }*/ NSLog (@"PCBuildPanel: activeProjectDidChange"); @@ -109,7 +119,8 @@ if (!activeProject) { - [[contentBox contentView] removeFromSuperview]; +// [[contentBox contentView] removeFromSuperview]; + [contentBox setContentView:nil]; } else { diff --git a/Library/PCDefines.h b/Library/PCDefines.h index f527b04..b358151 100644 --- a/Library/PCDefines.h +++ b/Library/PCDefines.h @@ -1,12 +1,26 @@ -/* - * PCDefines.h created by probert on 2002-02-02 20:47:54 +0000 - * - * Project ProjectCenter - * - * Created with ProjectCenter - http://www.gnustep.org - * - * $Id$ - */ +/* + GNUstep ProjectCenter - http://www.gnustep.org + + Copyright (C) 2000-2002 Free Software Foundation + + Author: Philippe C.D. Robert + + This file is part of GNUstep. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. +*/ #ifndef _PCDefines_h_ #define _PCDefines_h_ diff --git a/Library/PCLaunchPanel.m b/Library/PCLaunchPanel.m index 69a088a..7a22f91 100644 --- a/Library/PCLaunchPanel.m +++ b/Library/PCLaunchPanel.m @@ -81,6 +81,16 @@ [super dealloc]; } +- (NSView *)contentView +{ + if (contentBox) + { + return [contentBox contentView]; + } + + return [super contentView]; +} + - (void)setContentView:(NSView *)view { if (view == contentBox) @@ -97,17 +107,18 @@ { PCProject *activeProject = [aNotif object]; - if (![self isVisible]) +/* if (![self isVisible]) { return; - } + }*/ [self setTitle: [NSString stringWithFormat: @"%@ - Launch", [activeProject projectName]]]; if (!activeProject) { - [[contentBox contentView] removeFromSuperview]; +// [[contentBox contentView] removeFromSuperview]; + [contentBox setContentView:nil]; } else { diff --git a/Library/PCProject.m b/Library/PCProject.m index 7993d4f..9234d01 100644 --- a/Library/PCProject.m +++ b/Library/PCProject.m @@ -20,8 +20,6 @@ You should have received a copy of the GNU General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. - - $Id$ */ #include "PCFileManager.h" @@ -230,13 +228,14 @@ NSString RELEASE(projectPath); RELEASE(projectDict); + // Initialized in -init RELEASE(projectWindow); RELEASE(projectBrowser); + RELEASE(projectHistory); + RELEASE(projectEditor); - if (projectHistory) RELEASE(projectHistory); - if (projectBuilder) RELEASE(projectBuilder); + if (projectBuilder) RELEASE(projectBuilder); if (projectLauncher) RELEASE(projectLauncher); - if (projectEditor) RELEASE(projectEditor); RELEASE(buildOptions); @@ -367,8 +366,7 @@ NSString || [key isEqualToString:PCDocuFiles] || [key isEqualToString:PCOtherSources] || [key isEqualToString:PCOtherResources] - || [key isEqualToString:PCNonProject] - || [key isEqualToString:PCGSMarkupFiles]) + || [key isEqualToString:PCNonProject]) { return YES; } diff --git a/Library/PCProjectBuilder.m b/Library/PCProjectBuilder.m index 78ad79d..c1b9659 100644 --- a/Library/PCProjectBuilder.m +++ b/Library/PCProjectBuilder.m @@ -20,8 +20,6 @@ You should have received a copy of the GNU General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. - - $Id$ */ #include "PCProjectBuilder.h" diff --git a/Library/PCProjectLauncher.m b/Library/PCProjectLauncher.m index dd5e7d9..7dbf6ff 100644 --- a/Library/PCProjectLauncher.m +++ b/Library/PCProjectLauncher.m @@ -20,8 +20,6 @@ You should have received a copy of the GNU General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. - - $Id$ */ #include "PCProjectLauncher.h" @@ -156,7 +154,7 @@ enum { - (void)dealloc { - NSLog (@"PCLauncher: dealloc"); + NSLog (@"PCProjectLauncher: dealloc"); RELEASE (componentView); RELEASE (textAttributes); diff --git a/Library/PCProjectWindow.m b/Library/PCProjectWindow.m index ee62d56..0715dd4 100644 --- a/Library/PCProjectWindow.m +++ b/Library/PCProjectWindow.m @@ -447,7 +447,7 @@ { [self showProjectEditor:self]; } - [buildPanel orderFront: nil]; + [buildPanel orderFront:nil]; } else { diff --git a/PCAppController.m b/PCAppController.m index d03ec53..c6b3870 100644 --- a/PCAppController.m +++ b/PCAppController.m @@ -20,8 +20,6 @@ You should have received a copy of the GNU General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. - - $Id$ */ #include "PCAppController.h" @@ -307,7 +305,7 @@ - (void)applicationWillTerminate:(NSNotification *)notification { - NSLog (@"Applictaion WILL terminate"); + NSLog (@"--- Application WILL terminate"); if ([[[NSUserDefaults standardUserDefaults] stringForKey:DeleteCacheWhenQuitting] isEqualToString:@"YES"]) { @@ -336,7 +334,7 @@ RELEASE(doServer); RELEASE(projectTypes); - NSLog (@"Applictaion WILL terminate.END"); + NSLog (@"--- Application WILL terminate.END"); } //============================================================================