[aquaskk-changes 92] CVS update: sandbox/AquaSKK

アーカイブの一覧に戻る

S.Abe xdd****@users*****
2005年 11月 3日 (木) 14:55:18 JST


Index: sandbox/AquaSKK/AboutBoxController.mm
diff -u /dev/null sandbox/AquaSKK/AboutBoxController.mm:1.1
--- /dev/null	Thu Nov  3 14:55:18 2005
+++ sandbox/AquaSKK/AboutBoxController.mm	Thu Nov  3 14:55:18 2005
@@ -0,0 +1,68 @@
+/*  $Id: AboutBoxController.mm,v 1.1 2005/11/03 05:55:18 xdd Exp $
+	
+    MacOS X implementation of the SKK input method.
+    Copyright (C) 2002-2004 phonohawk
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+#import "AboutBoxController.h"
+
+
+ @ implementation AboutBoxController
+
++ (AboutBoxController*)sharedController
+{
+	static AboutBoxController* _shared_instance = nil;
+	if (_shared_instance == nil)
+	{
+		_shared_instance = [[AboutBoxController alloc] init];
+	}
+	return _shared_instance;
+}
+
+- (id)init
+{
+	NSDictionary *dictionary = [[NSBundle mainBundle] infoDictionary];
+	NSString *copyright, *version;
+	
+    self = [super initWithWindowNibName:@"AboutBox"];
+    [self window]; // ロード
+    
+    [[self window] setLevel:NSFloatingWindowLevel];
+    
+	copyright = [NSString stringWithFormat:@"%@%@"
+						,[copyrightField stringValue],[dictionary objectForKey:@"CFBundleGetInfoString"]];
+	
+	[copyrightField setStringValue:copyright];
+	
+	version = [NSString stringWithFormat:@"%@%@ - %@"
+						,[versionField stringValue]
+						,[dictionary objectForKey:@"CFBundleShortVersionString"]
+						,[dictionary objectForKey:@"CFBundleVersion"]];
+	[versionField setStringValue:version];
+	
+	return self;
+}
+
+- (IBAction)showWindow:(id)sender
+{
+	[NSApp activateIgnoringOtherApps:YES];
+	[[self window] makeKeyAndOrderFront:nil];
+	
+	[super showWindow:sender];
+}
+
+ @ end


aquaskk-changes メーリングリストの案内
アーカイブの一覧に戻る