reduce size of splash screen. ifdef'd off use of "loading..." which we never

used anyway. fixed huge leak that basically leaked the entire splash screen.
This commit is contained in:
pinkerton%netscape.com 2002-08-16 03:20:54 +00:00
parent 5a4a359f71
commit 45f1cb4383
12 changed files with 56 additions and 28 deletions

View File

@ -18,7 +18,6 @@
#import <Cocoa/Cocoa.h>
@interface CHSplashScreenWindow : NSWindow {
NSImage *_splashImage;
BOOL _fades;
BOOL __didFadeIn;
int _fadeIndex;

View File

@ -44,9 +44,11 @@
}
splashRect = NSMakeRect(0.0, 0.0, [splashImage size].width, [splashImage size].height);
contentImageView = [[[NSImageView alloc] initWithFrame:splashRect] autorelease];
#if USE_STATUS_FIELD
statusFieldRect = NSMakeRect(0.0, 170.0, (splashRect.size.width - 5.0), 16.0);
contentImageView = [[NSImageView alloc] initWithFrame:splashRect];
_statusField = [[NSTextField alloc] initWithFrame:statusFieldRect];
_statusField = [[[NSTextField alloc] initWithFrame:statusFieldRect];
#endif
if ( (self = [super initWithContentRect:splashRect
styleMask:NSBorderlessWindowMask
@ -56,6 +58,7 @@
[contentImageView setImage:splashImage];
_fadeThreadLock = nil;
#if USE_STATUS_FIELD
[_statusField setDrawsBackground:NO];
[_statusField setEditable:NO];
[_statusField setSelectable:NO];
@ -65,9 +68,12 @@
[_statusField setTextColor:[NSColor whiteColor]];
[_statusField setAlignment:NSRightTextAlignment];
[_statusField setStringValue:@"Loading..."];
#endif
[[self contentView] addSubview:contentImageView];
#if USE_STATUS_FIELD
[[self contentView] addSubview:_statusField];
#endif
[self setOpaque:NO];
[self setHasShadow:YES];
[self setReleasedWhenClosed:YES];
@ -90,8 +96,10 @@
-(void)setStatusText:(NSString *)newText
{
#if USE_STATUS_FIELD
[_statusField setStringValue:newText];
[_statusField display];
#endif
}
-(void)fadeIn
@ -157,6 +165,10 @@
-(void)close
{
#if USE_STATUS_FIELD
[_statusField release];
#endif
// if ( __didFadeIn ) {
if ( NO ) { //Fade out is still problematic...
[self fadeOut];
@ -166,10 +178,6 @@
-(void)dealloc
{
if (_splashImage) {
[_splashImage release];
}
[_fadeThreadLock release];
[super dealloc];

Binary file not shown.

View File

@ -18,7 +18,6 @@
#import <Cocoa/Cocoa.h>
@interface CHSplashScreenWindow : NSWindow {
NSImage *_splashImage;
BOOL _fades;
BOOL __didFadeIn;
int _fadeIndex;

View File

@ -44,9 +44,11 @@
}
splashRect = NSMakeRect(0.0, 0.0, [splashImage size].width, [splashImage size].height);
contentImageView = [[[NSImageView alloc] initWithFrame:splashRect] autorelease];
#if USE_STATUS_FIELD
statusFieldRect = NSMakeRect(0.0, 170.0, (splashRect.size.width - 5.0), 16.0);
contentImageView = [[NSImageView alloc] initWithFrame:splashRect];
_statusField = [[NSTextField alloc] initWithFrame:statusFieldRect];
_statusField = [[[NSTextField alloc] initWithFrame:statusFieldRect];
#endif
if ( (self = [super initWithContentRect:splashRect
styleMask:NSBorderlessWindowMask
@ -56,6 +58,7 @@
[contentImageView setImage:splashImage];
_fadeThreadLock = nil;
#if USE_STATUS_FIELD
[_statusField setDrawsBackground:NO];
[_statusField setEditable:NO];
[_statusField setSelectable:NO];
@ -65,9 +68,12 @@
[_statusField setTextColor:[NSColor whiteColor]];
[_statusField setAlignment:NSRightTextAlignment];
[_statusField setStringValue:@"Loading..."];
#endif
[[self contentView] addSubview:contentImageView];
#if USE_STATUS_FIELD
[[self contentView] addSubview:_statusField];
#endif
[self setOpaque:NO];
[self setHasShadow:YES];
[self setReleasedWhenClosed:YES];
@ -90,8 +96,10 @@
-(void)setStatusText:(NSString *)newText
{
#if USE_STATUS_FIELD
[_statusField setStringValue:newText];
[_statusField display];
#endif
}
-(void)fadeIn
@ -157,6 +165,10 @@
-(void)close
{
#if USE_STATUS_FIELD
[_statusField release];
#endif
// if ( __didFadeIn ) {
if ( NO ) { //Fade out is still problematic...
[self fadeOut];
@ -166,10 +178,6 @@
-(void)dealloc
{
if (_splashImage) {
[_splashImage release];
}
[_fadeThreadLock release];
[super dealloc];

View File

@ -18,7 +18,6 @@
#import <Cocoa/Cocoa.h>
@interface CHSplashScreenWindow : NSWindow {
NSImage *_splashImage;
BOOL _fades;
BOOL __didFadeIn;
int _fadeIndex;

View File

@ -44,9 +44,11 @@
}
splashRect = NSMakeRect(0.0, 0.0, [splashImage size].width, [splashImage size].height);
contentImageView = [[[NSImageView alloc] initWithFrame:splashRect] autorelease];
#if USE_STATUS_FIELD
statusFieldRect = NSMakeRect(0.0, 170.0, (splashRect.size.width - 5.0), 16.0);
contentImageView = [[NSImageView alloc] initWithFrame:splashRect];
_statusField = [[NSTextField alloc] initWithFrame:statusFieldRect];
_statusField = [[[NSTextField alloc] initWithFrame:statusFieldRect];
#endif
if ( (self = [super initWithContentRect:splashRect
styleMask:NSBorderlessWindowMask
@ -56,6 +58,7 @@
[contentImageView setImage:splashImage];
_fadeThreadLock = nil;
#if USE_STATUS_FIELD
[_statusField setDrawsBackground:NO];
[_statusField setEditable:NO];
[_statusField setSelectable:NO];
@ -65,9 +68,12 @@
[_statusField setTextColor:[NSColor whiteColor]];
[_statusField setAlignment:NSRightTextAlignment];
[_statusField setStringValue:@"Loading..."];
#endif
[[self contentView] addSubview:contentImageView];
#if USE_STATUS_FIELD
[[self contentView] addSubview:_statusField];
#endif
[self setOpaque:NO];
[self setHasShadow:YES];
[self setReleasedWhenClosed:YES];
@ -90,8 +96,10 @@
-(void)setStatusText:(NSString *)newText
{
#if USE_STATUS_FIELD
[_statusField setStringValue:newText];
[_statusField display];
#endif
}
-(void)fadeIn
@ -157,6 +165,10 @@
-(void)close
{
#if USE_STATUS_FIELD
[_statusField release];
#endif
// if ( __didFadeIn ) {
if ( NO ) { //Fade out is still problematic...
[self fadeOut];
@ -166,10 +178,6 @@
-(void)dealloc
{
if (_splashImage) {
[_splashImage release];
}
[_fadeThreadLock release];
[super dealloc];

Binary file not shown.

View File

@ -18,7 +18,6 @@
#import <Cocoa/Cocoa.h>
@interface CHSplashScreenWindow : NSWindow {
NSImage *_splashImage;
BOOL _fades;
BOOL __didFadeIn;
int _fadeIndex;

View File

@ -44,9 +44,11 @@
}
splashRect = NSMakeRect(0.0, 0.0, [splashImage size].width, [splashImage size].height);
contentImageView = [[[NSImageView alloc] initWithFrame:splashRect] autorelease];
#if USE_STATUS_FIELD
statusFieldRect = NSMakeRect(0.0, 170.0, (splashRect.size.width - 5.0), 16.0);
contentImageView = [[NSImageView alloc] initWithFrame:splashRect];
_statusField = [[NSTextField alloc] initWithFrame:statusFieldRect];
_statusField = [[[NSTextField alloc] initWithFrame:statusFieldRect];
#endif
if ( (self = [super initWithContentRect:splashRect
styleMask:NSBorderlessWindowMask
@ -56,6 +58,7 @@
[contentImageView setImage:splashImage];
_fadeThreadLock = nil;
#if USE_STATUS_FIELD
[_statusField setDrawsBackground:NO];
[_statusField setEditable:NO];
[_statusField setSelectable:NO];
@ -65,9 +68,12 @@
[_statusField setTextColor:[NSColor whiteColor]];
[_statusField setAlignment:NSRightTextAlignment];
[_statusField setStringValue:@"Loading..."];
#endif
[[self contentView] addSubview:contentImageView];
#if USE_STATUS_FIELD
[[self contentView] addSubview:_statusField];
#endif
[self setOpaque:NO];
[self setHasShadow:YES];
[self setReleasedWhenClosed:YES];
@ -90,8 +96,10 @@
-(void)setStatusText:(NSString *)newText
{
#if USE_STATUS_FIELD
[_statusField setStringValue:newText];
[_statusField display];
#endif
}
-(void)fadeIn
@ -157,6 +165,10 @@
-(void)close
{
#if USE_STATUS_FIELD
[_statusField release];
#endif
// if ( __didFadeIn ) {
if ( NO ) { //Fade out is still problematic...
[self fadeOut];
@ -166,10 +178,6 @@
-(void)dealloc
{
if (_splashImage) {
[_splashImage release];
}
[_fadeThreadLock release];
[super dealloc];