IME // Reorganizing project folder structure.

- The color contrast of the menu icon for Simplified Chinese mode has been tweaked for better legibility.
- Chinese localized name changed for both CHS and CHT input modes.
- Changed the way how Xcode manages the app versions.
- Renamed certain Window NIBs and their controllers to enforce Hungary naming convention.
This commit is contained in:
ShikiSuen 2022-02-04 21:44:49 +08:00
parent 7cb4671259
commit dd2f2f7520
132 changed files with 429 additions and 523 deletions

View File

@ -2,8 +2,6 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFEULAContent</key>
<string>License texts used in the customized about window.</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
@ -17,11 +15,13 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.2.0</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleSignature</key>
<string>MBIN</string>
<key>CFBundleVersion</key>
<string>893</string>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>CFEULAContent</key>
<string>License texts used in the customized about window.</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSHasLocalizedDisplayName</key>

View File

@ -91,7 +91,7 @@
<rect key="frame" x="91" y="166" width="427" height="160"/>
<clipView key="contentView" drawsBackground="NO" id="NrY-FL-PVu" userLabel="appEULAContentClip">
<rect key="frame" x="1" y="1" width="425" height="158"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<textView editable="NO" importsGraphics="NO" richText="NO" verticallyResizable="YES" findStyle="bar" smartInsertDelete="YES" id="47J-tO-8TZ" userLabel="appEULAContent">
<rect key="frame" x="0.0" y="-2" width="425" height="158"/>

View File

@ -56,8 +56,8 @@
/* Class = "NSTextFieldCell"; title = "Derived from OpenVanilla McBopopmofo Project."; ObjectID = "QYf-Nf-hoi"; */
"QYf-Nf-hoi.title" = "Derived from OpenVanilla McBopopmofo Project.";
/* Class = "NSTextFieldCell"; title = "McBopomofo Engine by Mengjuei Hsieh, Lukhnos Liu, Zonble Yang, et al.\nvChewing macOS Development Reinforced by Hiraku Wang.vChewing Phrase Database Maintained by Shiki Suen."; ObjectID = "VW8-s5-Wpn"; */
"VW8-s5-Wpn.title" = "McBopomofo Engine by Mengjuei Hsieh, Lukhnos Liu, Zonble Yang, et al.\nvChewing macOS Development Reinforced by Hiraku Wang.vChewing Phrase Database Maintained by Shiki Suen.";
/* Class = "NSTextFieldCell"; title = "McBopomofo Engine by Mengjuei Hsieh, Lukhnos Liu, Zonble Yang, et al.\nvChewing macOS Development Reinforced by Hiraku Wang.\nvChewing Phrase Database Maintained by Shiki Suen."; ObjectID = "VW8-s5-Wpn"; */
"VW8-s5-Wpn.title" = "McBopomofo Engine by Mengjuei Hsieh, Lukhnos Liu, Zonble Yang, et al.\nvChewing macOS Development Reinforced by Hiraku Wang.\nvChewing Phrase Database Maintained by Shiki Suen.";
/* Class = "NSTextFieldCell"; title = "Placeholder for showing copyright information."; ObjectID = "eo3-TK-0rB"; */
// "eo3-TK-0rB.title" = "Placeholder for showing copyright information.";

View File

