[aquaskk-changes 64] CVS update: AquaSKK

Zurück zum Archiv-Index

Tomotaka SUWA t-suw****@users*****
2005年 10月 1日 (土) 20:47:13 JST


Index: AquaSKK/CandidatesFrame.m
diff -u AquaSKK/CandidatesFrame.m:1.1.1.1.2.2 AquaSKK/CandidatesFrame.m:1.1.1.1.2.3
--- AquaSKK/CandidatesFrame.m:1.1.1.1.2.2	Sat Sep 24 09:29:33 2005
+++ AquaSKK/CandidatesFrame.m	Sat Oct  1 20:47:13 2005
@@ -1,4 +1,4 @@
-/*  $Id: CandidatesFrame.m,v 1.1.1.1.2.2 2005/09/24 00:29:33 t-suwa Exp $
+/*  $Id: CandidatesFrame.m,v 1.1.1.1.2.3 2005/10/01 11:47:13 t-suwa Exp $
 
     MacOS X implementation of the SKK input method.
     Copyright (C) 2002-2004 phonohawk
@@ -25,10 +25,12 @@
 - (id)init
 {
     if(self = [super init]) {
-	float fontSize = [[[NSUserDefaults standardUserDefaults] objectForKey:@"dic.FontSize.Window"] floatValue];
+	NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
+	NSFont *font = [NSFont fontWithName:[defaults objectForKey:@"dic.FontName.Window"]
+					size:[[defaults objectForKey:@"dic.FontSize.Window"] floatValue]];
 	labels_ = @"ASDFJKL";
 	attributes_ = [NSDictionary
-			  dictionaryWithObject:[NSFont systemFontOfSize:fontSize]
+			  dictionaryWithObject:font
 			  forKey:NSFontAttributeName];
 	candidates_ = [[NSMutableArray alloc] init];
 
Index: AquaSKK/ChangeLog
diff -u AquaSKK/ChangeLog:1.4.2.5 AquaSKK/ChangeLog:1.4.2.6
--- AquaSKK/ChangeLog:1.4.2.5	Sat Sep 24 14:39:12 2005
+++ AquaSKK/ChangeLog	Sat Oct  1 20:47:13 2005
@@ -1,3 +1,10 @@
+2005-09-24  Shin_ichi Abe  <xdd****@mac*****>
+
+	* PreferencesController.*: ƒtƒHƒ“ƒgÝ’è‚̒ljÁB
+	AquaSKK‚̊‹«Ý’è‚Å•ÏŠ·ƒEƒBƒ“ƒhƒE‚̃tƒHƒ“ƒg‚̐ݒ肪‰Â”\B
+
+	* Preferences.nib: ƒtƒHƒ“ƒgÝ’èƒRƒ“ƒgƒ[ƒ‹‚̒ljÁB
+
 2005-09-24  Tomotaka SUWA  <t.suw****@mac*****>
 
 	* AquaSKK.pbproj: Panther ‚Å‚àƒrƒ‹ƒh‚Å‚«‚é‚悤‚ɐݒè‚ð•ÏXB
Index: AquaSKK/PreferencesController.h
diff -u AquaSKK/PreferencesController.h:1.1.1.2.2.2 AquaSKK/PreferencesController.h:1.1.1.2.2.3
--- AquaSKK/PreferencesController.h:1.1.1.2.2.2	Fri Sep 23 22:29:10 2005
+++ AquaSKK/PreferencesController.h	Sat Oct  1 20:47:13 2005
@@ -1,5 +1,5 @@
 /*  -*- objc -*-
-    $Id: PreferencesController.h,v 1.1.1.2.2.2 2005/09/23 13:29:10 t-suwa Exp $
+    $Id: PreferencesController.h,v 1.1.1.2.2.3 2005/10/01 11:47:13 t-suwa Exp $
     ---------
 	
     MacOS X implementation of the SKK input method.
@@ -28,6 +28,7 @@
 
 @interface PreferencesController : NSWindowController {
   IBOutlet id skkEggLikeNewlineBtn;
+  IBOutlet id fontBtn;
   IBOutlet id fontSizePopUp;
   IBOutlet id winColor;
   IBOutlet id winTransparent;
@@ -47,6 +48,9 @@
   NSString* path_to_sub_dic;
     
   NSMutableArray *dicPath;
+  
+  NSFont *font;
+  NSFontPanel* fontPanel;
 }
 + (PreferencesController*)sharedController;
 - (NSString*)getPathToMainDic;
@@ -55,6 +59,8 @@
 
 - init;
 
+- (IBAction)showFontPanel:(id)sender;
+
 - (NSColor *)windowColor;
 - (float)windowAlpha;
 - (BOOL)isSkkEggLikeNewline;
Index: AquaSKK/PreferencesController.mm
diff -u AquaSKK/PreferencesController.mm:1.1.1.2.2.3 AquaSKK/PreferencesController.mm:1.1.1.2.2.4
--- AquaSKK/PreferencesController.mm:1.1.1.2.2.3	Sat Sep 24 09:29:33 2005
+++ AquaSKK/PreferencesController.mm	Sat Oct  1 20:47:13 2005
@@ -1,5 +1,5 @@
 /*  -*- objc -*-
-    $Id: PreferencesController.mm,v 1.1.1.2.2.3 2005/09/24 00:29:33 t-suwa Exp $
+    $Id: PreferencesController.mm,v 1.1.1.2.2.4 2005/10/01 11:47:13 t-suwa Exp $
     ---------
 	
     MacOS X implementation of the SKK input method.
@@ -66,6 +66,7 @@
 					 [NSMutableArray array], @"dic.path.kotoeri",
 					 [NSArchiver archivedDataWithRootObject:color], @"dic.WindowColor.kotoeri",
 					 [NSNumber numberWithInt:0], @"dic.FontSize.Window",
+					 [[NSFont systemFontOfSize:0] fontName], @"dic.FontName.Window",
 					 @"0.7", @"dic.WindowAlpha.kotoeri",
 					 @"5", @"dic.showCandsWindowAfterNthCand",
 					 @"NO", @"dic.skk-egg-like-newline.kotoeri",
@@ -86,7 +87,11 @@
     
     dicPath = [[NSMutableArray alloc] initWithArray:[defaults arrayForKey:@"dic.path.kotoeri"]];
     [winColor setColor:[NSUnarchiver unarchiveObjectWithData:[defaults objectForKey:@"dic.WindowColor.kotoeri"]]];
-	[fontSizePopUp selectItemAtIndex:[fontSizePopUp indexOfItemWithTag:[[defaults objectForKey:@"dic.FontSize.Window"] intValue]]];
+	font = [[NSFont fontWithName:[defaults objectForKey:@"dic.FontName.Window"]
+					size:[[defaults objectForKey:@"dic.FontSize.Window"] floatValue]] retain];
+	
+	[self setFontButtonTitle:font];
+	
     [winTransparent setDoubleValue:[defaults floatForKey:@"dic.WindowAlpha.kotoeri"]];
     [skkEggLikeNewlineBtn setState:[defaults boolForKey:@"dic.skk-egg-like-newline.kotoeri"]];
     
@@ -109,7 +114,9 @@
     [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 setObject:[NSNumber numberWithInt:[[fontSizePopUp selectedItem] tag]] forKey:@"dic.FontSize.Window"];
+	
+	[defaults setObject:[NSNumber numberWithFloat:[font pointSize]] forKey:@"dic.FontSize.Window"];
+	[defaults setObject:[font fontName] forKey:@"dic.FontName.Window"];
 	
     // skkserv
     [defaults setBool:[skkserv_enabled state] forKey:@"pref.skkserv.enabled"];
@@ -120,6 +127,29 @@
 }
 
 
+- (IBAction)showFontPanel:(id)sender
+{
+	[fontPanel release];
+	fontPanel = [[[NSFontManager sharedFontManager] fontPanel:YES] retain];
+    [fontPanel makeKeyAndOrderFront:self];
+}
+
+- (void)changeFont:(id)fontManager
+{
+	[font release];
+	font = [[fontManager convertFont:[NSFont systemFontOfSize:14]] retain];
+	
+	[self setFontButtonTitle:font];
+	
+	[self saveUserDefault:self];
+}
+
+- (void)setFontButtonTitle:(NSFont *)aFont
+{
+	[[fontBtn cell] setFont:[NSFont fontWithName:[aFont fontName] size:0]];
+	[fontBtn setTitle:[NSString stringWithFormat:@"%@ - %2.1f",[aFont displayName],[aFont pointSize]]];
+}
+
 - (NSColor *)windowColor
 {
     return [winColor color];
@@ -220,6 +250,8 @@
 	}
     }
     
+	[fontPanel close];
+	
     [self saveUserDefault:self];
     return TRUE;
 }
Index: AquaSKK/TransparentWindow.h
diff -u AquaSKK/TransparentWindow.h:1.1.1.2.2.2 AquaSKK/TransparentWindow.h:1.1.1.2.2.3
--- AquaSKK/TransparentWindow.h:1.1.1.2.2.2	Sat Sep 24 09:29:33 2005
+++ AquaSKK/TransparentWindow.h	Sat Oct  1 20:47:13 2005
@@ -1,5 +1,5 @@
-/* -*- objc -*-
-	$Id: TransparentWindow.h,v 1.1.1.2.2.2 2005/09/24 00:29:33 t-suwa Exp $
+/*
+	$Id: TransparentWindow.h,v 1.1.1.2.2.3 2005/10/01 11:47:13 t-suwa Exp $
 	---------
 	
     MacOS X implementation of the SKK input method.
Index: AquaSKK/TransparentWindow.m
diff -u AquaSKK/TransparentWindow.m:1.1.1.2.2.2 AquaSKK/TransparentWindow.m:1.1.1.2.2.3
--- AquaSKK/TransparentWindow.m:1.1.1.2.2.2	Sat Sep 24 09:29:33 2005
+++ AquaSKK/TransparentWindow.m	Sat Oct  1 20:47:13 2005
@@ -1,5 +1,5 @@
 /*
-	$Id: TransparentWindow.m,v 1.1.1.2.2.2 2005/09/24 00:29:33 t-suwa Exp $
+	$Id: TransparentWindow.m,v 1.1.1.2.2.3 2005/10/01 11:47:13 t-suwa Exp $
 	---------
 	
     MacOS X implementation of the SKK input method.


aquaskk-changes メーリングリストの案内
Zurück zum Archiv-Index