mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
remove traces of splash screen code and images. fix up some inconsistencies
in the MainMenu nib as well (bug 152464)
This commit is contained in:
parent
619719576f
commit
57a5992d5e
@ -355,7 +355,6 @@
|
||||
080E96DDFE201D6D7F000001,
|
||||
F5571935022B401B010001CA,
|
||||
F53F21EB022B7C77010001CA,
|
||||
F5807368023A1514010001CA,
|
||||
29B97315FDCFA39411CA2CEA,
|
||||
29B97317FDCFA39411CA2CEA,
|
||||
F56610A40394767101A9666E,
|
||||
@ -697,7 +696,6 @@
|
||||
F5BF71510231DC5D010001CA,
|
||||
F59E9F3E0237E28401A967DF,
|
||||
F5607CB6023944AE01A967DF,
|
||||
F580736C023A1514010001CA,
|
||||
F564873B023C3857010001CA,
|
||||
F5137A1202676B9101026D05,
|
||||
F57074BF026D80DF01A80166,
|
||||
@ -791,7 +789,6 @@
|
||||
F538DFB4023B3739010001CA,
|
||||
F538DFB5023B3739010001CA,
|
||||
F538DFB6023B3739010001CA,
|
||||
F557149F023B46C0010001CA,
|
||||
F55714A2023B4899010001CA,
|
||||
F5648732023B957F010001CA,
|
||||
F5648733023B957F010001CA,
|
||||
@ -877,7 +874,6 @@
|
||||
F53F2210022B7C78010001CA,
|
||||
F5BF71520231DC5D010001CA,
|
||||
F59E9F400237E43401A967DF,
|
||||
F580736D023A1514010001CA,
|
||||
F564873C023C3857010001CA,
|
||||
F57074C0026D80DF01A80166,
|
||||
F51B70B9026EC98B01A80166,
|
||||
@ -2980,7 +2976,6 @@
|
||||
};
|
||||
F50BC9A40239FA8D010001CA = {
|
||||
children = (
|
||||
F557149D023B46BF010001CA,
|
||||
F540BD1A029ED15301026D5D,
|
||||
F540BD1C029ED17901026D5D,
|
||||
3FAD95540461E43700A80005,
|
||||
@ -5578,18 +5573,6 @@
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
F557149D023B46BF010001CA = {
|
||||
isa = PBXFileReference;
|
||||
name = splash.tif;
|
||||
path = resources/images/app/splash.tif;
|
||||
refType = 2;
|
||||
};
|
||||
F557149F023B46C0010001CA = {
|
||||
fileRef = F557149D023B46BF010001CA;
|
||||
isa = PBXBuildFile;
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
F55714A1023B4898010001CA = {
|
||||
isa = PBXFileReference;
|
||||
name = smallbookmark.tif;
|
||||
@ -6906,42 +6889,6 @@
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
F5807368023A1514010001CA = {
|
||||
children = (
|
||||
F5807369023A1514010001CA,
|
||||
F580736A023A1514010001CA,
|
||||
);
|
||||
isa = PBXGroup;
|
||||
name = "Splash Screen";
|
||||
path = "";
|
||||
refType = 4;
|
||||
};
|
||||
F5807369023A1514010001CA = {
|
||||
fileEncoding = 30;
|
||||
isa = PBXFileReference;
|
||||
name = SplashScreenWindow.h;
|
||||
path = src/application/SplashScreenWindow.h;
|
||||
refType = 2;
|
||||
};
|
||||
F580736A023A1514010001CA = {
|
||||
fileEncoding = 30;
|
||||
isa = PBXFileReference;
|
||||
name = SplashScreenWindow.mm;
|
||||
path = src/application/SplashScreenWindow.mm;
|
||||
refType = 4;
|
||||
};
|
||||
F580736C023A1514010001CA = {
|
||||
fileRef = F5807369023A1514010001CA;
|
||||
isa = PBXBuildFile;
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
F580736D023A1514010001CA = {
|
||||
fileRef = F580736A023A1514010001CA;
|
||||
isa = PBXBuildFile;
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
F58341DC0219F9A801A967DF = {
|
||||
fileRef = F6BD64D301B3172601A962F7;
|
||||
isa = PBXBuildFile;
|
||||
@ -8436,7 +8383,6 @@
|
||||
F5BAAB2C02AC4A2E01A967F3,
|
||||
F5BAAB2D02AC4A2E01A967F3,
|
||||
F5BAAB2E02AC4A2E01A967F3,
|
||||
F5BAAB2F02AC4A2E01A967F3,
|
||||
F5BAAB3102AC4A2E01A967F3,
|
||||
F5BAAB3202AC4A2E01A967F3,
|
||||
F5BAAB3502AC4A2E01A967F3,
|
||||
@ -8530,7 +8476,6 @@
|
||||
F5BAAB6002AC4A5301A967F3,
|
||||
F5BAAB6102AC4A5301A967F3,
|
||||
F5BAAB6202AC4A5301A967F3,
|
||||
F5BAAB6302AC4A5301A967F3,
|
||||
F5BAAB6502AC4A5301A967F3,
|
||||
F5BAAB6602AC4A5301A967F3,
|
||||
F5BAAB6702AC4A5301A967F3,
|
||||
@ -8616,7 +8561,6 @@
|
||||
F5BAAB8602AC4A5301A967F3,
|
||||
F5BAAB8702AC4A5301A967F3,
|
||||
F5BAAB8802AC4A5301A967F3,
|
||||
F5BAAB8902AC4A5301A967F3,
|
||||
F5BAAB8B02AC4A5301A967F3,
|
||||
F5BAAB8E02AC4A5301A967F3,
|
||||
F5BAAB8F02AC4A5301A967F3,
|
||||
@ -8820,12 +8764,6 @@
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
F5BAAB2F02AC4A2E01A967F3 = {
|
||||
fileRef = F5807369023A1514010001CA;
|
||||
isa = PBXBuildFile;
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
F5BAAB3102AC4A2E01A967F3 = {
|
||||
fileRef = F5648739023C3857010001CA;
|
||||
isa = PBXBuildFile;
|
||||
@ -9006,12 +8944,6 @@
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
F5BAAB6302AC4A5301A967F3 = {
|
||||
fileRef = F557149D023B46BF010001CA;
|
||||
isa = PBXBuildFile;
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
F5BAAB6502AC4A5301A967F3 = {
|
||||
fileRef = F55714A1023B4898010001CA;
|
||||
isa = PBXBuildFile;
|
||||
@ -9174,12 +9106,6 @@
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
F5BAAB8902AC4A5301A967F3 = {
|
||||
fileRef = F580736A023A1514010001CA;
|
||||
isa = PBXBuildFile;
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
F5BAAB8B02AC4A5301A967F3 = {
|
||||
fileRef = F564873A023C3857010001CA;
|
||||
isa = PBXBuildFile;
|
||||
|
Binary file not shown.
@ -64,6 +64,7 @@
|
||||
mCreateBookmarksFolderMenuItem = NSMenuItem;
|
||||
mCreateBookmarksSeparatorMenuItem = NSMenuItem;
|
||||
mDockMenu = NSMenu;
|
||||
mExportPanelView = NSView;
|
||||
mFilterView = NSView;
|
||||
mGoMenu = NSMenu;
|
||||
mServersSubmenu = NSMenu;
|
||||
|
@ -12,10 +12,9 @@
|
||||
<string>507 508 116 61 0 0 1152 848 </string>
|
||||
</dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>349.0</string>
|
||||
<string>362.0</string>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>494</integer>
|
||||
<integer>29</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
|
Binary file not shown.
@ -42,7 +42,6 @@
|
||||
@class BookmarkManager;
|
||||
@class KeychainService;
|
||||
@class BrowserWindowController;
|
||||
@class SplashScreenWindow;
|
||||
@class SharedMenusObj;
|
||||
@class PreferenceManager;
|
||||
@class FindDlgController;
|
||||
@ -73,8 +72,6 @@
|
||||
|
||||
BOOL mOffline;
|
||||
|
||||
SplashScreenWindow* mSplashScreen;
|
||||
|
||||
BookmarkMenu* mMenuBookmarks;
|
||||
BookmarkMenu* mDockBookmarks;
|
||||
|
||||
|
@ -59,7 +59,6 @@
|
||||
#import "JSConsole.h"
|
||||
#import "NetworkServices.h"
|
||||
#import "MVPreferencesController.h"
|
||||
#import "SplashScreenWindow.h"
|
||||
#import "FindDlgController.h"
|
||||
#import "PreferenceManager.h"
|
||||
#import "SharedMenusObj.h"
|
||||
@ -144,12 +143,7 @@ const int kReuseWindowOnAE = 2;
|
||||
|
||||
NSString* url = [defaults stringForKey:USER_DEFAULTS_URL_KEY];
|
||||
mStartURL = url ? [url retain] : nil;
|
||||
#if 0
|
||||
// there's a lot of debate about having a splash screen. good cocoa apps don't have them
|
||||
// at all. turning off here (but not removing any code) for a time to get community feedback.
|
||||
// users can get the buildID from the about window if necessary.
|
||||
mSplashScreen = [[SplashScreenWindow alloc] initWithImage:[NSImage imageNamed:@"splash"] withFade:NO];
|
||||
#endif
|
||||
|
||||
mFindDialog = nil;
|
||||
mMenuBookmarks = nil;
|
||||
|
||||
@ -201,9 +195,6 @@ const int kReuseWindowOnAE = 2;
|
||||
if (!browserWindow)
|
||||
[self newWindow: self];
|
||||
|
||||
[mSplashScreen close]; //deallocs on close
|
||||
mSplashScreen = nil;
|
||||
|
||||
// Initialize offline mode.
|
||||
mOffline = NO;
|
||||
nsCOMPtr<nsIIOService> ioService(do_GetService(ioServiceContractID));
|
||||
|
@ -1,46 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Matt Judy.
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface SplashScreenWindow : NSWindow
|
||||
{
|
||||
BOOL mFades;
|
||||
BOOL mDidFadeIn;
|
||||
int mFadeIndex;
|
||||
NSTimeInterval mFadeDelay;
|
||||
id mFadeThreadLock;
|
||||
NSTextField *mStatusField;
|
||||
}
|
||||
|
||||
// This method inits the window and displays it, slightly proud of center,
|
||||
// and at the size of the image it displays.
|
||||
//
|
||||
// The splash method should be used in your main controller's init method
|
||||
// in this fashion: splashWindow = [[SplashScreenWindow alloc] splashImage:nil withFade:NO withStatusRect:someRect];
|
||||
//
|
||||
// Passing nil to splashImage will attempt to load [NSImage imageNamed:@"splash"] instead.
|
||||
// If that fails, the app icon will be displayed.
|
||||
//
|
||||
// The window will release itself whenever you send it the close message.
|
||||
- (id)initWithImage:(NSImage*)splashImage withFade:(BOOL)shouldFade;
|
||||
|
||||
-(NSString *)statusText;
|
||||
-(void)setStatusText:(NSString *)newText;
|
||||
|
||||
|
||||
@end
|
@ -1,203 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Matt Judy.
|
||||
*
|
||||
*/
|
||||
|
||||
#import "SplashScreenWindow.h"
|
||||
|
||||
#include "nsBuildID.h"
|
||||
|
||||
//#define USE_STATUS_FIELD 1
|
||||
|
||||
@interface SplashScreenWindow (Private)
|
||||
-(void)fadeIn;
|
||||
-(void)fadeInThread;
|
||||
-(void)fadeOut;
|
||||
-(void)fadeOutThread;
|
||||
@end
|
||||
|
||||
@implementation SplashScreenWindow
|
||||
|
||||
- (id)initWithImage:(NSImage*)splashImage withFade:(BOOL)shouldFade
|
||||
{
|
||||
if (!splashImage)
|
||||
{
|
||||
NSImage* splashImage = [NSImage imageNamed:@"splash"];
|
||||
if (!splashImage)
|
||||
splashImage = [NSImage imageNamed:@"NSApplicationIcon"];
|
||||
}
|
||||
|
||||
NSRect splashRect = NSMakeRect(0.0, 0.0, [splashImage size].width, [splashImage size].height);
|
||||
|
||||
if ( (self = [super initWithContentRect:splashRect
|
||||
styleMask:NSBorderlessWindowMask
|
||||
backing:NSBackingStoreBuffered
|
||||
defer:NO]))
|
||||
{
|
||||
NSImageView* contentImageView = [[[NSImageView alloc] initWithFrame:splashRect] autorelease];
|
||||
|
||||
#if USE_STATUS_FIELD
|
||||
NSRect statusFieldRect = NSMakeRect(0.0, 170.0, (splashRect.size.width - 5.0), 16.0);
|
||||
mStatusField = [[[NSTextField alloc] initWithFrame:statusFieldRect] autorelease];
|
||||
#endif
|
||||
|
||||
const float kVersionLeftOffset = 160.0;
|
||||
NSRect versionFieldRect = NSMakeRect(kVersionLeftOffset, 18.0, (splashRect.size.width - kVersionLeftOffset - 14.0), 16.0);
|
||||
NSTextField* versionField = [[[NSTextField alloc] initWithFrame:versionFieldRect] autorelease];
|
||||
|
||||
[contentImageView setImage:splashImage];
|
||||
|
||||
#if USE_STATUS_FIELD
|
||||
[mStatusField setDrawsBackground:NO];
|
||||
[mStatusField setEditable:NO];
|
||||
[mStatusField setSelectable:NO];
|
||||
[mStatusField setBezeled:NO];
|
||||
[mStatusField setBordered:NO];
|
||||
[mStatusField setFont:[NSFont fontWithName:@"Monaco" size:10.0]];
|
||||
[mStatusField setTextColor:[NSColor whiteColor]];
|
||||
[mStatusField setAlignment:NSRightTextAlignment];
|
||||
[mStatusField setStringValue:@"Loading..."];
|
||||
#endif
|
||||
|
||||
[versionField setDrawsBackground:NO];
|
||||
[versionField setEditable:NO];
|
||||
[versionField setSelectable:NO];
|
||||
[versionField setBezeled:NO];
|
||||
[versionField setBordered:NO];
|
||||
[versionField setFont:[NSFont labelFontOfSize:10.0]];
|
||||
[versionField setTextColor:[NSColor grayColor]];
|
||||
[versionField setAlignment:NSRightTextAlignment];
|
||||
|
||||
NSString* versionString = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleGetInfoString"];
|
||||
NSString* buildIDString = [NSString stringWithFormat: NSLocalizedString(@"BuildID", @""), NS_BUILD_ID];
|
||||
[versionField setStringValue:[NSString stringWithFormat:@"%@ (%@)", versionString, buildIDString]];
|
||||
|
||||
[[self contentView] addSubview:contentImageView];
|
||||
#if USE_STATUS_FIELD
|
||||
[[self contentView] addSubview:mStatusField];
|
||||
#endif
|
||||
[[self contentView] addSubview:versionField];
|
||||
|
||||
[self setBackgroundColor: [NSColor clearColor]];
|
||||
[self setOpaque:NO];
|
||||
[self setHasShadow:YES];
|
||||
[self setReleasedWhenClosed:YES];
|
||||
[self center];
|
||||
|
||||
if (shouldFade) {
|
||||
mFadeDelay = (0.5 / 60.0);
|
||||
[self fadeIn];
|
||||
}
|
||||
else
|
||||
[self makeKeyAndOrderFront:self];
|
||||
|
||||
mDidFadeIn = shouldFade;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)dealloc
|
||||
{
|
||||
[mFadeThreadLock release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
#if FADE_OUT_WORKS
|
||||
-(void)close
|
||||
{
|
||||
if (mDidFadeIn)
|
||||
; // [self fadeOut]; //Fade out is still problematic...
|
||||
|
||||
[super close];
|
||||
}
|
||||
#endif
|
||||
|
||||
-(NSString *)statusText
|
||||
{
|
||||
return [mStatusField stringValue];
|
||||
}
|
||||
|
||||
-(void)setStatusText:(NSString *)newText
|
||||
{
|
||||
#if USE_STATUS_FIELD
|
||||
[mStatusField setStringValue:newText];
|
||||
[mStatusField display];
|
||||
#endif
|
||||
}
|
||||
|
||||
-(void)fadeIn
|
||||
{
|
||||
[self setAlphaValue:0.0];
|
||||
[self makeKeyAndOrderFront:self];
|
||||
|
||||
if (mFadeThreadLock == nil) {
|
||||
mFadeThreadLock = [[NSLock allocWithZone:[self zone]] init];
|
||||
}
|
||||
|
||||
[NSThread detachNewThreadSelector:@selector(fadeInThread) toTarget:self withObject:nil];
|
||||
}
|
||||
|
||||
-(void)fadeInThread
|
||||
{
|
||||
float fadeLevel = 0.0;
|
||||
NSAutoreleasePool *threadMainPool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
[mFadeThreadLock lock];
|
||||
|
||||
while ( fadeLevel < 1.0 ) {
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
fadeLevel += 0.20;
|
||||
[self setAlphaValue:fadeLevel];
|
||||
[self flushWindow];
|
||||
[NSThread sleepUntilDate:[NSDate dateWithTimeIntervalSinceNow:mFadeDelay]];
|
||||
[pool release];
|
||||
}
|
||||
|
||||
[mFadeThreadLock unlock];
|
||||
[threadMainPool release];
|
||||
}
|
||||
|
||||
-(void)fadeOut
|
||||
{
|
||||
if (mFadeThreadLock == nil) {
|
||||
mFadeThreadLock = [[NSLock allocWithZone:[self zone]] init];
|
||||
}
|
||||
|
||||
[NSThread detachNewThreadSelector:@selector(fadeOutThread) toTarget:self withObject:nil];
|
||||
}
|
||||
|
||||
-(void)fadeOutThread
|
||||
{
|
||||
float fadeLevel = 1.0;
|
||||
NSAutoreleasePool *threadMainPool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
[mFadeThreadLock lock];
|
||||
|
||||
while ( fadeLevel > 0.0 ) {
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
fadeLevel -= 0.1;
|
||||
[self setAlphaValue:fadeLevel];
|
||||
[self flushWindow];
|
||||
[NSThread sleepUntilDate:[NSDate dateWithTimeIntervalSinceNow:mFadeDelay]];
|
||||
[pool release];
|
||||
}
|
||||
|
||||
[mFadeThreadLock unlock];
|
||||
[threadMainPool release];
|
||||
}
|
||||
|
||||
@end
|
Loading…
Reference in New Issue
Block a user