[aquaskk-changes 91] CVS update: AquaSKK

Back to archive index

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


Index: AquaSKK/AboutBoxController.h
diff -u /dev/null AquaSKK/AboutBoxController.h:1.1
--- /dev/null	Thu Nov  3 14:46:51 2005
+++ AquaSKK/AboutBoxController.h	Thu Nov  3 14:46:51 2005
@@ -0,0 +1,15 @@
+/* AboutBoxController */
+
+#import <Cocoa/Cocoa.h>
+
+ @ interface AboutBoxController : NSWindowController
+{
+    IBOutlet id copyrightField;
+    IBOutlet id versionField;
+}
+
++ (AboutBoxController*)sharedController;
+
+- (id)init;
+- (IBAction)showWindow:(id)sender;
+ @ end
Index: AquaSKK/AboutBoxController.mm
diff -u /dev/null AquaSKK/AboutBoxController.mm:1.1
--- /dev/null	Thu Nov  3 14:46:51 2005
+++ AquaSKK/AboutBoxController.mm	Thu Nov  3 14:46:51 2005
@@ -0,0 +1,56 @@
+//
+//  AboutBoxController.mm
+//  AquaSKK
+//
+//  Created by 阿部 慎一 on 05/11/02.
+//  Copyright 2005 __MyCompanyName__. All rights reserved.
+//
+
+#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
Index: AquaSKK/BIM.cpp
diff -u AquaSKK/BIM.cpp:1.5 AquaSKK/BIM.cpp:1.6
--- AquaSKK/BIM.cpp:1.5	Sat Oct  8 17:10:48 2005
+++ AquaSKK/BIM.cpp	Thu Nov  3 14:46:51 2005
@@ -1,4 +1,4 @@
-/*  $Id: BIM.cpp,v 1.5 2005/10/08 08:10:48 t-suwa Exp $
+/*  $Id: BIM.cpp,v 1.6 2005/11/03 05:46:51 xdd Exp $
 	
     MacOS X implementation of the SKK input method.
     Copyright (C) 2002-2004 phonohawk
@@ -314,6 +314,20 @@
 	if (modifiers & (1 << cmdKeyBit)) { // ƒRƒ}ƒ“ƒhƒL[‚ª‰Ÿ‚³‚ê‚Ä‚¢‚½B 
 	    handled = false;
 	}
+	else if (SkkConfig::config().isNumericKeypad(keyCode)	//”¼Špƒeƒ“ƒL[“ü—Í
+			&& ClientConfiguration::theInstance().isNumericKeypad_HalfWidth()) {	
+			
+		IMSessionInputMode* inputMode
+			= (*(BIMSessionHandle)inSessionHandle)->imsession_input_mode;
+//		ChildInputMode& mode = inputMode->getCurrentInputMode();
+		int mode = inputMode->currentInputMode();
+
+		inputMode->setHanAscInputMode();
+		handled = BIMHandleInput(inSessionHandle,charCode);
+		inputMode->setInputMode(mode);
+		inputMode->updatePencilMenuIcon();
+		
+	}
 	else if (keyCode == 0x66) { // ‰p”
 	    if (SkkConfig::config().useEisuuToSetHenkanPoint()) {
 		handled = BIMHandleInput(inSessionHandle, SkkConfig::config().setHenkanPointKey());
@@ -327,7 +341,25 @@
 		handled = BIMHandleInput(inSessionHandle, SkkConfig::config().setHenkanPointKey());
 	    }
 	    else {
-		handled = BIMHandleInput(inSessionHandle, SkkConfig::config().kanaModeKey());
+			IMSessionInputMode* inputMode
+				= (*(BIMSessionHandle)inSessionHandle)->imsession_input_mode;
+			int imMode = inputMode->currentInputMode();
+		
+			switch(imMode) {
+			case HiraganaIM:
+			case HanAscIM:
+			case ZenAscIM:
+				handled = BIMHandleInput(inSessionHandle, SkkConfig::config().kanaModeKey());
+				break;
+			case ZenKataIM:
+			case HanKataIM:
+				handled = BIMHandleInput(inSessionHandle, SkkConfig::config().toggleKanaKey());
+				break;
+			}
+		
+			if (modifiers & (1 << shiftKeyBit))	//ƒVƒtƒgƒL[‰Ÿ‰º‚ŃJƒi
+				handled = BIMHandleInput(inSessionHandle, SkkConfig::config().toggleKanaKey());
+		//handled = BIMHandleInput(inSessionHandle, SkkConfig::config().kanaModeKey());
 	    }
 	}
 	else {
Index: AquaSKK/BIMClientServer.h
diff -u AquaSKK/BIMClientServer.h:1.2 AquaSKK/BIMClientServer.h:1.3
--- AquaSKK/BIMClientServer.h:1.2	Sat Oct  8 00:08:36 2005
+++ AquaSKK/BIMClientServer.h	Thu Nov  3 14:46:51 2005
@@ -1,5 +1,5 @@
 /*
-	$Id: BIMClientServer.h,v 1.2 2005/10/07 15:08:36 t-suwa Exp $
+	$Id: BIMClientServer.h,v 1.3 2005/11/03 05:46:51 xdd Exp $
 	---------
 	
     MacOS X implementation of the SKK input method.
@@ -106,5 +106,6 @@
 
 enum {
     kBasicMessageIsSkkEggLikeNewline = 500,	// 
+	kBasicMessageIsNumericKeypad_HalfWidth = 501,
 };
 
Index: AquaSKK/ChangeLog
diff -u AquaSKK/ChangeLog:1.11 AquaSKK/ChangeLog:1.12
--- AquaSKK/ChangeLog:1.11	Wed Oct 26 22:30:11 2005
+++ AquaSKK/ChangeLog	Thu Nov  3 14:46:51 2005
@@ -1,3 +1,31 @@
+2005-11-2  Shin_ichi Abe  <xdd****@mac*****>
+
+	* AboutBox.nib: ƒo[ƒWƒ‡ƒ“•\‹L—pTextField‚ð’ljÁ‚ÆWindowƒŠƒTƒCƒYOffB
+
+	* Preferences.nib: ”¼Špƒeƒ“ƒL[“ü—̓IƒvƒVƒ‡ƒ“‚̒ljÁB
+
+	* AboutBoxController.mm: V‹Kì¬Bƒo[ƒWƒ‡ƒ“‚ƃRƒs[ƒ‰ƒCƒg‚Ì•\Ž¦‚ð
+	AquaSKKInputMethod.component‚̐ݒèƒtƒ@ƒCƒ‹‚©‚ç“®“I‚Ɏ擾B
+
+	* BIM.cpp: ”¼Špƒeƒ“ƒL[“ü—͑ΉžB‚©‚ȃL[‚Å"‚Ђ炩‚È"AShift+‚©‚ȃL[(ƒJƒiƒL[)‚Å
+	"ƒJƒ^ƒJƒi"ƒ‚[ƒh‚ւ̐؂è‘Ö‚¦‘ΉžB
+
+	* SkkConfig.*: ƒeƒ“ƒL[”»’è—p‚̃L[ƒR[ƒhƒ}ƒbƒv’ljÁ
+
+	* BIMClientServer.h: ”¼Špƒeƒ“ƒL[“ü—͑Ήž
+
+	* ClientConfiguration.*: ”¼Špƒeƒ“ƒL[“ü—̓IƒvƒVƒ‡ƒ“‚̒ljÁB
+
+	* ClientMessageReceiver.cpp: ”¼Špƒeƒ“ƒL[“ü—͑Ήž
+
+	* ParentInputMode.*: 
+		currentInputMode() Œ»Ý‚Ì“ü—̓‚[ƒh‚̎擾B
+		sethogehogeInputMode() ƒAƒCƒRƒ“•ÏX–³‚µ“ü—̓‚[ƒhƒ`ƒFƒ“ƒW
+
+	* PreferencesController.*: ”¼Špƒeƒ“ƒL[ƒIƒvƒVƒ‡ƒ“‚̒ljÁ
+
+	* ServerMessageReceiver.*: ”¼Špƒeƒ“ƒL[“ü—͑Ήž
+
 2005-10-26  Tomotaka SUWA  <t.suw****@mac*****>
 
 	* SKKServer.cpp (searchCompletions): u¤v‚¾‚¯‚̏ó‘Ԃŕ⊮‚·‚é‚Æ—Ž
Index: AquaSKK/ClientConfiguration.cpp
diff -u AquaSKK/ClientConfiguration.cpp:1.2 AquaSKK/ClientConfiguration.cpp:1.3
--- AquaSKK/ClientConfiguration.cpp:1.2	Sat Oct  8 00:08:36 2005
+++ AquaSKK/ClientConfiguration.cpp	Thu Nov  3 14:46:51 2005
@@ -1,5 +1,5 @@
 /*
-	$Id: ClientConfiguration.cpp,v 1.2 2005/10/07 15:08:36 t-suwa Exp $
+	$Id: ClientConfiguration.cpp,v 1.3 2005/11/03 05:46:51 xdd Exp $
 	---------
 	
     MacOS X implementation of the SKK input method.
@@ -52,21 +52,26 @@
     // Šù‚ɏ‰Šú‰»‚³‚ê‚Ä‚¢‚½‚牽‚à‚µ‚È‚¢B
     if(initialized) return;
 
-    CppCFData result
-	= ServerConnectionFactory::theInstance().newConnection().send(
-	    kBasicMessageIsSkkEggLikeNewline,
-	    kAquaSKKServerRunLoopMode);
-
-    if(result.getLength() == sizeof(bool)) {
-	// •Ô‚³‚ꂽ’l‚Í‘½•ª³‚µ‚¢‚¾‚낤B
-	result.copyData(0, sizeof(bool), &skkEggLikeNewline);
-    } else {
-	skkEggLikeNewline = false;
-    }
+	skkEggLikeNewline = getOption(kBasicMessageIsSkkEggLikeNewline);
+	numericKeypad_HalfWidth = getOption(kBasicMessageIsNumericKeypad_HalfWidth);
 
     initialized = true;
 }
 
+bool ClientConfiguration::getOption(SInt32 msgid)
+{
+	bool state = false;
+	
+	CppCFData result = ServerConnectionFactory::theInstance().newConnection().send(
+																					msgid,
+																					kAquaSKKServerRunLoopMode);
+
+	if(result.getLength() == sizeof(bool))	// •Ô‚³‚ꂽ’l‚Í‘½•ª³‚µ‚¢‚¾‚낤B
+		result.copyData(0, sizeof(bool), &state);
+	
+	return state;
+}
+ 
 ClientConfiguration& ClientConfiguration::reloadConfiguration()
 {
     // initializedƒtƒ‰ƒO‚ðÁ‚µ‚Ä‚©‚çinitialize();ŽÀsB
@@ -82,3 +87,10 @@
 
     return skkEggLikeNewline;
 }
+
+bool ClientConfiguration::isNumericKeypad_HalfWidth()
+{
+    initialize();
+
+    return numericKeypad_HalfWidth;
+}
Index: AquaSKK/ClientConfiguration.h
diff -u AquaSKK/ClientConfiguration.h:1.2 AquaSKK/ClientConfiguration.h:1.3
--- AquaSKK/ClientConfiguration.h:1.2	Sat Oct  8 00:08:36 2005
+++ AquaSKK/ClientConfiguration.h	Thu Nov  3 14:46:51 2005
@@ -1,5 +1,5 @@
 /*
-	$Id: ClientConfiguration.h,v 1.2 2005/10/07 15:08:36 t-suwa Exp $
+	$Id: ClientConfiguration.h,v 1.3 2005/11/03 05:46:51 xdd Exp $
 	---------
 	
     MacOS X implementation of the SKK input method.
@@ -36,10 +36,12 @@
 class ClientConfiguration {
     bool initialized; // ŽI‚É–â‚¢‡‚킹‚ú‰»‚³‚ꂽ‚©‚Ç‚¤‚©B
     bool skkEggLikeNewline;
+	bool numericKeypad_HalfWidth;
 		
     ClientConfiguration();
 		
     void initialize();
+	bool getOption(SInt32 msgid);
 	
 public:
     static ClientConfiguration& theInstance();
@@ -47,4 +49,5 @@
     // ‚à‚¤ˆê“xƒT[ƒo[‚É–â‚¢‡‚킹‚čXV‚·‚éB
     ClientConfiguration& reloadConfiguration();
     bool isSkkEggLikeNewline();
+	bool isNumericKeypad_HalfWidth();
 };
Index: AquaSKK/ClientMessageReceiver.cpp
diff -u AquaSKK/ClientMessageReceiver.cpp:1.2 AquaSKK/ClientMessageReceiver.cpp:1.3
--- AquaSKK/ClientMessageReceiver.cpp:1.2	Sat Oct  8 00:08:36 2005
+++ AquaSKK/ClientMessageReceiver.cpp	Thu Nov  3 14:46:51 2005
@@ -1,5 +1,5 @@
 /*
-	$Id: ClientMessageReceiver.cpp,v 1.2 2005/10/07 15:08:36 t-suwa Exp $
+	$Id: ClientMessageReceiver.cpp,v 1.3 2005/11/03 05:46:51 xdd Exp $
 	---------
 	
     MacOS X implementation of the SKK input method.
@@ -78,6 +78,7 @@
 {
     switch(msgid) {
     case kBasicMessageIsSkkEggLikeNewline:
+	case kBasicMessageIsNumericKeypad_HalfWidth:
 	ClientConfiguration::theInstance().reloadConfiguration();
 	break;
     default:
Index: AquaSKK/ParentInputMode.cpp
diff -u AquaSKK/ParentInputMode.cpp:1.3 AquaSKK/ParentInputMode.cpp:1.4
--- AquaSKK/ParentInputMode.cpp:1.3	Sat Oct  8 17:10:48 2005
+++ AquaSKK/ParentInputMode.cpp	Thu Nov  3 14:46:51 2005
@@ -1,5 +1,5 @@
 /*
-	$Id: ParentInputMode.cpp,v 1.3 2005/10/08 08:10:48 t-suwa Exp $
+	$Id: ParentInputMode.cpp,v 1.4 2005/11/03 05:46:51 xdd Exp $
 	---------
 	
     MacOS X implementation of the SKK input method.
@@ -284,6 +284,92 @@
 	updatePencilMenuIcon();
 }
 
+int ParentInputMode::currentInputMode()
+{
+	if (current_input_mode == dynamic_cast<ChildInputMode*>(&hiragana_input_mode)) {
+		return HiraganaIM;
+	}
+	else if (current_input_mode == dynamic_cast<ChildInputMode*>(&zen_kata_input_mode)) {
+		return ZenKataIM;
+	}
+	else if (current_input_mode == dynamic_cast<ChildInputMode*>(&han_kata_input_mode)) {
+		return HanKataIM;
+	}
+	else if (current_input_mode == dynamic_cast<ChildInputMode*>(&han_asc_input_mode)) {
+		return HanAscIM;
+	}
+	else if (current_input_mode == dynamic_cast<ChildInputMode*>(&zen_asc_input_mode)) {
+		return ZenAscIM;
+	}
+	
+	return 0;
+}
+
+void ParentInputMode::setHiraganaInputMode()
+{
+	current_input_mode = &hiragana_input_mode;
+}
+
+void ParentInputMode::setZenKataInputMode()
+{
+	current_input_mode = &zen_kata_input_mode;
+}
+
+void ParentInputMode::setHanKataInputMode()
+{
+	current_input_mode = &han_kata_input_mode;
+}
+
+void ParentInputMode::setHanAscInputMode()
+{
+	current_input_mode = &han_asc_input_mode;
+}
+
+void ParentInputMode::setZenAscInputMode()
+{
+	current_input_mode = &zen_asc_input_mode;
+}
+
+void ParentInputMode::setInputMode(int aMode)
+{
+	switch(aMode){
+		case HiraganaIM:
+			setHiraganaInputMode();
+			break;
+		case ZenKataIM:
+			setZenKataInputMode();
+			break;
+		case HanKataIM:
+			setHanKataInputMode();
+			break;
+		case HanAscIM:
+			setHanAscInputMode();
+			break;
+		case ZenAscIM:
+			setZenAscInputMode();
+			break;
+	}
+}
+/*
+void ParentInputMode::setInputMode(ChildInputMode& aMode)
+{
+	if (&aMode == dynamic_cast<ChildInputMode*>(&hiragana_input_mode)) {
+		setHiraganaInputMode();
+	}
+	else if (&aMode == dynamic_cast<ChildInputMode*>(&zen_kata_input_mode)) {
+		setZenKataInputMode();
+	}
+	else if (&aMode == dynamic_cast<ChildInputMode*>(&han_kata_input_mode)) {
+		setHanKataInputMode();
+	}
+	else if (&aMode == dynamic_cast<ChildInputMode*>(&han_asc_input_mode)) {
+		setHanAscInputMode();
+	}
+	else if (&aMode == dynamic_cast<ChildInputMode*>(&zen_asc_input_mode)) {
+		setZenAscInputMode();
+	}
+}*/
+
 bool ParentInputMode::isHiraganaInputMode() const
 {
 	return current_input_mode == dynamic_cast<const ChildInputMode*>(&hiragana_input_mode);
Index: AquaSKK/ParentInputMode.h
diff -u AquaSKK/ParentInputMode.h:1.2 AquaSKK/ParentInputMode.h:1.3
--- AquaSKK/ParentInputMode.h:1.2	Sat Oct  8 00:08:36 2005
+++ AquaSKK/ParentInputMode.h	Thu Nov  3 14:46:51 2005
@@ -1,4 +1,4 @@
-/*  $Id: ParentInputMode.h,v 1.2 2005/10/07 15:08:36 t-suwa Exp $
+/*  $Id: ParentInputMode.h,v 1.3 2005/11/03 05:46:51 xdd Exp $
 	
     MacOS X implementation of the SKK input method.
     Copyright (C) 2002-2004 phonohawk
@@ -20,6 +20,14 @@
 
 #pragma once
 
+enum {
+	HiraganaIM = 100,
+    ZenKataIM = 101,
+    HanKataIM  = 102,
+    HanAscIM  = 103,
+    ZenAscIM  = 104,
+};
+
 /*
   ParentInputMode‚́A‘¼‚̃Cƒ“ƒvƒbƒgƒ‚[ƒh‚ðŽ‚¿AØ‚è‘Ö‚¦‚邱‚Ƃ̏o—ˆ‚é’ŠÛƒNƒ‰ƒX‚Å‚·B
   ‚±‚ê‚ðŒp³‚µ‚½RootInputMode‚̃Cƒ“ƒXƒ^ƒ“ƒX‚ðABIMSessionHandle‚ª—BˆêŽ‚ÂŽ–‚É‚È‚è‚Ü‚·B
@@ -75,6 +83,16 @@
     virtual void goHanAscInputMode();
     // ‘SŠpƒAƒXƒL[ƒ‚[ƒh‚Ö
     virtual void goZenAscInputMode();
+	
+	virtual int ParentInputMode::currentInputMode();
+
+	virtual void setHiraganaInputMode();
+	virtual void setZenKataInputMode();
+	virtual void setHanKataInputMode();
+	virtual void setHanAscInputMode();
+	virtual void setZenAscInputMode();
+	virtual void setInputMode(int aMode);
+//	virtual void setInputMode(ChildInputMode& aMode);
     
     virtual bool isHiraganaInputMode() const;
     virtual bool isZenKataInputMode() const;
Index: AquaSKK/PreferencesController.h
diff -u AquaSKK/PreferencesController.h:1.5 AquaSKK/PreferencesController.h:1.6
--- AquaSKK/PreferencesController.h:1.5	Sat Oct  8 17:10:48 2005
+++ AquaSKK/PreferencesController.h	Thu Nov  3 14:46:51 2005
@@ -1,5 +1,5 @@
 /*  -*- objc -*-
-    $Id: PreferencesController.h,v 1.5 2005/10/08 08:10:48 t-suwa Exp $
+    $Id: PreferencesController.h,v 1.6 2005/11/03 05:46:51 xdd Exp $
     ---------
 	
     MacOS X implementation of the SKK input method.
@@ -28,6 +28,7 @@
 
 @interface PreferencesController : NSWindowController {
   IBOutlet id skkEggLikeNewlineBtn;
+  IBOutlet id NumericKeypad_HalfWidthBtn;
   IBOutlet id fontBtn;
   IBOutlet id fontSizePopUp;
   IBOutlet id winColor;
@@ -65,11 +66,15 @@
 
 - (NSColor *)windowColor;
 - (float)windowAlpha;
+
 - (BOOL)isSkkEggLikeNewline;
+- (IBAction)skkEggLikeNewline:(id)sender;
+- (BOOL)isNumericKeypad_HalfWidth;
+- (IBAction)numericKeypad_HalfWidth:(id)sender;
 
-- (NSArray *)path;
+- (void)setState:(SInt32)msgID state:(int)state;
 
-- (IBAction)skkEggLikeNewline:(id)sender;
+- (NSArray *)path;
 
 - (IBAction)selectMainDic:(id)sender;
 - (IBAction)selectSubDic:(id)sender;
Index: AquaSKK/PreferencesController.mm
diff -u AquaSKK/PreferencesController.mm:1.4 AquaSKK/PreferencesController.mm:1.5
--- AquaSKK/PreferencesController.mm:1.4	Sat Oct  8 00:08:36 2005
+++ AquaSKK/PreferencesController.mm	Thu Nov  3 14:46:51 2005
@@ -1,5 +1,5 @@
 /*  -*- objc -*-
-    $Id: PreferencesController.mm,v 1.4 2005/10/07 15:08:36 t-suwa Exp $
+    $Id: PreferencesController.mm,v 1.5 2005/11/03 05:46:51 xdd Exp $
     ---------
 	
     MacOS X implementation of the SKK input method.
@@ -70,6 +70,7 @@
 					 @"0.7", @"dic.WindowAlpha.kotoeri",
 					 @"5", @"dic.showCandsWindowAfterNthCand",
 					 @"NO", @"dic.skk-egg-like-newline.kotoeri",
+					 @"NO", @"dic.NumericKeypad_HalfWidth.kotoeri",
 					 @"NO",@"pref.skkserv.enabled",
 					 @"1178",@"pref.skkserv.port",
 					 @"YES",@"pref.skkserv.local-only",
@@ -94,6 +95,7 @@
 	
     [winTransparent setDoubleValue:[defaults floatForKey:@"dic.WindowAlpha.kotoeri"]];
     [skkEggLikeNewlineBtn setState:[defaults boolForKey:@"dic.skk-egg-like-newline.kotoeri"]];
+	[NumericKeypad_HalfWidthBtn setState:[defaults boolForKey:@"dic.NumericKeypad_HalfWidth.kotoeri"]];
     
     path_to_main_dic = [[NSString alloc] initWithString:[defaults stringForKey:@"dic.path.main"]];
     path_to_sub_dic = [[NSString alloc] initWithString:[defaults stringForKey:@"dic.path.sub"]];
@@ -114,6 +116,7 @@
     [defaults setObject:[NSArchiver archivedDataWithRootObject:[winColor color]] forKey:@"dic.WindowColor.kotoeri"];
     [defaults setFloat:[winTransparent doubleValue] forKey:@"dic.WindowAlpha.kotoeri"];
     [defaults setBool:[skkEggLikeNewlineBtn state] forKey:@"dic.skk-egg-like-newline.kotoeri"];
+	[defaults setBool:[NumericKeypad_HalfWidthBtn state] forKey:@"dic.NumericKeypad_HalfWidth.kotoeri"];
 	
 	[defaults setObject:[NSNumber numberWithFloat:[font pointSize]] forKey:@"dic.FontSize.Window"];
 	[defaults setObject:[font fontName] forKey:@"dic.FontName.Window"];
@@ -167,16 +170,30 @@
 
 - (IBAction)skkEggLikeNewline:(id)sender
 {
-    bool skkegglikenewline = ([sender state]) ? true : false;
-
-    CppCFData data(&skkegglikenewline, sizeof(bool));
+	[self setState:kBasicMessageIsSkkEggLikeNewline state:[sender state]];
+}
 
-    ClientConnectionFactory::theInstance().newConnection().send(
-	kBasicMessageIsSkkEggLikeNewline, data);
+- (BOOL)isNumericKeypad_HalfWidth
+{
+    return [NumericKeypad_HalfWidthBtn state];
+}
 
-    [self saveUserDefault:self];
+- (IBAction)numericKeypad_HalfWidth:(id)sender
+{	
+	[self setState:kBasicMessageIsNumericKeypad_HalfWidth state:[sender state]];
 }
 
+- (void)setState:(SInt32)msgID state:(int)state
+{
+	bool boolState = state ? true : false;
+
+    CppCFData data(&boolState, sizeof(bool));
+
+    ClientConnectionFactory::theInstance().newConnection().send(msgID, data);
+
+     [self saveUserDefault:self];
+ }
+
 // SKKŽ«‘
 
 - (NSString*)getPathToMainDic
Index: AquaSKK/ServerMessageReceiver.h
diff -u AquaSKK/ServerMessageReceiver.h:1.2 AquaSKK/ServerMessageReceiver.h:1.3
--- AquaSKK/ServerMessageReceiver.h:1.2	Sat Oct  8 00:08:36 2005
+++ AquaSKK/ServerMessageReceiver.h	Thu Nov  3 14:46:51 2005
@@ -1,5 +1,5 @@
 /*
-	$Id: ServerMessageReceiver.h,v 1.2 2005/10/07 15:08:36 t-suwa Exp $
+	$Id: ServerMessageReceiver.h,v 1.3 2005/11/03 05:46:51 xdd Exp $
 	---------
 	
     MacOS X implementation of the SKK input method.
@@ -41,6 +41,7 @@
     void showAboutBox();
     void showPreferencesBox();
     CppCFData eggLikeNewline();
+	CppCFData numericKeypad_HalfWidth();
     CppCFData fetchCompletions(const CppCFData& attachment);
 
 public:
Index: AquaSKK/ServerMessageReceiver.mm
diff -u AquaSKK/ServerMessageReceiver.mm:1.2 AquaSKK/ServerMessageReceiver.mm:1.3
--- AquaSKK/ServerMessageReceiver.mm:1.2	Sat Oct  8 00:08:36 2005
+++ AquaSKK/ServerMessageReceiver.mm	Thu Nov  3 14:46:51 2005
@@ -1,5 +1,5 @@
 /* -*- objc -*-
-	$Id: ServerMessageReceiver.mm,v 1.2 2005/10/07 15:08:36 t-suwa Exp $
+	$Id: ServerMessageReceiver.mm,v 1.3 2005/11/03 05:46:51 xdd Exp $
 	---------
 	
     MacOS X implementation of the SKK input method.
@@ -24,6 +24,7 @@
 #import "CandidatesView.h"
 #import "CandidatesWindowController.h"
 #import "PreferencesController.h"
+#import "AboutBoxController.h"
 #import "UserDicSaver.h"
 
 #include <Carbon/Carbon.h>
@@ -122,6 +123,9 @@
     case kBasicMessageIsSkkEggLikeNewline:
 	reply = eggLikeNewline();
 	break;
+	case kBasicMessageIsNumericKeypad_HalfWidth:
+	reply = numericKeypad_HalfWidth();
+	break;
     case kSKKShowWordRegistrationBox:
 	break;
     case kSKKFetchCompletions:
@@ -219,12 +223,13 @@
 
 void ServerMessageReceiver::showAboutBox()
 {
-    static NSWindowController* _static_controller = nil;
+	[[AboutBoxController sharedController] showWindow:nil];
+    /*static NSWindowController* _static_controller = nil;
     if (_static_controller == nil)
 	_static_controller = [[NSWindowController alloc] initWithWindowNibName:@"AboutBox"];
 
     [[_static_controller window] setLevel:NSFloatingWindowLevel];
-    [_static_controller showWindow:nil];
+    [_static_controller showWindow:nil];*/
 }
 
 void ServerMessageReceiver::showPreferencesBox()