@ -56,7 +56,7 @@
/* Class = "NSTextFieldCell"; title = "Derived from OpenVanilla McBopopmofo Project."; ObjectID = "QYf-Nf-hoi"; */
"QYf-Nf-hoi.title" = "OpenVanilla 小麦注音プロジェクトから派生。";
/* Class = "NSTextFieldCell"; title = "McBopomofo Engine by Mengjuei Hsieh, Lukhnos Liu, Zonble Yang, et al.\nvChewing macOS Development Reinforced by Hiraku Wang.vChewing Phrase Database Maintained by Shiki Suen."; ObjectID = "VW8-s5-Wpn"; */
/* Class = "NSTextFieldCell"; title = "McBopomofo Engine by Mengjuei Hsieh, Lukhnos Liu, Zonble Yang, et al.\nvChewing macOS Development Reinforced by Hiraku Wang.\nvChewing Phrase Database Maintained by Shiki Suen."; ObjectID = "VW8-s5-Wpn"; */
"VW8-s5-Wpn.title" = "小麦注音入力エンジン開発Mengjuei Hsieh, Lukhnos Liu, Zonble Yang, など。\nmacOS 版の開発協力Hiraku Wang。\n威注音語彙データの維持孫志貴 (Shiki Suen)。";
/* Class = "NSTextFieldCell"; title = "Placeholder for showing copyright information."; ObjectID = "eo3-TK-0rB"; */

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -128,7 +128,7 @@ struct VersionUpdateApi {
}
@objc(AppDelegate)
class AppDelegate: NSObject, NSApplicationDelegate, NonModalAlertWindowControllerDelegate, FSEventStreamHelperDelegate {
class AppDelegate: NSObject, NSApplicationDelegate, ctlNonModalAlertWindowDelegate, FSEventStreamHelperDelegate {
func helper(_ helper: FSEventStreamHelper, didReceive events: [FSEventStreamHelper.Event]) {
DispatchQueue.main.async {
if Preferences.shouldAutoReloadUserDataFiles {
@ -139,16 +139,16 @@ class AppDelegate: NSObject, NSApplicationDelegate, NonModalAlertWindowControlle
}
@IBOutlet weak var window: NSWindow?
private var preferencesWindowController: PreferencesWindowController?
private var aboutWindowController: frmAboutWindow? // New About Window
private var ctlPrefWindowInstance: ctlPrefWindow?
private var ctlAboutWindowInstance: ctlAboutWindow? // New About Window
private var checkTask: URLSessionTask?
private var updateNextStepURL: URL?
private var fsStreamHelper = FSEventStreamHelper(path: LanguageModelManager.dataFolderPath, queue: DispatchQueue(label: "User Phrases"))
// dealloc
deinit {
preferencesWindowController = nil
aboutWindowController = nil
ctlPrefWindowInstance = nil
ctlAboutWindowInstance = nil
checkTask = nil
updateNextStepURL = nil
fsStreamHelper.stop()
@ -172,20 +172,20 @@ class AppDelegate: NSObject, NSApplicationDelegate, NonModalAlertWindowControlle
}
@objc func showPreferences() {
if (preferencesWindowController == nil) {
preferencesWindowController = PreferencesWindowController(windowNibName: "preferences")
if (ctlPrefWindowInstance == nil) {
ctlPrefWindowInstance = ctlPrefWindow.init(windowNibName: "frmPrefWindow")
}
preferencesWindowController?.window?.center()
preferencesWindowController?.window?.orderFrontRegardless() //
ctlPrefWindowInstance?.window?.center()
ctlPrefWindowInstance?.window?.orderFrontRegardless() //
}
// New About Window
@objc func showAbout() {
if (aboutWindowController == nil) {
aboutWindowController = frmAboutWindow.init(windowNibName: "frmAboutWindow")
if (ctlAboutWindowInstance == nil) {
ctlAboutWindowInstance = ctlAboutWindow.init(windowNibName: "frmAboutWindow")
}
aboutWindowController?.window?.center()
aboutWindowController?.window?.orderFrontRegardless() //
ctlAboutWindowInstance?.window?.center()
ctlAboutWindowInstance?.window?.orderFrontRegardless() //
}
@objc(checkForUpdate)
@ -231,7 +231,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NonModalAlertWindowControlle
report.remoteShortVersion,
report.remoteVersion,
report.versionDescription)
NonModalAlertWindowController.shared.show(title: NSLocalizedString("New Version Available", comment: ""), content: content, confirmButtonTitle: NSLocalizedString("Visit Website", comment: ""), cancelButtonTitle: NSLocalizedString("Not Now", comment: ""), cancelAsDefault: false, delegate: self)
ctlNonModalAlertWindow.shared.show(title: NSLocalizedString("New Version Available", comment: ""), content: content, confirmButtonTitle: NSLocalizedString("Visit Website", comment: ""), cancelButtonTitle: NSLocalizedString("Not Now", comment: ""), cancelAsDefault: false, delegate: self)
case .noNeedToUpdate, .ignored:
break
}
@ -241,7 +241,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NonModalAlertWindowControlle
let title = NSLocalizedString("Update Check Failed", comment: "")
let content = String(format: NSLocalizedString("There may be no internet connection or the server failed to respond.\n\nError message: %@", comment: ""), message)
let buttonTitle = NSLocalizedString("Dismiss", comment: "")
NonModalAlertWindowController.shared.show(title: title, content: content, confirmButtonTitle: buttonTitle, cancelButtonTitle: nil, cancelAsDefault: false, delegate: nil)
ctlNonModalAlertWindow.shared.show(title: title, content: content, confirmButtonTitle: buttonTitle, cancelButtonTitle: nil, cancelAsDefault: false, delegate: nil)
default:
break
}
@ -249,14 +249,14 @@ class AppDelegate: NSObject, NSApplicationDelegate, NonModalAlertWindowControlle
}
}
func nonModalAlertWindowControllerDidConfirm(_ controller: NonModalAlertWindowController) {
func ctlNonModalAlertWindowDidConfirm(_ controller: ctlNonModalAlertWindow) {
if let updateNextStepURL = updateNextStepURL {
NSWorkspace.shared.open(updateNextStepURL)
}
updateNextStepURL = nil
}
func nonModalAlertWindowControllerDidCancel(_ controller: NonModalAlertWindowController) {
func ctlNonModalAlertWindowDidCancel(_ controller: ctlNonModalAlertWindow) {
updateNextStepURL = nil
}

View File

@ -1,5 +1,5 @@
/*
* InputMethodController.h
* ctlInputMethod.h
*
* Copyright 2021-2022 vChewing Project (3-Clause BSD License).
* Derived from 2011-2022 OpenVanilla Project (MIT License).
@ -10,6 +10,6 @@
#import <InputMethodKit/InputMethodKit.h>
#import "vChewing-Swift.h"
@interface vChewingInputMethodController : IMKInputController
@interface ctlInputMethod : IMKInputController
- (void)handleState:(InputState *)newState client:(id)client;
@end

View File

@ -1,5 +1,5 @@
/*
* InputMethodController.mm
* ctlInputMethod.mm
*
* Copyright 2021-2022 vChewing Project (3-Clause BSD License).
* Derived from 2011-2022 OpenVanilla Project (MIT License).
@ -7,7 +7,7 @@
*/
#import "vChewingLM.h"
#import "InputMethodController.h"
#import "ctlInputMethod.h"
#import "KeyHandler.h"
#import "LanguageModelManager.h"
@ -23,7 +23,7 @@ static inline NSString *LocalizationNotNeeded(NSString *s) {
return s;
}
@interface vChewingInputMethodController ()
@interface ctlInputMethod ()
{
// the current text input client; we need to keep this when candidate panel is on
id _currentCandidateClient;
@ -36,13 +36,13 @@ static inline NSString *LocalizationNotNeeded(NSString *s) {
}
@end
@interface vChewingInputMethodController (VTCandidateController) <VTCandidateControllerDelegate>
@interface ctlInputMethod (VTCandidateController) <VTCandidateControllerDelegate>
@end
@interface vChewingInputMethodController (KeyHandlerDelegate) <KeyHandlerDelegate>
@interface ctlInputMethod (KeyHandlerDelegate) <KeyHandlerDelegate>
@end
@interface vChewingInputMethodController (UI)
@interface ctlInputMethod (UI)
+ (VTHorizontalCandidateController *)horizontalCandidateController;
+ (VTVerticalCandidateController *)verticalCandidateController;
+ (TooltipController *)tooltipController;
@ -50,7 +50,7 @@ static inline NSString *LocalizationNotNeeded(NSString *s) {
- (void)_hideTooltip;
@end
@implementation vChewingInputMethodController
@implementation ctlInputMethod
- (id)initWithServer:(IMKServer *)server delegate:(id)delegate client:(id)client
{
@ -398,11 +398,11 @@ static inline NSString *LocalizationNotNeeded(NSString *s) {
BOOL useVerticalMode = state.useVerticalMode;
if (useVerticalMode) {
gCurrentCandidateController = [vChewingInputMethodController verticalCandidateController];
gCurrentCandidateController = [ctlInputMethod verticalCandidateController];
} else if (Preferences.useHorizontalCandidateList) {
gCurrentCandidateController = [vChewingInputMethodController horizontalCandidateController];
gCurrentCandidateController = [ctlInputMethod horizontalCandidateController];
} else {
gCurrentCandidateController = [vChewingInputMethodController verticalCandidateController];
gCurrentCandidateController = [ctlInputMethod verticalCandidateController];
}
// set the attributes for the candidate panel (which uses NSAttributedString)
@ -528,7 +528,7 @@ static inline NSString *LocalizationNotNeeded(NSString *s) {
{
if (![LanguageModelManager checkIfUserLanguageModelFilesExist]) {
NSString *content = [NSString stringWithFormat:NSLocalizedString(@"Please check the permission of at \"%@\".", @""), [LanguageModelManager dataFolderPath]];
[[NonModalAlertWindowController sharedInstance] showWithTitle:NSLocalizedString(@"Unable to create the user phrase file.", @"") content:content confirmButtonTitle:NSLocalizedString(@"OK", @"") cancelButtonTitle:nil cancelAsDefault:NO delegate:nil];
[[ctlNonModalAlertWindow sharedInstance] showWithTitle:NSLocalizedString(@"Unable to create the user phrase file.", @"") content:content confirmButtonTitle:NSLocalizedString(@"OK", @"") cancelButtonTitle:nil cancelAsDefault:NO delegate:nil];
return NO;
}
@ -575,7 +575,7 @@ static inline NSString *LocalizationNotNeeded(NSString *s) {
#pragma mark - Voltaire
@implementation vChewingInputMethodController (VTCandidateController)
@implementation ctlInputMethod (VTCandidateController)
- (NSUInteger)candidateCountForController:(VTCandidateController *)controller
{
@ -623,7 +623,7 @@ static inline NSString *LocalizationNotNeeded(NSString *s) {
#pragma mark - Implementation
@implementation vChewingInputMethodController (KeyHandlerDelegate)
@implementation ctlInputMethod (KeyHandlerDelegate)
- (nonnull VTCandidateController *)candidateControllerForKeyHandler:(nonnull KeyHandler *)keyHandler
{
@ -648,7 +648,7 @@ static inline NSString *LocalizationNotNeeded(NSString *s) {
@end
@implementation vChewingInputMethodController (UI)
@implementation ctlInputMethod (UI)
+ (VTHorizontalCandidateController *)horizontalCandidateController
{
@ -701,13 +701,13 @@ static inline NSString *LocalizationNotNeeded(NSString *s) {
NSLog(@"%@", exception);
}
[[vChewingInputMethodController tooltipController] showTooltip:tooltip atPoint:lineHeightRect.origin];
[[ctlInputMethod tooltipController] showTooltip:tooltip atPoint:lineHeightRect.origin];
}
- (void)_hideTooltip
{
if ([vChewingInputMethodController tooltipController].window.isVisible) {
[[vChewingInputMethodController tooltipController] hide];
if ([ctlInputMethod tooltipController].window.isVisible) {
[[ctlInputMethod tooltipController] hide];
}
}

View File

@ -7,7 +7,6 @@
*/
#import <Foundation/Foundation.h>
#import "FastLM.h"
#import "UserOverrideModel.h"
#import "vChewingLM.h"
#import "SSZipArchive.h"

View File

@ -28,7 +28,7 @@ static NSString *const kBopomofoModeIdentifierCHS = @"org.atelierInmu.inputmetho
+ (void)deployZipDataFile:(NSString *)filenameWithoutExtension
{
Class cls = NSClassFromString(@"vChewingInputMethodController");
Class cls = NSClassFromString(@"ctlInputMethod");
NSString *zipPath = [[NSBundle bundleForClass:cls] pathForResource:filenameWithoutExtension ofType:@"zip"];
NSString *destinationPath = [self dataFolderPath];
[SSZipArchive unzipFileAtPath:zipPath toDestination:destinationPath];
@ -39,7 +39,7 @@ static NSString *const kBopomofoModeIdentifierCHS = @"org.atelierInmu.inputmetho
static void LTLoadLanguageModelFile(NSString *filenameWithoutExtension, vChewingLM &lm)
{
Class cls = NSClassFromString(@"vChewingInputMethodController");
Class cls = NSClassFromString(@"ctlInputMethod");
NSString *dataPath = [[NSBundle bundleForClass:cls] pathForResource:filenameWithoutExtension ofType:@"txt"];
lm.loadLanguageModel([dataPath UTF8String]);
}

BIN
Source/Resources/Beep.m4a Normal file

Binary file not shown.

BIN
Source/Resources/Fart.m4a Normal file

Binary file not shown.

View File

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View File

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 101 KiB

View File

Before

Width:  |  Height:  |  Size: 188 KiB

After

Width:  |  Height:  |  Size: 188 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View File

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

Before

Width:  |  Height:  |  Size: 157 KiB

After

Width:  |  Height:  |  Size: 157 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 60 KiB

View File

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

Before

Width:  |  Height:  |  Size: 139 KiB

After

Width:  |  Height:  |  Size: 139 KiB

View File

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

@ -1,6 +1,6 @@
CFBundleName = "威注音";
CFBundleDisplayName = "威注音";
NSHumanReadableCopyright = "© 2011-2022 OpenVanilla Project & © 2021-2022 vChewing Project.";
"org.atelierInmu.inputmethod.vChewing.TradBopomofo" = "威註音";
"org.atelierInmu.inputmethod.vChewing.SimpBopomofo" = "威注音";
"org.atelierInmu.inputmethod.vChewing.TradBopomofo" = "威注音-繁";
"org.atelierInmu.inputmethod.vChewing.SimpBopomofo" = "威注音-简";
CFEULAContent = "该授权条款,在使用者符合以下诸条件之情形下,授予使用者使用及再散播本软件套件装原始码及二进位可执行形式之权利,无论此包装是否经改作皆然:\n\n对于本软件原始码之再散播必须保留上述之著作权宣告、此诸条件表列以及下述之免责声明。\n对于本套件二进位可执行形式之再散播必须连带以档案以及或者其他附于散播包装中之媒介方式重制上述之著作权宣告、此诸条件表列以及下述之免责声明。\n未获事前取得书面授权不得使用威注音或本软件贡献者之名称来为本软件之衍生物做任何表示支援、认可或推广、促销之行为。\n\n免责声明本软件由威注音及本软件之贡献者以现状「as is」提供本软件套件装不负任何明示或默示之担保责任包括但不限于就适售性以及特定目之之适用性为默示性担保。威注音及本软件之贡献者无论任何条件、无论成因或任何责任主义、无论此责任为因合约关系、无过失责任主义或因非违约之侵权包括过失或其他原因等而起对于任何因使用本软件套件装所产生之任何直接性、间接性、偶发性、特殊性、惩罚性或任何结果之损害包括但不限于替代商品或劳务之购用、使用损失、资料损失、利益损失、业务中断等等不负任何责任即在该种使用已获事前告知可能会造成此类损害之情形下亦然。\n";

View File

@ -1,6 +1,6 @@
CFBundleName = "威注音";
CFBundleDisplayName = "威注音";
NSHumanReadableCopyright = "© 2011-2022 OpenVanilla Project & © 2021-2022 vChewing Project.";
"org.atelierInmu.inputmethod.vChewing.TradBopomofo" = "威註音";
"org.atelierInmu.inputmethod.vChewing.SimpBopomofo" = "威注音";
"org.atelierInmu.inputmethod.vChewing.TradBopomofo" = "威注音-繁";
"org.atelierInmu.inputmethod.vChewing.SimpBopomofo" = "威注音-簡";
CFEULAContent = "該授權條款,在使用者符合以下諸條件之情形下,授予使用者使用及再散播本軟體套件裝原始碼及二進位可執行形式之權利,無論此包裝是否經改作皆然:\n\n對於本軟體原始碼之再散播必須保留上述之著作權宣告、此諸條件表列以及下述之免責聲明。\n對於本套件二進位可執行形式之再散播必須連帶以檔案以及或者其他附於散播包裝中之媒介方式重製上述之著作權宣告、此諸條件表列以及下述之免責聲明。\n未獲事前取得書面授權不得使用威注音或本軟體貢獻者之名稱來為本軟體之衍生物做任何表示支援、認可或推廣、促銷之行為。\n\n免責聲明本軟體由威注音及本軟體之貢獻者以現狀「as is」提供本軟體套件裝不負任何明示或默示之擔保責任包括但不限於就適售性以及特定目之之適用性為默示性擔保。威注音及本軟體之貢獻者無論任何條件、無論成因或任何責任主義、無論此責任為因合約關係、無過失責任主義或因非違約之侵權包括過失或其他原因等而起對於任何因使用本軟體套件裝所產生之任何直接性、間接性、偶發性、特殊性、懲罰性或任何結果之損害包括但不限於替代商品或勞務之購用、使用損失、資料損失、利益損失、業務中斷等等不負任何責任即在該種使用已獲事前告知可能會造成此類損害之情形下亦然。\n";

Some files were not shown because too many files have changed in this diff Show More