mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Fix for bug 159296 -- put the build ID in the about window. Also tweaked the scrolling text timer to fire much less fequently (and scroll more each time, but still remain smooth). Added dist/include to the include paths in the project (for nsBuildID.h), and fixed some file access paths to stuff in widget/src/cocoa.
This commit is contained in:
parent
106794c0ae
commit
643d59bc2c
6
camino/AboutBox.nib/classes.nib
generated
6
camino/AboutBox.nib/classes.nib
generated
@ -4,7 +4,11 @@
|
||||
ACTIONS = {showPanel = id; };
|
||||
CLASS = AboutBox;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {creditsField = id; window = id; };
|
||||
OUTLETS = {
|
||||
buildNumberField = NSTextField;
|
||||
creditsField = NSTextView;
|
||||
window = NSWindow;
|
||||
};
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }
|
||||
|
2
camino/AboutBox.nib/info.nib
generated
2
camino/AboutBox.nib/info.nib
generated
@ -13,6 +13,6 @@
|
||||
<integer>5</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5Q45</string>
|
||||
<string>5S66</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
BIN
camino/AboutBox.nib/objects.nib
generated
BIN
camino/AboutBox.nib/objects.nib
generated
Binary file not shown.
@ -1,27 +1,48 @@
|
||||
/* -*- 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.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Matt Judy (Original Author)
|
||||
*/
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* 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 Chimera code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Matt Judy
|
||||
* Simon Fraser <sfraser@netscape.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#include <Appkit/Appkit.h>
|
||||
|
||||
@interface CHAboutBox : NSObject
|
||||
{
|
||||
IBOutlet id creditsField;
|
||||
IBOutlet id window;
|
||||
IBOutlet NSTextView* creditsField;
|
||||
IBOutlet NSTextField* buildNumberField;
|
||||
IBOutlet NSWindow* window;
|
||||
NSTimer *scrollTimer;
|
||||
float currentPosition;
|
||||
float maxScrollHeight;
|
||||
|
@ -1,124 +1,154 @@
|
||||
/* -*- 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.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Matt Judy (Original Author)
|
||||
* David Hyatt <hyatt@netscape.com>
|
||||
*/
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* 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 Chimera code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Matt Judy
|
||||
* David Hyatt <hyatt@netscape.com>
|
||||
* Simon Fraser <sfraser@netscape.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#import "CHAboutBox.h"
|
||||
|
||||
#include "nsBuildID.h"
|
||||
|
||||
@interface CHAboutBox(Private)
|
||||
- (void)loadWindow;
|
||||
@end
|
||||
|
||||
@implementation CHAboutBox
|
||||
|
||||
static CHAboutBox *sharedInstance = nil;
|
||||
|
||||
+ (CHAboutBox *)sharedInstance
|
||||
{
|
||||
return sharedInstance ? sharedInstance : [[self alloc] init];
|
||||
return sharedInstance ? sharedInstance : [[self alloc] init];
|
||||
}
|
||||
|
||||
- (id)init
|
||||
{
|
||||
if (sharedInstance) {
|
||||
[self dealloc];
|
||||
} else {
|
||||
sharedInstance = [super init];
|
||||
}
|
||||
return sharedInstance;
|
||||
if (sharedInstance) {
|
||||
[self dealloc];
|
||||
} else {
|
||||
sharedInstance = [super init];
|
||||
}
|
||||
return sharedInstance;
|
||||
}
|
||||
|
||||
- (IBAction)showPanel:(id)sender
|
||||
{
|
||||
if (!creditsField) {
|
||||
NSString *creditsPath;
|
||||
NSAttributedString *creditsString;
|
||||
float fieldHeight;
|
||||
float containerHeight;
|
||||
if (!creditsField) {
|
||||
[self loadWindow];
|
||||
}
|
||||
|
||||
if (![window isVisible]) {
|
||||
currentPosition = 0;
|
||||
restartAtTop = NO;
|
||||
startTime = [NSDate timeIntervalSinceReferenceDate] + 3.0;
|
||||
[creditsField scrollPoint:NSMakePoint( 0, 0 )];
|
||||
}
|
||||
|
||||
if (![NSBundle loadNibNamed:@"AboutBox" owner:self]) {
|
||||
NSLog( @"Failed to load AboutBox.nib" );
|
||||
NSBeep();
|
||||
return;
|
||||
}
|
||||
|
||||
[window setTitle:[NSString stringWithFormat: @"About %@", NSLocalizedStringFromTable(@"CFBundleName", @"InfoPlist", nil)]];
|
||||
|
||||
creditsPath = [[NSBundle mainBundle] pathForResource:@"Credits" ofType:@"rtf"];
|
||||
creditsString = [[NSAttributedString alloc] initWithPath:creditsPath documentAttributes:nil];
|
||||
[creditsField replaceCharactersInRange:NSMakeRange( 0, 0 )
|
||||
withRTF:[creditsString RTFFromRange:
|
||||
NSMakeRange( 0, [creditsString length] )
|
||||
documentAttributes:nil]];
|
||||
|
||||
fieldHeight = [creditsField frame].size.height;
|
||||
|
||||
(void)[[creditsField layoutManager] glyphRangeForTextContainer:[creditsField textContainer]];
|
||||
containerHeight = [[creditsField layoutManager] usedRectForTextContainer:
|
||||
[creditsField textContainer]].size.height;
|
||||
maxScrollHeight = containerHeight - fieldHeight;
|
||||
|
||||
[window setExcludedFromWindowsMenu:YES];
|
||||
[window setMenu:nil];
|
||||
[window center];
|
||||
}
|
||||
|
||||
if (![window isVisible]) {
|
||||
currentPosition = 0;
|
||||
restartAtTop = NO;
|
||||
startTime = [NSDate timeIntervalSinceReferenceDate] + 3.0;
|
||||
[creditsField scrollPoint:NSMakePoint( 0, 0 )];
|
||||
}
|
||||
|
||||
[window makeKeyAndOrderFront:nil];
|
||||
[window makeKeyAndOrderFront:nil];
|
||||
}
|
||||
|
||||
- (void)windowDidBecomeKey:(NSNotification *)notification
|
||||
{
|
||||
scrollTimer = [NSTimer scheduledTimerWithTimeInterval:1/4
|
||||
target:self
|
||||
selector:@selector(scrollCredits:)
|
||||
userInfo:nil
|
||||
repeats:YES];
|
||||
scrollTimer = [NSTimer scheduledTimerWithTimeInterval:0.03
|
||||
target:self
|
||||
selector:@selector(scrollCredits:)
|
||||
userInfo:nil
|
||||
repeats:YES];
|
||||
}
|
||||
|
||||
- (void)windowDidResignKey:(NSNotification *)notification
|
||||
{
|
||||
[scrollTimer invalidate];
|
||||
[scrollTimer invalidate];
|
||||
}
|
||||
|
||||
- (void)scrollCredits:(NSTimer *)timer
|
||||
{
|
||||
if ([NSDate timeIntervalSinceReferenceDate] >= startTime) {
|
||||
|
||||
if (restartAtTop) {
|
||||
startTime = [NSDate timeIntervalSinceReferenceDate] + 3.0;
|
||||
restartAtTop = NO;
|
||||
[creditsField scrollPoint:NSMakePoint( 0, 0 )];
|
||||
return;
|
||||
}
|
||||
|
||||
if (currentPosition >= maxScrollHeight) {
|
||||
startTime = [NSDate timeIntervalSinceReferenceDate] + 3.0;
|
||||
currentPosition = 0;
|
||||
restartAtTop = YES;
|
||||
} else {
|
||||
[creditsField scrollPoint:NSMakePoint( 0, currentPosition )];
|
||||
currentPosition += 0.01;
|
||||
}
|
||||
if ([NSDate timeIntervalSinceReferenceDate] >= startTime)
|
||||
{
|
||||
if (restartAtTop) {
|
||||
startTime = [NSDate timeIntervalSinceReferenceDate] + 3.0;
|
||||
restartAtTop = NO;
|
||||
[creditsField scrollPoint:NSMakePoint( 0, 0 )];
|
||||
return;
|
||||
}
|
||||
|
||||
if (currentPosition >= maxScrollHeight) {
|
||||
startTime = [NSDate timeIntervalSinceReferenceDate] + 3.0;
|
||||
currentPosition = 0;
|
||||
restartAtTop = YES;
|
||||
} else {
|
||||
[creditsField scrollPoint:NSMakePoint( 0, currentPosition )];
|
||||
currentPosition += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)loadWindow
|
||||
{
|
||||
NSString *creditsPath;
|
||||
NSAttributedString *creditsString;
|
||||
float fieldHeight;
|
||||
float containerHeight;
|
||||
|
||||
if (![NSBundle loadNibNamed:@"AboutBox" owner:self]) {
|
||||
NSLog( @"Failed to load AboutBox.nib" );
|
||||
NSBeep();
|
||||
return;
|
||||
}
|
||||
|
||||
[window setTitle:[NSString stringWithFormat: @"About %@", NSLocalizedStringFromTable(@"CFBundleName", @"InfoPlist", nil)]];
|
||||
|
||||
creditsPath = [[NSBundle mainBundle] pathForResource:@"Credits" ofType:@"rtf"];
|
||||
creditsString = [[NSAttributedString alloc] initWithPath:creditsPath documentAttributes:nil];
|
||||
[creditsField replaceCharactersInRange:NSMakeRange( 0, 0 )
|
||||
withRTF:[creditsString RTFFromRange:
|
||||
NSMakeRange( 0, [creditsString length] )
|
||||
documentAttributes:nil]];
|
||||
|
||||
fieldHeight = [creditsField frame].size.height;
|
||||
|
||||
(void)[[creditsField layoutManager] glyphRangeForTextContainer:[creditsField textContainer]];
|
||||
containerHeight = [[creditsField layoutManager] usedRectForTextContainer:
|
||||
[creditsField textContainer]].size.height;
|
||||
maxScrollHeight = containerHeight - fieldHeight;
|
||||
|
||||
[buildNumberField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"BuildID", @""), NS_BUILD_ID]];
|
||||
[window setExcludedFromWindowsMenu:YES];
|
||||
[window setMenu:nil];
|
||||
[window center];
|
||||
}
|
||||
|
||||
@end
|
||||
|
@ -267,7 +267,7 @@
|
||||
buildSettings = {
|
||||
DEBUGGING_SYMBOLS = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = "";
|
||||
HEADER_SEARCH_PATHS = "../dist/include/exthandler ../dist/include/helperAppDlg ../dist/include/intl ../dist/include/pipboot ../dist/include/pipnss ../dist/include/webbrwsr ../dist/include/dom ../dist/include/nspr ../dist/include/string ../dist/include/rdf ../dist/include/necko ../dist/include/find ../dist/include/embed_base ../dist/include/commandhandler ../dist/include/windowwatcher ../dist/include/webshell ../dist/include/widget ../dist/include/uriloader ../dist/include/docshell ../dist/include/profile ../dist/include/layout ../dist/include/content ../dist/include/webbrowserpersist ../dist/include/pref ../dist/include/mimetype ../dist/include/shistory ../dist/include/view ../dist/include/gfx ../dist/include/xultmpl ../dist/include/xmlextras ../dist/include/htmlparser ../dist/include/locale ../dist/include/unicharutil ../dist/include/appcomps ../dist/include/chrome ../dist/include/xpcom \"$(SYSTEM_DEVELOPER_DIR)/Headers/FlatCarbon\"";
|
||||
HEADER_SEARCH_PATHS = "../dist/include/exthandler ../dist/include/helperAppDlg ../dist/include/intl ../dist/include/pipboot ../dist/include/pipnss ../dist/include/webbrwsr ../dist/include/dom ../dist/include/nspr ../dist/include/string ../dist/include/rdf ../dist/include/necko ../dist/include/find ../dist/include/embed_base ../dist/include/commandhandler ../dist/include/windowwatcher ../dist/include/webshell ../dist/include/widget ../dist/include/uriloader ../dist/include/docshell ../dist/include/profile ../dist/include/layout ../dist/include/content ../dist/include/webbrowserpersist ../dist/include/pref ../dist/include/mimetype ../dist/include/shistory ../dist/include/view ../dist/include/gfx ../dist/include/xultmpl ../dist/include/xmlextras ../dist/include/htmlparser ../dist/include/locale ../dist/include/unicharutil ../dist/include/appcomps ../dist/include/chrome ../dist/include/xpcom ../dist/include/ \"$(SYSTEM_DEVELOPER_DIR)/Headers/FlatCarbon\"";
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
LIBRARY_SEARCH_PATHS = "../dist/bin ../dist/lib ../intl/unicharutil/util ../modules/zlib/src";
|
||||
OPTIMIZATION_CFLAGS = "-O2";
|
||||
@ -4930,7 +4930,7 @@
|
||||
buildSettings = {
|
||||
DEBUGGING_SYMBOLS = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = "";
|
||||
HEADER_SEARCH_PATHS = "../dist/include/helperAppDlg ../dist/include/exthandler ../dist/include/intl ../dist/include/pipboot ../dist/include/pipnss ../dist/include/webbrwsr ../dist/include/dom ../dist/include/nspr ../dist/include/string ../dist/include/rdf ../dist/include/necko ../dist/include/find ../dist/include/embed_base ../dist/include/commandhandler ../dist/include/windowwatcher ../dist/include/webshell ../dist/include/widget ../dist/include/uriloader ../dist/include/docshell ../dist/include/profile ../dist/include/layout ../dist/include/content ../dist/include/webbrowserpersist ../dist/include/pref ../dist/include/mimetype ../dist/include/shistory ../dist/include/view ../dist/include/gfx ../dist/include/xultmpl ../dist/include/xmlextras ../dist/include/htmlparser ../dist/include/locale ../dist/include/unicharutil ../dist/include/appcomps ../dist/include/chrome ../dist/include/xpcom \"$(SYSTEM_DEVELOPER_DIR)/Headers/FlatCarbon\"";
|
||||
HEADER_SEARCH_PATHS = "../dist/include/helperAppDlg ../dist/include/exthandler ../dist/include/intl ../dist/include/pipboot ../dist/include/pipnss ../dist/include/webbrwsr ../dist/include/dom ../dist/include/nspr ../dist/include/string ../dist/include/rdf ../dist/include/necko ../dist/include/find ../dist/include/embed_base ../dist/include/commandhandler ../dist/include/windowwatcher ../dist/include/webshell ../dist/include/widget ../dist/include/uriloader ../dist/include/docshell ../dist/include/profile ../dist/include/layout ../dist/include/content ../dist/include/webbrowserpersist ../dist/include/pref ../dist/include/mimetype ../dist/include/shistory ../dist/include/view ../dist/include/gfx ../dist/include/xultmpl ../dist/include/xmlextras ../dist/include/htmlparser ../dist/include/locale ../dist/include/unicharutil ../dist/include/appcomps ../dist/include/chrome ../dist/include/xpcom ../dist/include/ \"$(SYSTEM_DEVELOPER_DIR)/Headers/FlatCarbon\"";
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
LIBRARY_SEARCH_PATHS = "../dist/bin ../dist/lib ../dist/lib/components ../intl/unicharutil/src ../gfx/src ../js/src/liveconnect ../intl/unicharutil/util";
|
||||
OPTIMIZATION_CFLAGS = "-O2";
|
||||
@ -7350,38 +7350,38 @@
|
||||
F5EA337902EF889001A96654 = {
|
||||
isa = PBXFileReference;
|
||||
name = nsAppShellCocoa.mm;
|
||||
path = /Volumes/Development/Trees/Chimera/mozilla/widget/src/cocoa/nsAppShellCocoa.mm;
|
||||
refType = 0;
|
||||
path = ../widget/src/cocoa/nsAppShellCocoa.mm;
|
||||
refType = 2;
|
||||
};
|
||||
F5EA337A02EF889001A96654 = {
|
||||
isa = PBXFileReference;
|
||||
name = nsChildView.mm;
|
||||
path = /Volumes/Development/Trees/Chimera/mozilla/widget/src/cocoa/nsChildView.mm;
|
||||
refType = 0;
|
||||
path = ../widget/src/cocoa/nsChildView.mm;
|
||||
refType = 2;
|
||||
};
|
||||
F5EA337B02EF889001A96654 = {
|
||||
isa = PBXFileReference;
|
||||
name = nsCocoaWindow.mm;
|
||||
path = /Volumes/Development/Trees/Chimera/mozilla/widget/src/cocoa/nsCocoaWindow.mm;
|
||||
refType = 0;
|
||||
path = ../widget/src/cocoa/nsCocoaWindow.mm;
|
||||
refType = 2;
|
||||
};
|
||||
F5EA337C02EF889001A96654 = {
|
||||
isa = PBXFileReference;
|
||||
name = nsDragHelperService.cpp;
|
||||
path = /Volumes/Development/Trees/Chimera/mozilla/widget/src/cocoa/nsDragHelperService.cpp;
|
||||
refType = 0;
|
||||
path = ../widget/src/cocoa/nsDragHelperService.cpp;
|
||||
refType = 2;
|
||||
};
|
||||
F5EA337D02EF889001A96654 = {
|
||||
isa = PBXFileReference;
|
||||
name = nsDragService.cpp;
|
||||
path = /Volumes/Development/Trees/Chimera/mozilla/widget/src/cocoa/nsDragService.cpp;
|
||||
refType = 0;
|
||||
path = ../widget/src/cocoa/nsDragService.cpp;
|
||||
refType = 2;
|
||||
};
|
||||
F5EA337E02EF889001A96654 = {
|
||||
isa = PBXFileReference;
|
||||
name = nsToolkit.mm;
|
||||
path = /Volumes/Development/Trees/Chimera/mozilla/widget/src/cocoa/nsToolkit.mm;
|
||||
refType = 0;
|
||||
path = ../widget/src/cocoa/nsToolkit.mm;
|
||||
refType = 2;
|
||||
};
|
||||
F5F14E9602A5A43A01A967F3 = {
|
||||
isa = PBXFileReference;
|
||||
|
@ -51,7 +51,7 @@ http://chimera.mozdev.org\
|
||||
William Dell Wisner\
|
||||
\
|
||||
Mozilla Contributors:\
|
||||
Type "about:credits" in the URL bar.\
|
||||
Type \'d2about:credits\'d3 in the Location bar.\
|
||||
|
||||
\f2\b0 \
|
||||
\
|
||||
@ -65,7 +65,7 @@ http://chimera.mozdev.org\
|
||||
\f2\i0\b0\fs24 \
|
||||
|
||||
\f3\b Apple Computer Software Engineering\
|
||||
The [Chimera] Mailing List\
|
||||
The Chimera Mailing List\
|
||||
|
||||
\f1\i\b0\fs36 \
|
||||
\
|
||||
|
6
camino/English.lproj/AboutBox.nib/classes.nib
generated
6
camino/English.lproj/AboutBox.nib/classes.nib
generated
@ -4,7 +4,11 @@
|
||||
ACTIONS = {showPanel = id; };
|
||||
CLASS = AboutBox;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {creditsField = id; window = id; };
|
||||
OUTLETS = {
|
||||
buildNumberField = NSTextField;
|
||||
creditsField = NSTextView;
|
||||
window = NSWindow;
|
||||
};
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }
|
||||
|
2
camino/English.lproj/AboutBox.nib/info.nib
generated
2
camino/English.lproj/AboutBox.nib/info.nib
generated
@ -13,6 +13,6 @@
|
||||
<integer>5</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5Q45</string>
|
||||
<string>5S66</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
BIN
camino/English.lproj/AboutBox.nib/objects.nib
generated
BIN
camino/English.lproj/AboutBox.nib/objects.nib
generated
Binary file not shown.
Binary file not shown.
@ -267,7 +267,7 @@
|
||||
buildSettings = {
|
||||
DEBUGGING_SYMBOLS = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = "";
|
||||
HEADER_SEARCH_PATHS = "../dist/include/exthandler ../dist/include/helperAppDlg ../dist/include/intl ../dist/include/pipboot ../dist/include/pipnss ../dist/include/webbrwsr ../dist/include/dom ../dist/include/nspr ../dist/include/string ../dist/include/rdf ../dist/include/necko ../dist/include/find ../dist/include/embed_base ../dist/include/commandhandler ../dist/include/windowwatcher ../dist/include/webshell ../dist/include/widget ../dist/include/uriloader ../dist/include/docshell ../dist/include/profile ../dist/include/layout ../dist/include/content ../dist/include/webbrowserpersist ../dist/include/pref ../dist/include/mimetype ../dist/include/shistory ../dist/include/view ../dist/include/gfx ../dist/include/xultmpl ../dist/include/xmlextras ../dist/include/htmlparser ../dist/include/locale ../dist/include/unicharutil ../dist/include/appcomps ../dist/include/chrome ../dist/include/xpcom \"$(SYSTEM_DEVELOPER_DIR)/Headers/FlatCarbon\"";
|
||||
HEADER_SEARCH_PATHS = "../dist/include/exthandler ../dist/include/helperAppDlg ../dist/include/intl ../dist/include/pipboot ../dist/include/pipnss ../dist/include/webbrwsr ../dist/include/dom ../dist/include/nspr ../dist/include/string ../dist/include/rdf ../dist/include/necko ../dist/include/find ../dist/include/embed_base ../dist/include/commandhandler ../dist/include/windowwatcher ../dist/include/webshell ../dist/include/widget ../dist/include/uriloader ../dist/include/docshell ../dist/include/profile ../dist/include/layout ../dist/include/content ../dist/include/webbrowserpersist ../dist/include/pref ../dist/include/mimetype ../dist/include/shistory ../dist/include/view ../dist/include/gfx ../dist/include/xultmpl ../dist/include/xmlextras ../dist/include/htmlparser ../dist/include/locale ../dist/include/unicharutil ../dist/include/appcomps ../dist/include/chrome ../dist/include/xpcom ../dist/include/ \"$(SYSTEM_DEVELOPER_DIR)/Headers/FlatCarbon\"";
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
LIBRARY_SEARCH_PATHS = "../dist/bin ../dist/lib ../intl/unicharutil/util ../modules/zlib/src";
|
||||
OPTIMIZATION_CFLAGS = "-O2";
|
||||
@ -4930,7 +4930,7 @@
|
||||
buildSettings = {
|
||||
DEBUGGING_SYMBOLS = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = "";
|
||||
HEADER_SEARCH_PATHS = "../dist/include/helperAppDlg ../dist/include/exthandler ../dist/include/intl ../dist/include/pipboot ../dist/include/pipnss ../dist/include/webbrwsr ../dist/include/dom ../dist/include/nspr ../dist/include/string ../dist/include/rdf ../dist/include/necko ../dist/include/find ../dist/include/embed_base ../dist/include/commandhandler ../dist/include/windowwatcher ../dist/include/webshell ../dist/include/widget ../dist/include/uriloader ../dist/include/docshell ../dist/include/profile ../dist/include/layout ../dist/include/content ../dist/include/webbrowserpersist ../dist/include/pref ../dist/include/mimetype ../dist/include/shistory ../dist/include/view ../dist/include/gfx ../dist/include/xultmpl ../dist/include/xmlextras ../dist/include/htmlparser ../dist/include/locale ../dist/include/unicharutil ../dist/include/appcomps ../dist/include/chrome ../dist/include/xpcom \"$(SYSTEM_DEVELOPER_DIR)/Headers/FlatCarbon\"";
|
||||
HEADER_SEARCH_PATHS = "../dist/include/helperAppDlg ../dist/include/exthandler ../dist/include/intl ../dist/include/pipboot ../dist/include/pipnss ../dist/include/webbrwsr ../dist/include/dom ../dist/include/nspr ../dist/include/string ../dist/include/rdf ../dist/include/necko ../dist/include/find ../dist/include/embed_base ../dist/include/commandhandler ../dist/include/windowwatcher ../dist/include/webshell ../dist/include/widget ../dist/include/uriloader ../dist/include/docshell ../dist/include/profile ../dist/include/layout ../dist/include/content ../dist/include/webbrowserpersist ../dist/include/pref ../dist/include/mimetype ../dist/include/shistory ../dist/include/view ../dist/include/gfx ../dist/include/xultmpl ../dist/include/xmlextras ../dist/include/htmlparser ../dist/include/locale ../dist/include/unicharutil ../dist/include/appcomps ../dist/include/chrome ../dist/include/xpcom ../dist/include/ \"$(SYSTEM_DEVELOPER_DIR)/Headers/FlatCarbon\"";
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
LIBRARY_SEARCH_PATHS = "../dist/bin ../dist/lib ../dist/lib/components ../intl/unicharutil/src ../gfx/src ../js/src/liveconnect ../intl/unicharutil/util";
|
||||
OPTIMIZATION_CFLAGS = "-O2";
|
||||
@ -7350,38 +7350,38 @@
|
||||
F5EA337902EF889001A96654 = {
|
||||
isa = PBXFileReference;
|
||||
name = nsAppShellCocoa.mm;
|
||||
path = /Volumes/Development/Trees/Chimera/mozilla/widget/src/cocoa/nsAppShellCocoa.mm;
|
||||
refType = 0;
|
||||
path = ../widget/src/cocoa/nsAppShellCocoa.mm;
|
||||
refType = 2;
|
||||
};
|
||||
F5EA337A02EF889001A96654 = {
|
||||
isa = PBXFileReference;
|
||||
name = nsChildView.mm;
|
||||
path = /Volumes/Development/Trees/Chimera/mozilla/widget/src/cocoa/nsChildView.mm;
|
||||
refType = 0;
|
||||
path = ../widget/src/cocoa/nsChildView.mm;
|
||||
refType = 2;
|
||||
};
|
||||
F5EA337B02EF889001A96654 = {
|
||||
isa = PBXFileReference;
|
||||
name = nsCocoaWindow.mm;
|
||||
path = /Volumes/Development/Trees/Chimera/mozilla/widget/src/cocoa/nsCocoaWindow.mm;
|
||||
refType = 0;
|
||||
path = ../widget/src/cocoa/nsCocoaWindow.mm;
|
||||
refType = 2;
|
||||
};
|
||||
F5EA337C02EF889001A96654 = {
|
||||
isa = PBXFileReference;
|
||||
name = nsDragHelperService.cpp;
|
||||
path = /Volumes/Development/Trees/Chimera/mozilla/widget/src/cocoa/nsDragHelperService.cpp;
|
||||
refType = 0;
|
||||
path = ../widget/src/cocoa/nsDragHelperService.cpp;
|
||||
refType = 2;
|
||||
};
|
||||
F5EA337D02EF889001A96654 = {
|
||||
isa = PBXFileReference;
|
||||
name = nsDragService.cpp;
|
||||
path = /Volumes/Development/Trees/Chimera/mozilla/widget/src/cocoa/nsDragService.cpp;
|
||||
refType = 0;
|
||||
path = ../widget/src/cocoa/nsDragService.cpp;
|
||||
refType = 2;
|
||||
};
|
||||
F5EA337E02EF889001A96654 = {
|
||||
isa = PBXFileReference;
|
||||
name = nsToolkit.mm;
|
||||
path = /Volumes/Development/Trees/Chimera/mozilla/widget/src/cocoa/nsToolkit.mm;
|
||||
refType = 0;
|
||||
path = ../widget/src/cocoa/nsToolkit.mm;
|
||||
refType = 2;
|
||||
};
|
||||
F5F14E9602A5A43A01A967F3 = {
|
||||
isa = PBXFileReference;
|
||||
|
@ -51,7 +51,7 @@ http://chimera.mozdev.org\
|
||||
William Dell Wisner\
|
||||
\
|
||||
Mozilla Contributors:\
|
||||
Type "about:credits" in the URL bar.\
|
||||
Type \'d2about:credits\'d3 in the Location bar.\
|
||||
|
||||
\f2\b0 \
|
||||
\
|
||||
@ -65,7 +65,7 @@ http://chimera.mozdev.org\
|
||||
\f2\i0\b0\fs24 \
|
||||
|
||||
\f3\b Apple Computer Software Engineering\
|
||||
The [Chimera] Mailing List\
|
||||
The Chimera Mailing List\
|
||||
|
||||
\f1\i\b0\fs36 \
|
||||
\
|
||||
|
@ -4,7 +4,11 @@
|
||||
ACTIONS = {showPanel = id; };
|
||||
CLASS = AboutBox;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {creditsField = id; window = id; };
|
||||
OUTLETS = {
|
||||
buildNumberField = NSTextField;
|
||||
creditsField = NSTextView;
|
||||
window = NSWindow;
|
||||
};
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }
|
||||
|
@ -13,6 +13,6 @@
|
||||
<integer>5</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5Q45</string>
|
||||
<string>5S66</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
Binary file not shown.
Binary file not shown.
@ -1,27 +1,48 @@
|
||||
/* -*- 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.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Matt Judy (Original Author)
|
||||
*/
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* 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 Chimera code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Matt Judy
|
||||
* Simon Fraser <sfraser@netscape.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#include <Appkit/Appkit.h>
|
||||
|
||||
@interface CHAboutBox : NSObject
|
||||
{
|
||||
IBOutlet id creditsField;
|
||||
IBOutlet id window;
|
||||
IBOutlet NSTextView* creditsField;
|
||||
IBOutlet NSTextField* buildNumberField;
|
||||
IBOutlet NSWindow* window;
|
||||
NSTimer *scrollTimer;
|
||||
float currentPosition;
|
||||
float maxScrollHeight;
|
||||
|
@ -1,124 +1,154 @@
|
||||
/* -*- 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.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Matt Judy (Original Author)
|
||||
* David Hyatt <hyatt@netscape.com>
|
||||
*/
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* 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 Chimera code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Matt Judy
|
||||
* David Hyatt <hyatt@netscape.com>
|
||||
* Simon Fraser <sfraser@netscape.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#import "CHAboutBox.h"
|
||||
|
||||
#include "nsBuildID.h"
|
||||
|
||||
@interface CHAboutBox(Private)
|
||||
- (void)loadWindow;
|
||||
@end
|
||||
|
||||
@implementation CHAboutBox
|
||||
|
||||
static CHAboutBox *sharedInstance = nil;
|
||||
|
||||
+ (CHAboutBox *)sharedInstance
|
||||
{
|
||||
return sharedInstance ? sharedInstance : [[self alloc] init];
|
||||
return sharedInstance ? sharedInstance : [[self alloc] init];
|
||||
}
|
||||
|
||||
- (id)init
|
||||
{
|
||||
if (sharedInstance) {
|
||||
[self dealloc];
|
||||
} else {
|
||||
sharedInstance = [super init];
|
||||
}
|
||||
return sharedInstance;
|
||||
if (sharedInstance) {
|
||||
[self dealloc];
|
||||
} else {
|
||||
sharedInstance = [super init];
|
||||
}
|
||||
return sharedInstance;
|
||||
}
|
||||
|
||||
- (IBAction)showPanel:(id)sender
|
||||
{
|
||||
if (!creditsField) {
|
||||
NSString *creditsPath;
|
||||
NSAttributedString *creditsString;
|
||||
float fieldHeight;
|
||||
float containerHeight;
|
||||
if (!creditsField) {
|
||||
[self loadWindow];
|
||||
}
|
||||
|
||||
if (![window isVisible]) {
|
||||
currentPosition = 0;
|
||||
restartAtTop = NO;
|
||||
startTime = [NSDate timeIntervalSinceReferenceDate] + 3.0;
|
||||
[creditsField scrollPoint:NSMakePoint( 0, 0 )];
|
||||
}
|
||||
|
||||
if (![NSBundle loadNibNamed:@"AboutBox" owner:self]) {
|
||||
NSLog( @"Failed to load AboutBox.nib" );
|
||||
NSBeep();
|
||||
return;
|
||||
}
|
||||
|
||||
[window setTitle:[NSString stringWithFormat: @"About %@", NSLocalizedStringFromTable(@"CFBundleName", @"InfoPlist", nil)]];
|
||||
|
||||
creditsPath = [[NSBundle mainBundle] pathForResource:@"Credits" ofType:@"rtf"];
|
||||
creditsString = [[NSAttributedString alloc] initWithPath:creditsPath documentAttributes:nil];
|
||||
[creditsField replaceCharactersInRange:NSMakeRange( 0, 0 )
|
||||
withRTF:[creditsString RTFFromRange:
|
||||
NSMakeRange( 0, [creditsString length] )
|
||||
documentAttributes:nil]];
|
||||
|
||||
fieldHeight = [creditsField frame].size.height;
|
||||
|
||||
(void)[[creditsField layoutManager] glyphRangeForTextContainer:[creditsField textContainer]];
|
||||
containerHeight = [[creditsField layoutManager] usedRectForTextContainer:
|
||||
[creditsField textContainer]].size.height;
|
||||
maxScrollHeight = containerHeight - fieldHeight;
|
||||
|
||||
[window setExcludedFromWindowsMenu:YES];
|
||||
[window setMenu:nil];
|
||||
[window center];
|
||||
}
|
||||
|
||||
if (![window isVisible]) {
|
||||
currentPosition = 0;
|
||||
restartAtTop = NO;
|
||||
startTime = [NSDate timeIntervalSinceReferenceDate] + 3.0;
|
||||
[creditsField scrollPoint:NSMakePoint( 0, 0 )];
|
||||
}
|
||||
|
||||
[window makeKeyAndOrderFront:nil];
|
||||
[window makeKeyAndOrderFront:nil];
|
||||
}
|
||||
|
||||
- (void)windowDidBecomeKey:(NSNotification *)notification
|
||||
{
|
||||
scrollTimer = [NSTimer scheduledTimerWithTimeInterval:1/4
|
||||
target:self
|
||||
selector:@selector(scrollCredits:)
|
||||
userInfo:nil
|
||||
repeats:YES];
|
||||
scrollTimer = [NSTimer scheduledTimerWithTimeInterval:0.03
|
||||
target:self
|
||||
selector:@selector(scrollCredits:)
|
||||
userInfo:nil
|
||||
repeats:YES];
|
||||
}
|
||||
|
||||
- (void)windowDidResignKey:(NSNotification *)notification
|
||||
{
|
||||
[scrollTimer invalidate];
|
||||
[scrollTimer invalidate];
|
||||
}
|
||||
|
||||
- (void)scrollCredits:(NSTimer *)timer
|
||||
{
|
||||
if ([NSDate timeIntervalSinceReferenceDate] >= startTime) {
|
||||
|
||||
if (restartAtTop) {
|
||||
startTime = [NSDate timeIntervalSinceReferenceDate] + 3.0;
|
||||
restartAtTop = NO;
|
||||
[creditsField scrollPoint:NSMakePoint( 0, 0 )];
|
||||
return;
|
||||
}
|
||||
|
||||
if (currentPosition >= maxScrollHeight) {
|
||||
startTime = [NSDate timeIntervalSinceReferenceDate] + 3.0;
|
||||
currentPosition = 0;
|
||||
restartAtTop = YES;
|
||||
} else {
|
||||
[creditsField scrollPoint:NSMakePoint( 0, currentPosition )];
|
||||
currentPosition += 0.01;
|
||||
}
|
||||
if ([NSDate timeIntervalSinceReferenceDate] >= startTime)
|
||||
{
|
||||
if (restartAtTop) {
|
||||
startTime = [NSDate timeIntervalSinceReferenceDate] + 3.0;
|
||||
restartAtTop = NO;
|
||||
[creditsField scrollPoint:NSMakePoint( 0, 0 )];
|
||||
return;
|
||||
}
|
||||
|
||||
if (currentPosition >= maxScrollHeight) {
|
||||
startTime = [NSDate timeIntervalSinceReferenceDate] + 3.0;
|
||||
currentPosition = 0;
|
||||
restartAtTop = YES;
|
||||
} else {
|
||||
[creditsField scrollPoint:NSMakePoint( 0, currentPosition )];
|
||||
currentPosition += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)loadWindow
|
||||
{
|
||||
NSString *creditsPath;
|
||||
NSAttributedString *creditsString;
|
||||
float fieldHeight;
|
||||
float containerHeight;
|
||||
|
||||
if (![NSBundle loadNibNamed:@"AboutBox" owner:self]) {
|
||||
NSLog( @"Failed to load AboutBox.nib" );
|
||||
NSBeep();
|
||||
return;
|
||||
}
|
||||
|
||||
[window setTitle:[NSString stringWithFormat: @"About %@", NSLocalizedStringFromTable(@"CFBundleName", @"InfoPlist", nil)]];
|
||||
|
||||
creditsPath = [[NSBundle mainBundle] pathForResource:@"Credits" ofType:@"rtf"];
|
||||
creditsString = [[NSAttributedString alloc] initWithPath:creditsPath documentAttributes:nil];
|
||||
[creditsField replaceCharactersInRange:NSMakeRange( 0, 0 )
|
||||
withRTF:[creditsString RTFFromRange:
|
||||
NSMakeRange( 0, [creditsString length] )
|
||||
documentAttributes:nil]];
|
||||
|
||||
fieldHeight = [creditsField frame].size.height;
|
||||
|
||||
(void)[[creditsField layoutManager] glyphRangeForTextContainer:[creditsField textContainer]];
|
||||
containerHeight = [[creditsField layoutManager] usedRectForTextContainer:
|
||||
[creditsField textContainer]].size.height;
|
||||
maxScrollHeight = containerHeight - fieldHeight;
|
||||
|
||||
[buildNumberField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"BuildID", @""), NS_BUILD_ID]];
|
||||
[window setExcludedFromWindowsMenu:YES];
|
||||
[window setMenu:nil];
|
||||
[window center];
|
||||
}
|
||||
|
||||
@end
|
||||
|
6
chimera/AboutBox.nib/classes.nib
generated
6
chimera/AboutBox.nib/classes.nib
generated
@ -4,7 +4,11 @@
|
||||
ACTIONS = {showPanel = id; };
|
||||
CLASS = AboutBox;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {creditsField = id; window = id; };
|
||||
OUTLETS = {
|
||||
buildNumberField = NSTextField;
|
||||
creditsField = NSTextView;
|
||||
window = NSWindow;
|
||||
};
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }
|
||||
|
2
chimera/AboutBox.nib/info.nib
generated
2
chimera/AboutBox.nib/info.nib
generated
@ -13,6 +13,6 @@
|
||||
<integer>5</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5Q45</string>
|
||||
<string>5S66</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
BIN
chimera/AboutBox.nib/objects.nib
generated
BIN
chimera/AboutBox.nib/objects.nib
generated
Binary file not shown.
@ -1,27 +1,48 @@
|
||||
/* -*- 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.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Matt Judy (Original Author)
|
||||
*/
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* 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 Chimera code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Matt Judy
|
||||
* Simon Fraser <sfraser@netscape.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#include <Appkit/Appkit.h>
|
||||
|
||||
@interface CHAboutBox : NSObject
|
||||
{
|
||||
IBOutlet id creditsField;
|
||||
IBOutlet id window;
|
||||
IBOutlet NSTextView* creditsField;
|
||||
IBOutlet NSTextField* buildNumberField;
|
||||
IBOutlet NSWindow* window;
|
||||
NSTimer *scrollTimer;
|
||||
float currentPosition;
|
||||
float maxScrollHeight;
|
||||
|
@ -1,124 +1,154 @@
|
||||
/* -*- 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.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Matt Judy (Original Author)
|
||||
* David Hyatt <hyatt@netscape.com>
|
||||
*/
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* 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 Chimera code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Matt Judy
|
||||
* David Hyatt <hyatt@netscape.com>
|
||||
* Simon Fraser <sfraser@netscape.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#import "CHAboutBox.h"
|
||||
|
||||
#include "nsBuildID.h"
|
||||
|
||||
@interface CHAboutBox(Private)
|
||||
- (void)loadWindow;
|
||||
@end
|
||||
|
||||
@implementation CHAboutBox
|
||||
|
||||
static CHAboutBox *sharedInstance = nil;
|
||||
|
||||
+ (CHAboutBox *)sharedInstance
|
||||
{
|
||||
return sharedInstance ? sharedInstance : [[self alloc] init];
|
||||
return sharedInstance ? sharedInstance : [[self alloc] init];
|
||||
}
|
||||
|
||||
- (id)init
|
||||
{
|
||||
if (sharedInstance) {
|
||||
[self dealloc];
|
||||
} else {
|
||||
sharedInstance = [super init];
|
||||
}
|
||||
return sharedInstance;
|
||||
if (sharedInstance) {
|
||||
[self dealloc];
|
||||
} else {
|
||||
sharedInstance = [super init];
|
||||
}
|
||||
return sharedInstance;
|
||||
}
|
||||
|
||||
- (IBAction)showPanel:(id)sender
|
||||
{
|
||||
if (!creditsField) {
|
||||
NSString *creditsPath;
|
||||
NSAttributedString *creditsString;
|
||||
float fieldHeight;
|
||||
float containerHeight;
|
||||
if (!creditsField) {
|
||||
[self loadWindow];
|
||||
}
|
||||
|
||||
if (![window isVisible]) {
|
||||
currentPosition = 0;
|
||||
restartAtTop = NO;
|
||||
startTime = [NSDate timeIntervalSinceReferenceDate] + 3.0;
|
||||
[creditsField scrollPoint:NSMakePoint( 0, 0 )];
|
||||
}
|
||||
|
||||
if (![NSBundle loadNibNamed:@"AboutBox" owner:self]) {
|
||||
NSLog( @"Failed to load AboutBox.nib" );
|
||||
NSBeep();
|
||||
return;
|
||||
}
|
||||
|
||||
[window setTitle:[NSString stringWithFormat: @"About %@", NSLocalizedStringFromTable(@"CFBundleName", @"InfoPlist", nil)]];
|
||||
|
||||
creditsPath = [[NSBundle mainBundle] pathForResource:@"Credits" ofType:@"rtf"];
|
||||
creditsString = [[NSAttributedString alloc] initWithPath:creditsPath documentAttributes:nil];
|
||||
[creditsField replaceCharactersInRange:NSMakeRange( 0, 0 )
|
||||
withRTF:[creditsString RTFFromRange:
|
||||
NSMakeRange( 0, [creditsString length] )
|
||||
documentAttributes:nil]];
|
||||
|
||||
fieldHeight = [creditsField frame].size.height;
|
||||
|
||||
(void)[[creditsField layoutManager] glyphRangeForTextContainer:[creditsField textContainer]];
|
||||
containerHeight = [[creditsField layoutManager] usedRectForTextContainer:
|
||||
[creditsField textContainer]].size.height;
|
||||
maxScrollHeight = containerHeight - fieldHeight;
|
||||
|
||||
[window setExcludedFromWindowsMenu:YES];
|
||||
[window setMenu:nil];
|
||||
[window center];
|
||||
}
|
||||
|
||||
if (![window isVisible]) {
|
||||
currentPosition = 0;
|
||||
restartAtTop = NO;
|
||||
startTime = [NSDate timeIntervalSinceReferenceDate] + 3.0;
|
||||
[creditsField scrollPoint:NSMakePoint( 0, 0 )];
|
||||
}
|
||||
|
||||
[window makeKeyAndOrderFront:nil];
|
||||
[window makeKeyAndOrderFront:nil];
|
||||
}
|
||||
|
||||
- (void)windowDidBecomeKey:(NSNotification *)notification
|
||||
{
|
||||
scrollTimer = [NSTimer scheduledTimerWithTimeInterval:1/4
|
||||
target:self
|
||||
selector:@selector(scrollCredits:)
|
||||
userInfo:nil
|
||||
repeats:YES];
|
||||
scrollTimer = [NSTimer scheduledTimerWithTimeInterval:0.03
|
||||
target:self
|
||||
selector:@selector(scrollCredits:)
|
||||
userInfo:nil
|
||||
repeats:YES];
|
||||
}
|
||||
|
||||
- (void)windowDidResignKey:(NSNotification *)notification
|
||||
{
|
||||
[scrollTimer invalidate];
|
||||
[scrollTimer invalidate];
|
||||
}
|
||||
|
||||
- (void)scrollCredits:(NSTimer *)timer
|
||||
{
|
||||
if ([NSDate timeIntervalSinceReferenceDate] >= startTime) {
|
||||
|
||||
if (restartAtTop) {
|
||||
startTime = [NSDate timeIntervalSinceReferenceDate] + 3.0;
|
||||
restartAtTop = NO;
|
||||
[creditsField scrollPoint:NSMakePoint( 0, 0 )];
|
||||
return;
|
||||
}
|
||||
|
||||
if (currentPosition >= maxScrollHeight) {
|
||||
startTime = [NSDate timeIntervalSinceReferenceDate] + 3.0;
|
||||
currentPosition = 0;
|
||||
restartAtTop = YES;
|
||||
} else {
|
||||
[creditsField scrollPoint:NSMakePoint( 0, currentPosition )];
|
||||
currentPosition += 0.01;
|
||||
}
|
||||
if ([NSDate timeIntervalSinceReferenceDate] >= startTime)
|
||||
{
|
||||
if (restartAtTop) {
|
||||
startTime = [NSDate timeIntervalSinceReferenceDate] + 3.0;
|
||||
restartAtTop = NO;
|
||||
[creditsField scrollPoint:NSMakePoint( 0, 0 )];
|
||||
return;
|
||||
}
|
||||
|
||||
if (currentPosition >= maxScrollHeight) {
|
||||
startTime = [NSDate timeIntervalSinceReferenceDate] + 3.0;
|
||||
currentPosition = 0;
|
||||
restartAtTop = YES;
|
||||
} else {
|
||||
[creditsField scrollPoint:NSMakePoint( 0, currentPosition )];
|
||||
currentPosition += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)loadWindow
|
||||
{
|
||||
NSString *creditsPath;
|
||||
NSAttributedString *creditsString;
|
||||
float fieldHeight;
|
||||
float containerHeight;
|
||||
|
||||
if (![NSBundle loadNibNamed:@"AboutBox" owner:self]) {
|
||||
NSLog( @"Failed to load AboutBox.nib" );
|
||||
NSBeep();
|
||||
return;
|
||||
}
|
||||
|
||||
[window setTitle:[NSString stringWithFormat: @"About %@", NSLocalizedStringFromTable(@"CFBundleName", @"InfoPlist", nil)]];
|
||||
|
||||
creditsPath = [[NSBundle mainBundle] pathForResource:@"Credits" ofType:@"rtf"];
|
||||
creditsString = [[NSAttributedString alloc] initWithPath:creditsPath documentAttributes:nil];
|
||||
[creditsField replaceCharactersInRange:NSMakeRange( 0, 0 )
|
||||
withRTF:[creditsString RTFFromRange:
|
||||
NSMakeRange( 0, [creditsString length] )
|
||||
documentAttributes:nil]];
|
||||
|
||||
fieldHeight = [creditsField frame].size.height;
|
||||
|
||||
(void)[[creditsField layoutManager] glyphRangeForTextContainer:[creditsField textContainer]];
|
||||
containerHeight = [[creditsField layoutManager] usedRectForTextContainer:
|
||||
[creditsField textContainer]].size.height;
|
||||
maxScrollHeight = containerHeight - fieldHeight;
|
||||
|
||||
[buildNumberField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"BuildID", @""), NS_BUILD_ID]];
|
||||
[window setExcludedFromWindowsMenu:YES];
|
||||
[window setMenu:nil];
|
||||
[window center];
|
||||
}
|
||||
|
||||
@end
|
||||
|
@ -267,7 +267,7 @@
|
||||
buildSettings = {
|
||||
DEBUGGING_SYMBOLS = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = "";
|
||||
HEADER_SEARCH_PATHS = "../dist/include/exthandler ../dist/include/helperAppDlg ../dist/include/intl ../dist/include/pipboot ../dist/include/pipnss ../dist/include/webbrwsr ../dist/include/dom ../dist/include/nspr ../dist/include/string ../dist/include/rdf ../dist/include/necko ../dist/include/find ../dist/include/embed_base ../dist/include/commandhandler ../dist/include/windowwatcher ../dist/include/webshell ../dist/include/widget ../dist/include/uriloader ../dist/include/docshell ../dist/include/profile ../dist/include/layout ../dist/include/content ../dist/include/webbrowserpersist ../dist/include/pref ../dist/include/mimetype ../dist/include/shistory ../dist/include/view ../dist/include/gfx ../dist/include/xultmpl ../dist/include/xmlextras ../dist/include/htmlparser ../dist/include/locale ../dist/include/unicharutil ../dist/include/appcomps ../dist/include/chrome ../dist/include/xpcom \"$(SYSTEM_DEVELOPER_DIR)/Headers/FlatCarbon\"";
|
||||
HEADER_SEARCH_PATHS = "../dist/include/exthandler ../dist/include/helperAppDlg ../dist/include/intl ../dist/include/pipboot ../dist/include/pipnss ../dist/include/webbrwsr ../dist/include/dom ../dist/include/nspr ../dist/include/string ../dist/include/rdf ../dist/include/necko ../dist/include/find ../dist/include/embed_base ../dist/include/commandhandler ../dist/include/windowwatcher ../dist/include/webshell ../dist/include/widget ../dist/include/uriloader ../dist/include/docshell ../dist/include/profile ../dist/include/layout ../dist/include/content ../dist/include/webbrowserpersist ../dist/include/pref ../dist/include/mimetype ../dist/include/shistory ../dist/include/view ../dist/include/gfx ../dist/include/xultmpl ../dist/include/xmlextras ../dist/include/htmlparser ../dist/include/locale ../dist/include/unicharutil ../dist/include/appcomps ../dist/include/chrome ../dist/include/xpcom ../dist/include/ \"$(SYSTEM_DEVELOPER_DIR)/Headers/FlatCarbon\"";
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
LIBRARY_SEARCH_PATHS = "../dist/bin ../dist/lib ../intl/unicharutil/util ../modules/zlib/src";
|
||||
OPTIMIZATION_CFLAGS = "-O2";
|
||||
@ -4930,7 +4930,7 @@
|
||||
buildSettings = {
|
||||
DEBUGGING_SYMBOLS = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = "";
|
||||
HEADER_SEARCH_PATHS = "../dist/include/helperAppDlg ../dist/include/exthandler ../dist/include/intl ../dist/include/pipboot ../dist/include/pipnss ../dist/include/webbrwsr ../dist/include/dom ../dist/include/nspr ../dist/include/string ../dist/include/rdf ../dist/include/necko ../dist/include/find ../dist/include/embed_base ../dist/include/commandhandler ../dist/include/windowwatcher ../dist/include/webshell ../dist/include/widget ../dist/include/uriloader ../dist/include/docshell ../dist/include/profile ../dist/include/layout ../dist/include/content ../dist/include/webbrowserpersist ../dist/include/pref ../dist/include/mimetype ../dist/include/shistory ../dist/include/view ../dist/include/gfx ../dist/include/xultmpl ../dist/include/xmlextras ../dist/include/htmlparser ../dist/include/locale ../dist/include/unicharutil ../dist/include/appcomps ../dist/include/chrome ../dist/include/xpcom \"$(SYSTEM_DEVELOPER_DIR)/Headers/FlatCarbon\"";
|
||||
HEADER_SEARCH_PATHS = "../dist/include/helperAppDlg ../dist/include/exthandler ../dist/include/intl ../dist/include/pipboot ../dist/include/pipnss ../dist/include/webbrwsr ../dist/include/dom ../dist/include/nspr ../dist/include/string ../dist/include/rdf ../dist/include/necko ../dist/include/find ../dist/include/embed_base ../dist/include/commandhandler ../dist/include/windowwatcher ../dist/include/webshell ../dist/include/widget ../dist/include/uriloader ../dist/include/docshell ../dist/include/profile ../dist/include/layout ../dist/include/content ../dist/include/webbrowserpersist ../dist/include/pref ../dist/include/mimetype ../dist/include/shistory ../dist/include/view ../dist/include/gfx ../dist/include/xultmpl ../dist/include/xmlextras ../dist/include/htmlparser ../dist/include/locale ../dist/include/unicharutil ../dist/include/appcomps ../dist/include/chrome ../dist/include/xpcom ../dist/include/ \"$(SYSTEM_DEVELOPER_DIR)/Headers/FlatCarbon\"";
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
LIBRARY_SEARCH_PATHS = "../dist/bin ../dist/lib ../dist/lib/components ../intl/unicharutil/src ../gfx/src ../js/src/liveconnect ../intl/unicharutil/util";
|
||||
OPTIMIZATION_CFLAGS = "-O2";
|
||||
@ -7350,38 +7350,38 @@
|
||||
F5EA337902EF889001A96654 = {
|
||||
isa = PBXFileReference;
|
||||
name = nsAppShellCocoa.mm;
|
||||
path = /Volumes/Development/Trees/Chimera/mozilla/widget/src/cocoa/nsAppShellCocoa.mm;
|
||||
refType = 0;
|
||||
path = ../widget/src/cocoa/nsAppShellCocoa.mm;
|
||||
refType = 2;
|
||||
};
|
||||
F5EA337A02EF889001A96654 = {
|
||||
isa = PBXFileReference;
|
||||
name = nsChildView.mm;
|
||||
path = /Volumes/Development/Trees/Chimera/mozilla/widget/src/cocoa/nsChildView.mm;
|
||||
refType = 0;
|
||||
path = ../widget/src/cocoa/nsChildView.mm;
|
||||
refType = 2;
|
||||
};
|
||||
F5EA337B02EF889001A96654 = {
|
||||
isa = PBXFileReference;
|
||||
name = nsCocoaWindow.mm;
|
||||
path = /Volumes/Development/Trees/Chimera/mozilla/widget/src/cocoa/nsCocoaWindow.mm;
|
||||
refType = 0;
|
||||
path = ../widget/src/cocoa/nsCocoaWindow.mm;
|
||||
refType = 2;
|
||||
};
|
||||
F5EA337C02EF889001A96654 = {
|
||||
isa = PBXFileReference;
|
||||
name = nsDragHelperService.cpp;
|
||||
path = /Volumes/Development/Trees/Chimera/mozilla/widget/src/cocoa/nsDragHelperService.cpp;
|
||||
refType = 0;
|
||||
path = ../widget/src/cocoa/nsDragHelperService.cpp;
|
||||
refType = 2;
|
||||
};
|
||||
F5EA337D02EF889001A96654 = {
|
||||
isa = PBXFileReference;
|
||||
name = nsDragService.cpp;
|
||||
path = /Volumes/Development/Trees/Chimera/mozilla/widget/src/cocoa/nsDragService.cpp;
|
||||
refType = 0;
|
||||
path = ../widget/src/cocoa/nsDragService.cpp;
|
||||
refType = 2;
|
||||
};
|
||||
F5EA337E02EF889001A96654 = {
|
||||
isa = PBXFileReference;
|
||||
name = nsToolkit.mm;
|
||||
path = /Volumes/Development/Trees/Chimera/mozilla/widget/src/cocoa/nsToolkit.mm;
|
||||
refType = 0;
|
||||
path = ../widget/src/cocoa/nsToolkit.mm;
|
||||
refType = 2;
|
||||
};
|
||||
F5F14E9602A5A43A01A967F3 = {
|
||||
isa = PBXFileReference;
|
||||
|
@ -51,7 +51,7 @@ http://chimera.mozdev.org\
|
||||
William Dell Wisner\
|
||||
\
|
||||
Mozilla Contributors:\
|
||||
Type "about:credits" in the URL bar.\
|
||||
Type \'d2about:credits\'d3 in the Location bar.\
|
||||
|
||||
\f2\b0 \
|
||||
\
|
||||
@ -65,7 +65,7 @@ http://chimera.mozdev.org\
|
||||
\f2\i0\b0\fs24 \
|
||||
|
||||
\f3\b Apple Computer Software Engineering\
|
||||
The [Chimera] Mailing List\
|
||||
The Chimera Mailing List\
|
||||
|
||||
\f1\i\b0\fs36 \
|
||||
\
|
||||
|
6
chimera/English.lproj/AboutBox.nib/classes.nib
generated
6
chimera/English.lproj/AboutBox.nib/classes.nib
generated
@ -4,7 +4,11 @@
|
||||
ACTIONS = {showPanel = id; };
|
||||
CLASS = AboutBox;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {creditsField = id; window = id; };
|
||||
OUTLETS = {
|
||||
buildNumberField = NSTextField;
|
||||
creditsField = NSTextView;
|
||||
window = NSWindow;
|
||||
};
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }
|
||||
|
2
chimera/English.lproj/AboutBox.nib/info.nib
generated
2
chimera/English.lproj/AboutBox.nib/info.nib
generated
@ -13,6 +13,6 @@
|
||||
<integer>5</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5Q45</string>
|
||||
<string>5S66</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
BIN
chimera/English.lproj/AboutBox.nib/objects.nib
generated
BIN
chimera/English.lproj/AboutBox.nib/objects.nib
generated
Binary file not shown.
Binary file not shown.
@ -267,7 +267,7 @@
|
||||
buildSettings = {
|
||||
DEBUGGING_SYMBOLS = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = "";
|
||||
HEADER_SEARCH_PATHS = "../dist/include/exthandler ../dist/include/helperAppDlg ../dist/include/intl ../dist/include/pipboot ../dist/include/pipnss ../dist/include/webbrwsr ../dist/include/dom ../dist/include/nspr ../dist/include/string ../dist/include/rdf ../dist/include/necko ../dist/include/find ../dist/include/embed_base ../dist/include/commandhandler ../dist/include/windowwatcher ../dist/include/webshell ../dist/include/widget ../dist/include/uriloader ../dist/include/docshell ../dist/include/profile ../dist/include/layout ../dist/include/content ../dist/include/webbrowserpersist ../dist/include/pref ../dist/include/mimetype ../dist/include/shistory ../dist/include/view ../dist/include/gfx ../dist/include/xultmpl ../dist/include/xmlextras ../dist/include/htmlparser ../dist/include/locale ../dist/include/unicharutil ../dist/include/appcomps ../dist/include/chrome ../dist/include/xpcom \"$(SYSTEM_DEVELOPER_DIR)/Headers/FlatCarbon\"";
|
||||
HEADER_SEARCH_PATHS = "../dist/include/exthandler ../dist/include/helperAppDlg ../dist/include/intl ../dist/include/pipboot ../dist/include/pipnss ../dist/include/webbrwsr ../dist/include/dom ../dist/include/nspr ../dist/include/string ../dist/include/rdf ../dist/include/necko ../dist/include/find ../dist/include/embed_base ../dist/include/commandhandler ../dist/include/windowwatcher ../dist/include/webshell ../dist/include/widget ../dist/include/uriloader ../dist/include/docshell ../dist/include/profile ../dist/include/layout ../dist/include/content ../dist/include/webbrowserpersist ../dist/include/pref ../dist/include/mimetype ../dist/include/shistory ../dist/include/view ../dist/include/gfx ../dist/include/xultmpl ../dist/include/xmlextras ../dist/include/htmlparser ../dist/include/locale ../dist/include/unicharutil ../dist/include/appcomps ../dist/include/chrome ../dist/include/xpcom ../dist/include/ \"$(SYSTEM_DEVELOPER_DIR)/Headers/FlatCarbon\"";
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
LIBRARY_SEARCH_PATHS = "../dist/bin ../dist/lib ../intl/unicharutil/util ../modules/zlib/src";
|
||||
OPTIMIZATION_CFLAGS = "-O2";
|
||||
@ -4930,7 +4930,7 @@
|
||||
buildSettings = {
|
||||
DEBUGGING_SYMBOLS = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = "";
|
||||
HEADER_SEARCH_PATHS = "../dist/include/helperAppDlg ../dist/include/exthandler ../dist/include/intl ../dist/include/pipboot ../dist/include/pipnss ../dist/include/webbrwsr ../dist/include/dom ../dist/include/nspr ../dist/include/string ../dist/include/rdf ../dist/include/necko ../dist/include/find ../dist/include/embed_base ../dist/include/commandhandler ../dist/include/windowwatcher ../dist/include/webshell ../dist/include/widget ../dist/include/uriloader ../dist/include/docshell ../dist/include/profile ../dist/include/layout ../dist/include/content ../dist/include/webbrowserpersist ../dist/include/pref ../dist/include/mimetype ../dist/include/shistory ../dist/include/view ../dist/include/gfx ../dist/include/xultmpl ../dist/include/xmlextras ../dist/include/htmlparser ../dist/include/locale ../dist/include/unicharutil ../dist/include/appcomps ../dist/include/chrome ../dist/include/xpcom \"$(SYSTEM_DEVELOPER_DIR)/Headers/FlatCarbon\"";
|
||||
HEADER_SEARCH_PATHS = "../dist/include/helperAppDlg ../dist/include/exthandler ../dist/include/intl ../dist/include/pipboot ../dist/include/pipnss ../dist/include/webbrwsr ../dist/include/dom ../dist/include/nspr ../dist/include/string ../dist/include/rdf ../dist/include/necko ../dist/include/find ../dist/include/embed_base ../dist/include/commandhandler ../dist/include/windowwatcher ../dist/include/webshell ../dist/include/widget ../dist/include/uriloader ../dist/include/docshell ../dist/include/profile ../dist/include/layout ../dist/include/content ../dist/include/webbrowserpersist ../dist/include/pref ../dist/include/mimetype ../dist/include/shistory ../dist/include/view ../dist/include/gfx ../dist/include/xultmpl ../dist/include/xmlextras ../dist/include/htmlparser ../dist/include/locale ../dist/include/unicharutil ../dist/include/appcomps ../dist/include/chrome ../dist/include/xpcom ../dist/include/ \"$(SYSTEM_DEVELOPER_DIR)/Headers/FlatCarbon\"";
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
LIBRARY_SEARCH_PATHS = "../dist/bin ../dist/lib ../dist/lib/components ../intl/unicharutil/src ../gfx/src ../js/src/liveconnect ../intl/unicharutil/util";
|
||||
OPTIMIZATION_CFLAGS = "-O2";
|
||||
@ -7350,38 +7350,38 @@
|
||||
F5EA337902EF889001A96654 = {
|
||||
isa = PBXFileReference;
|
||||
name = nsAppShellCocoa.mm;
|
||||
path = /Volumes/Development/Trees/Chimera/mozilla/widget/src/cocoa/nsAppShellCocoa.mm;
|
||||
refType = 0;
|
||||
path = ../widget/src/cocoa/nsAppShellCocoa.mm;
|
||||
refType = 2;
|
||||
};
|
||||
F5EA337A02EF889001A96654 = {
|
||||
isa = PBXFileReference;
|
||||
name = nsChildView.mm;
|
||||
path = /Volumes/Development/Trees/Chimera/mozilla/widget/src/cocoa/nsChildView.mm;
|
||||
refType = 0;
|
||||
path = ../widget/src/cocoa/nsChildView.mm;
|
||||
refType = 2;
|
||||
};
|
||||
F5EA337B02EF889001A96654 = {
|
||||
isa = PBXFileReference;
|
||||
name = nsCocoaWindow.mm;
|
||||
path = /Volumes/Development/Trees/Chimera/mozilla/widget/src/cocoa/nsCocoaWindow.mm;
|
||||
refType = 0;
|
||||
path = ../widget/src/cocoa/nsCocoaWindow.mm;
|
||||
refType = 2;
|
||||
};
|
||||
F5EA337C02EF889001A96654 = {
|
||||
isa = PBXFileReference;
|
||||
name = nsDragHelperService.cpp;
|
||||
path = /Volumes/Development/Trees/Chimera/mozilla/widget/src/cocoa/nsDragHelperService.cpp;
|
||||
refType = 0;
|
||||
path = ../widget/src/cocoa/nsDragHelperService.cpp;
|
||||
refType = 2;
|
||||
};
|
||||
F5EA337D02EF889001A96654 = {
|
||||
isa = PBXFileReference;
|
||||
name = nsDragService.cpp;
|
||||
path = /Volumes/Development/Trees/Chimera/mozilla/widget/src/cocoa/nsDragService.cpp;
|
||||
refType = 0;
|
||||
path = ../widget/src/cocoa/nsDragService.cpp;
|
||||
refType = 2;
|
||||
};
|
||||
F5EA337E02EF889001A96654 = {
|
||||
isa = PBXFileReference;
|
||||
name = nsToolkit.mm;
|
||||
path = /Volumes/Development/Trees/Chimera/mozilla/widget/src/cocoa/nsToolkit.mm;
|
||||
refType = 0;
|
||||
path = ../widget/src/cocoa/nsToolkit.mm;
|
||||
refType = 2;
|
||||
};
|
||||
F5F14E9602A5A43A01A967F3 = {
|
||||
isa = PBXFileReference;
|
||||
|
@ -51,7 +51,7 @@ http://chimera.mozdev.org\
|
||||
William Dell Wisner\
|
||||
\
|
||||
Mozilla Contributors:\
|
||||
Type "about:credits" in the URL bar.\
|
||||
Type \'d2about:credits\'d3 in the Location bar.\
|
||||
|
||||
\f2\b0 \
|
||||
\
|
||||
@ -65,7 +65,7 @@ http://chimera.mozdev.org\
|
||||
\f2\i0\b0\fs24 \
|
||||
|
||||
\f3\b Apple Computer Software Engineering\
|
||||
The [Chimera] Mailing List\
|
||||
The Chimera Mailing List\
|
||||
|
||||
\f1\i\b0\fs36 \
|
||||
\
|
||||
|
@ -4,7 +4,11 @@
|
||||
ACTIONS = {showPanel = id; };
|
||||
CLASS = AboutBox;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {creditsField = id; window = id; };
|
||||
OUTLETS = {
|
||||
buildNumberField = NSTextField;
|
||||
creditsField = NSTextView;
|
||||
window = NSWindow;
|
||||
};
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }
|
||||
|
@ -13,6 +13,6 @@
|
||||
<integer>5</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5Q45</string>
|
||||
<string>5S66</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
Binary file not shown.
Binary file not shown.
@ -1,27 +1,48 @@
|
||||
/* -*- 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.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Matt Judy (Original Author)
|
||||
*/
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* 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 Chimera code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Matt Judy
|
||||
* Simon Fraser <sfraser@netscape.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#include <Appkit/Appkit.h>
|
||||
|
||||
@interface CHAboutBox : NSObject
|
||||
{
|
||||
IBOutlet id creditsField;
|
||||
IBOutlet id window;
|
||||
IBOutlet NSTextView* creditsField;
|
||||
IBOutlet NSTextField* buildNumberField;
|
||||
IBOutlet NSWindow* window;
|
||||
NSTimer *scrollTimer;
|
||||
float currentPosition;
|
||||
float maxScrollHeight;
|
||||
|
@ -1,124 +1,154 @@
|
||||
/* -*- 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.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Matt Judy (Original Author)
|
||||
* David Hyatt <hyatt@netscape.com>
|
||||
*/
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* 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 Chimera code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Matt Judy
|
||||
* David Hyatt <hyatt@netscape.com>
|
||||
* Simon Fraser <sfraser@netscape.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#import "CHAboutBox.h"
|
||||
|
||||
#include "nsBuildID.h"
|
||||
|
||||
@interface CHAboutBox(Private)
|
||||
- (void)loadWindow;
|
||||
@end
|
||||
|
||||
@implementation CHAboutBox
|
||||
|
||||
static CHAboutBox *sharedInstance = nil;
|
||||
|
||||
+ (CHAboutBox *)sharedInstance
|
||||
{
|
||||
return sharedInstance ? sharedInstance : [[self alloc] init];
|
||||
return sharedInstance ? sharedInstance : [[self alloc] init];
|
||||
}
|
||||
|
||||
- (id)init
|
||||
{
|
||||
if (sharedInstance) {
|
||||
[self dealloc];
|
||||
} else {
|
||||
sharedInstance = [super init];
|
||||
}
|
||||
return sharedInstance;
|
||||
if (sharedInstance) {
|
||||
[self dealloc];
|
||||
} else {
|
||||
sharedInstance = [super init];
|
||||
}
|
||||
return sharedInstance;
|
||||
}
|
||||
|
||||
- (IBAction)showPanel:(id)sender
|
||||
{
|
||||
if (!creditsField) {
|
||||
NSString *creditsPath;
|
||||
NSAttributedString *creditsString;
|
||||
float fieldHeight;
|
||||
float containerHeight;
|
||||
if (!creditsField) {
|
||||
[self loadWindow];
|
||||
}
|
||||
|
||||
if (![window isVisible]) {
|
||||
currentPosition = 0;
|
||||
restartAtTop = NO;
|
||||
startTime = [NSDate timeIntervalSinceReferenceDate] + 3.0;
|
||||
[creditsField scrollPoint:NSMakePoint( 0, 0 )];
|
||||
}
|
||||
|
||||
if (![NSBundle loadNibNamed:@"AboutBox" owner:self]) {
|
||||
NSLog( @"Failed to load AboutBox.nib" );
|
||||
NSBeep();
|
||||
return;
|
||||
}
|
||||
|
||||
[window setTitle:[NSString stringWithFormat: @"About %@", NSLocalizedStringFromTable(@"CFBundleName", @"InfoPlist", nil)]];
|
||||
|
||||
creditsPath = [[NSBundle mainBundle] pathForResource:@"Credits" ofType:@"rtf"];
|
||||
creditsString = [[NSAttributedString alloc] initWithPath:creditsPath documentAttributes:nil];
|
||||
[creditsField replaceCharactersInRange:NSMakeRange( 0, 0 )
|
||||
withRTF:[creditsString RTFFromRange:
|
||||
NSMakeRange( 0, [creditsString length] )
|
||||
documentAttributes:nil]];
|
||||
|
||||
fieldHeight = [creditsField frame].size.height;
|
||||
|
||||
(void)[[creditsField layoutManager] glyphRangeForTextContainer:[creditsField textContainer]];
|
||||
containerHeight = [[creditsField layoutManager] usedRectForTextContainer:
|
||||
[creditsField textContainer]].size.height;
|
||||
maxScrollHeight = containerHeight - fieldHeight;
|
||||
|
||||
[window setExcludedFromWindowsMenu:YES];
|
||||
[window setMenu:nil];
|
||||
[window center];
|
||||
}
|
||||
|
||||
if (![window isVisible]) {
|
||||
currentPosition = 0;
|
||||
restartAtTop = NO;
|
||||
startTime = [NSDate timeIntervalSinceReferenceDate] + 3.0;
|
||||
[creditsField scrollPoint:NSMakePoint( 0, 0 )];
|
||||
}
|
||||
|
||||
[window makeKeyAndOrderFront:nil];
|
||||
[window makeKeyAndOrderFront:nil];
|
||||
}
|
||||
|
||||
- (void)windowDidBecomeKey:(NSNotification *)notification
|
||||
{
|
||||
scrollTimer = [NSTimer scheduledTimerWithTimeInterval:1/4
|
||||
target:self
|
||||
selector:@selector(scrollCredits:)
|
||||
userInfo:nil
|
||||
repeats:YES];
|
||||
scrollTimer = [NSTimer scheduledTimerWithTimeInterval:0.03
|
||||
target:self
|
||||
selector:@selector(scrollCredits:)
|
||||
userInfo:nil
|
||||
repeats:YES];
|
||||
}
|
||||
|
||||
- (void)windowDidResignKey:(NSNotification *)notification
|
||||
{
|
||||
[scrollTimer invalidate];
|
||||
[scrollTimer invalidate];
|
||||
}
|
||||
|
||||
- (void)scrollCredits:(NSTimer *)timer
|
||||
{
|
||||
if ([NSDate timeIntervalSinceReferenceDate] >= startTime) {
|
||||
|
||||
if (restartAtTop) {
|
||||
startTime = [NSDate timeIntervalSinceReferenceDate] + 3.0;
|
||||
restartAtTop = NO;
|
||||
[creditsField scrollPoint:NSMakePoint( 0, 0 )];
|
||||
return;
|
||||
}
|
||||
|
||||
if (currentPosition >= maxScrollHeight) {
|
||||
startTime = [NSDate timeIntervalSinceReferenceDate] + 3.0;
|
||||
currentPosition = 0;
|
||||
restartAtTop = YES;
|
||||
} else {
|
||||
[creditsField scrollPoint:NSMakePoint( 0, currentPosition )];
|
||||
currentPosition += 0.01;
|
||||
}
|
||||
if ([NSDate timeIntervalSinceReferenceDate] >= startTime)
|
||||
{
|
||||
if (restartAtTop) {
|
||||
startTime = [NSDate timeIntervalSinceReferenceDate] + 3.0;
|
||||
restartAtTop = NO;
|
||||
[creditsField scrollPoint:NSMakePoint( 0, 0 )];
|
||||
return;
|
||||
}
|
||||
|
||||
if (currentPosition >= maxScrollHeight) {
|
||||
startTime = [NSDate timeIntervalSinceReferenceDate] + 3.0;
|
||||
currentPosition = 0;
|
||||
restartAtTop = YES;
|
||||
} else {
|
||||
[creditsField scrollPoint:NSMakePoint( 0, currentPosition )];
|
||||
currentPosition += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)loadWindow
|
||||
{
|
||||
NSString *creditsPath;
|
||||
NSAttributedString *creditsString;
|
||||
float fieldHeight;
|
||||
float containerHeight;
|
||||
|
||||
if (![NSBundle loadNibNamed:@"AboutBox" owner:self]) {
|
||||
NSLog( @"Failed to load AboutBox.nib" );
|
||||
NSBeep();
|
||||
return;
|
||||
}
|
||||
|
||||
[window setTitle:[NSString stringWithFormat: @"About %@", NSLocalizedStringFromTable(@"CFBundleName", @"InfoPlist", nil)]];
|
||||
|
||||
creditsPath = [[NSBundle mainBundle] pathForResource:@"Credits" ofType:@"rtf"];
|
||||
creditsString = [[NSAttributedString alloc] initWithPath:creditsPath documentAttributes:nil];
|
||||
[creditsField replaceCharactersInRange:NSMakeRange( 0, 0 )
|
||||
withRTF:[creditsString RTFFromRange:
|
||||
NSMakeRange( 0, [creditsString length] )
|
||||
documentAttributes:nil]];
|
||||
|
||||
fieldHeight = [creditsField frame].size.height;
|
||||
|
||||
(void)[[creditsField layoutManager] glyphRangeForTextContainer:[creditsField textContainer]];
|
||||
containerHeight = [[creditsField layoutManager] usedRectForTextContainer:
|
||||
[creditsField textContainer]].size.height;
|
||||
maxScrollHeight = containerHeight - fieldHeight;
|
||||
|
||||
[buildNumberField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"BuildID", @""), NS_BUILD_ID]];
|
||||
[window setExcludedFromWindowsMenu:YES];
|
||||
[window setMenu:nil];
|
||||
[window center];
|
||||
}
|
||||
|
||||
@end
|
||||
|
Loading…
Reference in New Issue
Block a user