@@ -240,6 +245,14 @@
     return CppCFData(&isSkkEggLikeNewline, sizeof(bool));
 }
 
+CppCFData ServerMessageReceiver::numericKeypad_HalfWidth()
+{
+    bool isNumericKeypad_HalfWidth =
+	[[PreferencesController sharedController] isNumericKeypad_HalfWidth] ? true : false;
+
+    return CppCFData(&isNumericKeypad_HalfWidth, sizeof(bool));
+}
+
 CppCFData ServerMessageReceiver::fetchCompletions(const CppCFData& attachment)
 {
     CppCFString query(attachment.getData());
Index: AquaSKK/SkkConfig.cpp
diff -u AquaSKK/SkkConfig.cpp:1.2 AquaSKK/SkkConfig.cpp:1.3
--- AquaSKK/SkkConfig.cpp:1.2	Sat Oct  8 00:08:36 2005
+++ AquaSKK/SkkConfig.cpp	Thu Nov  3 14:46:51 2005
@@ -1,5 +1,5 @@
 /*
- *  $Id: SkkConfig.cpp,v 1.2 2005/10/07 15:08:36 t-suwa Exp $
+ *  $Id: SkkConfig.cpp,v 1.3 2005/11/03 05:46:51 xdd Exp $
  *
  *  KeymapConfig.cpp
  *  AquaSKK
@@ -127,8 +127,11 @@
 		okuri_fs.close();
 	}
 	
-	for (int i = 0; i < 256; i++)
+	for (int i = 0; i < 256; i++){
 		mappedKey_[i] = false;
+		numkey_map[i] = false;
+	}
+	
 	mappedKey_[kanaModeKey_] = true;
 	mappedKey_[latinModeKey_] = true;
 	mappedKey_[jisx0208LatinModeKey_] = true;
@@ -144,6 +147,25 @@
 	mappedKey_[abbrevNextKey_] = true;
 	mappedKey_[setHenkanPointKey_] = true;
 	mappedKey_[pasteKey_] = true;
+	
+	//numeric keypad - keycode
+	numkey_map[0x41] = true;	// .
+	numkey_map[0x43] = true;	// *
+	numkey_map[0x45] = true;	// +
+	numkey_map[0x4b] = true;	// /
+	numkey_map[0x4e] = true;	// -
+	numkey_map[0x51] = true;	// =
+	numkey_map[0x52] = true;	// 0
+	numkey_map[0x53] = true;	// 1
+	numkey_map[0x54] = true;	// 2
+	numkey_map[0x55] = true;	// 3
+	numkey_map[0x56] = true;	// 4
+	numkey_map[0x57] = true;	// 5
+	numkey_map[0x58] = true;	// 6
+	numkey_map[0x59] = true;	// 7
+	numkey_map[0x5b] = true;	// 8
+	numkey_map[0x5c] = true;	// 9
+	numkey_map[0x5f] = true;	// ,
 }
 
 
Index: AquaSKK/SkkConfig.h
diff -u AquaSKK/SkkConfig.h:1.2 AquaSKK/SkkConfig.h:1.3
--- AquaSKK/SkkConfig.h:1.2	Sat Oct  8 00:08:36 2005
+++ AquaSKK/SkkConfig.h	Thu Nov  3 14:46:51 2005
@@ -1,5 +1,5 @@
 /*
- *  $Id: SkkConfig.h,v 1.2 2005/10/07 15:08:36 t-suwa Exp $
+ *  $Id: SkkConfig.h,v 1.3 2005/11/03 05:46:51 xdd Exp $
  *
  *  KeymapConfig.h
  *  AquaSKK
@@ -46,6 +46,7 @@
 	uchar	pasteKey_; // (Ž«‘“o˜^Žž)ƒy[ƒXƒgƒL[
 
 	bool	mappedKey_[256];
+	bool	numkey_map[256];
 
 	map<UniChar, UniChar>*	okuriHeadTable_;
 
@@ -75,6 +76,8 @@
 
 	const uchar latinModeKey()		{ return latinModeKey_; }
 	const uchar kanaModeKey()		{ return kanaModeKey_; }
+	const uchar toggleKanaKey()		{ return toggleKanaKey_; }
+	const uchar kakuteiKey()		{ return kakuteiKey_; }
 	const uchar setHenkanPointKey()		{ return setHenkanPointKey_; }
 	const uchar fixN()			{ return fixN_; }
 	const uchar useEisuuToSetHenkanPoint()			{ return useEisuuToSetHenkanPoint_; }
@@ -85,6 +88,8 @@
 	 *
 	 */
 	const bool isMappedKey(uchar c)		{ return mappedKey_[c]; }
+	
+	const bool isNumericKeypad(uchar c)	{ return numkey_map[c]; }
 
 	/**
 	 * ‘—‚肪‚Ȃ̐擪•¶Žš‚ð•ÏŠ·‚·‚é‚©


aquaskk-changes メーリングリストの案内
Back to archive index