diff --git a/Source/AppDelegate.m b/Source/AppDelegate.m index b3282bf8..25248418 100644 --- a/Source/AppDelegate.m +++ b/Source/AppDelegate.m @@ -37,7 +37,6 @@ // #import "AppDelegate.h" -#import "OVNonModalAlertWindowController.h" #import "vChewing-Swift.h" #import "frmAboutWindow.h" @@ -51,7 +50,7 @@ static NSString *kUpdateInfoSiteKey = @"UpdateInfoSite"; static const NSTimeInterval kNextCheckInterval = 86400.0; static const NSTimeInterval kTimeoutInterval = 60.0; -@interface AppDelegate () +@interface AppDelegate () @end @implementation AppDelegate @@ -159,13 +158,13 @@ static const NSTimeInterval kTimeoutInterval = 60.0; _currentUpdateCheckIsForced = NO; if (isForcedCheck) { - [[OVNonModalAlertWindowController sharedInstance] showWithTitle:NSLocalizedString(@"Update Check Failed", nil) content:[NSString stringWithFormat:NSLocalizedString(@"There may be no internet connection or the server failed to respond.\n\nError message: %@", nil), [error localizedDescription]] confirmButtonTitle:NSLocalizedString(@"Dismiss", nil) cancelButtonTitle:nil cancelAsDefault:NO delegate:nil]; + [[NonModalAlertWindowController sharedInstance] showWithTitle:NSLocalizedString(@"Update Check Failed", nil) content:[NSString stringWithFormat:NSLocalizedString(@"There may be no internet connection or the server failed to respond.\n\nError message: %@", nil), [error localizedDescription]] confirmButtonTitle:NSLocalizedString(@"Dismiss", nil) cancelButtonTitle:nil cancelAsDefault:NO delegate:nil]; } } - (void)showNoUpdateAvailableAlert { - [[OVNonModalAlertWindowController sharedInstance] showWithTitle:NSLocalizedString(@"Check for Update Completed", nil) content:NSLocalizedString(@"You are already using the latest version of vChewing.", nil) confirmButtonTitle:NSLocalizedString(@"OK", nil) cancelButtonTitle:nil cancelAsDefault:NO delegate:nil]; + [[NonModalAlertWindowController sharedInstance] showWithTitle:NSLocalizedString(@"Check for Update Completed", nil) content:NSLocalizedString(@"You are already using the latest version of vChewing.", nil) confirmButtonTitle:NSLocalizedString(@"OK", nil) cancelButtonTitle:nil cancelAsDefault:NO delegate:nil]; } - (void)connectionDidFinishLoading:(NSURLConnection *)connection @@ -255,7 +254,7 @@ static const NSTimeInterval kTimeoutInterval = 60.0; NSString *content = [NSString stringWithFormat:NSLocalizedString(@"You're currently using vChewing %@ (%@), a new version %@ (%@) is now available. Do you want to visit vChewing's website to download the version?%@", nil), [infoDict objectForKey:@"CFBundleShortVersionString"], currentVersion, [plist objectForKey:@"CFBundleShortVersionString"], remoteVersion, versionDescription]; - [[OVNonModalAlertWindowController sharedInstance] showWithTitle:NSLocalizedString(@"New Version Available", nil) content:content confirmButtonTitle:NSLocalizedString(@"Visit Website", nil) cancelButtonTitle:NSLocalizedString(@"Not Now", nil) cancelAsDefault:NO delegate:self]; + [[NonModalAlertWindowController sharedInstance] showWithTitle:NSLocalizedString(@"New Version Available", nil) content:content confirmButtonTitle:NSLocalizedString(@"Visit Website", nil) cancelButtonTitle:NSLocalizedString(@"Not Now", nil) cancelAsDefault:NO delegate:self]; } - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data @@ -263,7 +262,7 @@ static const NSTimeInterval kTimeoutInterval = 60.0; [_receivingData appendData:data]; } -- (void)nonModalAlertWindowControllerDidConfirm:(OVNonModalAlertWindowController *)controller +- (void)nonModalAlertWindowControllerDidConfirm:(NonModalAlertWindowController *)controller { if (_updateNextStepURL) { [[NSWorkspace sharedWorkspace] openURL:_updateNextStepURL]; @@ -272,7 +271,7 @@ static const NSTimeInterval kTimeoutInterval = 60.0; _updateNextStepURL = nil; } -- (void)nonModalAlertWindowControllerDidCancel:(OVNonModalAlertWindowController *)controller +- (void)nonModalAlertWindowControllerDidCancel:(NonModalAlertWindowController *)controller { _updateNextStepURL = nil; } diff --git a/Source/InputMethodController.mm b/Source/InputMethodController.mm index 6692bfa7..e8e1adba 100644 --- a/Source/InputMethodController.mm +++ b/Source/InputMethodController.mm @@ -43,7 +43,6 @@ #import "OVStringHelper.h" #import "OVUTF8Helper.h" #import "AppDelegate.h" -#import "OVNonModalAlertWindowController.h" #import "vChewing-Swift.h" @@ -1563,7 +1562,7 @@ NS_INLINE size_t max(size_t a, size_t b) { return a > b ? a : b; } NSLog(@"openUserPhrases called"); if (!LTCheckIfUserLanguageModelFileExists()) { NSString *content = [NSString stringWithFormat:NSLocalizedString(@"Please check the permission of at \"%@\".", @""), LTUserDataFolderPath()]; - [[OVNonModalAlertWindowController sharedInstance] showWithTitle:NSLocalizedString(@"Unable to create the user phrase file.", @"") content:content confirmButtonTitle:NSLocalizedString(@"OK", @"") cancelButtonTitle:nil cancelAsDefault:NO delegate:nil]; + [[NonModalAlertWindowController sharedInstance] showWithTitle:NSLocalizedString(@"Unable to create the user phrase file.", @"") content:content confirmButtonTitle:NSLocalizedString(@"OK", @"") cancelButtonTitle:nil cancelAsDefault:NO delegate:nil]; return; } diff --git a/Source/NonModalAlertWindowController.swift b/Source/NonModalAlertWindowController.swift new file mode 100644 index 00000000..5be6b1bb --- /dev/null +++ b/Source/NonModalAlertWindowController.swift @@ -0,0 +1,134 @@ +// +// NonModalAlertWindowController.swift +// +// Copyright (c) 2011-2022 The OpenVanilla Project. +// +// Contributors: +// Weizhong Yang (@zonble) @ OpenVanilla +// Lukhnos Liu (@lukhnos) @ OpenVanilla +// +// Based on the Syrup Project and the Formosana Library +// by Lukhnos Liu (@lukhnos). +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// + +import Cocoa + +@objc protocol NonModalAlertWindowControllerDelegate: AnyObject { + func nonModalAlertWindowControllerDidConfirm(_ controller: NonModalAlertWindowController) + func nonModalAlertWindowControllerDidCancel(_ controller: NonModalAlertWindowController) +} + +class NonModalAlertWindowController: NSWindowController { + @objc (sharedInstance) + + static let shared = NonModalAlertWindowController(windowNibName: "NonModalAlertWindowController") + + @IBOutlet weak var titleTextField: NSTextField! + @IBOutlet weak var contentTextField: NSTextField! + @IBOutlet weak var confirmButton: NSButton! + @IBOutlet weak var cancelButton: NSButton! + weak var delegate: NonModalAlertWindowControllerDelegate? + + @objc func show(title: String, content: String, confirmButtonTitle: String, cancelButtonTitle: String?, cancelAsDefault: Bool, delegate: NonModalAlertWindowControllerDelegate?) { + if window?.isVisible == true { + self.delegate?.nonModalAlertWindowControllerDidCancel(self) + } + + self.delegate = delegate + + var oldFrame = confirmButton.frame + confirmButton.title = confirmButtonTitle + confirmButton.sizeToFit() + + var newFrame = confirmButton.frame + newFrame.size.width = max(90, newFrame.size.width + 10) + newFrame.origin.x += oldFrame.size.width - newFrame.size.width + self.confirmButton.frame = newFrame + + if let cancelButtonTitle = cancelButtonTitle { + cancelButton.title = cancelButtonTitle + cancelButton.sizeToFit() + var adjustFrame = cancelButton.frame + adjustFrame.size.width = max(90, adjustFrame.size.width + 10) + adjustFrame.origin.x = newFrame.origin.x - adjustFrame.size.width + confirmButton.frame = adjustFrame + cancelButton.isHidden = false + } else { + cancelButton.isHidden = true + } + + cancelButton.nextKeyView = confirmButton + confirmButton.nextKeyView = cancelButton + + if cancelButtonTitle != nil { + if cancelAsDefault { + window?.defaultButtonCell = cancelButton.cell as? NSButtonCell + } else { + cancelButton.keyEquivalent = " " + window?.defaultButtonCell = confirmButton.cell as? NSButtonCell + } + } else { + window?.defaultButtonCell = confirmButton.cell as? NSButtonCell + } + + titleTextField.stringValue = title + + oldFrame = contentTextField.frame + contentTextField.stringValue = content + + var infiniteHeightFrame = oldFrame + infiniteHeightFrame.size.width -= 4.0 + infiniteHeightFrame.size.height = 10240 + newFrame = (content as NSString).boundingRect(with: infiniteHeightFrame.size, options: [.usesLineFragmentOrigin], attributes: [.font: contentTextField.font!]) + newFrame.size.width = max(newFrame.size.width, oldFrame.size.width) + newFrame.size.height += 4.0 + newFrame.origin = oldFrame.origin + newFrame.origin.y -= (newFrame.size.height - oldFrame.size.height) + contentTextField.frame = newFrame + + var windowFrame = window?.frame ?? NSRect.zero + windowFrame.size.height += (newFrame.size.height - oldFrame.size.height) + window?.level = NSWindow.Level(Int(CGShieldingWindowLevel()) + 1) + window?.setFrame(windowFrame, display: true) + window?.center() + window?.makeKeyAndOrderFront(self) + NSApp.activate(ignoringOtherApps: true) + } + + @IBAction func confirmButtonAction(_ sender: Any) { + delegate?.nonModalAlertWindowControllerDidConfirm(self) + window?.orderOut(self) + } + + @IBAction func cancelButtonAction(_ sender: Any) { + cancel(sender) + } + + func cancel(_ sender: Any) { + delegate?.nonModalAlertWindowControllerDidCancel(self) + delegate = nil + window?.orderOut(self) + } + +} diff --git a/Source/OVNonModalAlertWindowController.xib b/Source/NonModalAlertWindowController.xib similarity index 54% rename from Source/OVNonModalAlertWindowController.xib rename to Source/NonModalAlertWindowController.xib index 430b3b36..8dc2d753 100644 --- a/Source/OVNonModalAlertWindowController.xib +++ b/Source/NonModalAlertWindowController.xib @@ -1,12 +1,12 @@ - + - + - + @@ -17,18 +17,20 @@ - - + + - + - - - + - + + + - - - + + + + + - - - + + @@ -72,6 +79,23 @@ + + + + + + + + + + + + + + + + + diff --git a/Source/OVNonModalAlertWindowController.h b/Source/OVNonModalAlertWindowController.h deleted file mode 100644 index e0eea1e2..00000000 --- a/Source/OVNonModalAlertWindowController.h +++ /dev/null @@ -1,31 +0,0 @@ -// -// OVNonModalAlertWindowController.h -// OpenVanilla -// -// Created by Lukhnos Liu on 10/17/12. -// Copyright (c) 2012 The OpenVanilla Project. All rights reserved. -// - -#import - -@class OVNonModalAlertWindowController; - -@protocol OVNonModalAlertWindowControllerDelegate -- (void)nonModalAlertWindowControllerDidConfirm:(OVNonModalAlertWindowController *)controller; - -@optional -- (void)nonModalAlertWindowControllerDidCancel:(OVNonModalAlertWindowController *)controller; -@end - -@interface OVNonModalAlertWindowController : NSWindowController - -+ (OVNonModalAlertWindowController *)sharedInstance; -- (void)showWithTitle:(NSString *)title content:(NSString *)content confirmButtonTitle:(NSString *)confirmTitle cancelButtonTitle:(NSString *)cancelButtonTitle cancelAsDefault:(BOOL)cancelAsDefault delegate:(id)delegate; -- (IBAction)confirmButtonAction:(id)sender; -- (IBAction)cancelButtonAction:(id)sender; -@property (assign, nonatomic) IBOutlet NSTextField *titleTextField; -@property (assign, nonatomic) IBOutlet NSTextField *contentTextField; -@property (assign, nonatomic) IBOutlet NSButton *confirmButton; -@property (assign, nonatomic) IBOutlet NSButton *cancelButton; -@property (assign, nonatomic) id delegate; -@end diff --git a/Source/OVNonModalAlertWindowController.m b/Source/OVNonModalAlertWindowController.m deleted file mode 100644 index 48302d68..00000000 --- a/Source/OVNonModalAlertWindowController.m +++ /dev/null @@ -1,131 +0,0 @@ -// -// OVNonModalAlertWindowController.m -// OpenVanilla -// -// Created by Lukhnos Liu on 10/17/12. -// Copyright (c) 2012 The OpenVanilla Project. All rights reserved. -// - -#import "OVNonModalAlertWindowController.h" - -@implementation OVNonModalAlertWindowController -@synthesize titleTextField = _titleTextField; -@synthesize contentTextField = _contentTextField; -@synthesize confirmButton = _confirmButton; -@synthesize cancelButton = _cancelButton; -@synthesize delegate = _delegate; - -+ (OVNonModalAlertWindowController *)sharedInstance -{ - static OVNonModalAlertWindowController *instance; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - instance = [[OVNonModalAlertWindowController alloc] initWithWindowNibName:@"OVNonModalAlertWindowController"]; - [instance window]; - }); - return instance; -} - -// Suppress the use of the MIN/MAX macros -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wgnu-statement-expression" - -- (void)showWithTitle:(NSString *)title content:(NSString *)content confirmButtonTitle:(NSString *)confirmTitle cancelButtonTitle:(NSString *)cancelButtonTitle cancelAsDefault:(BOOL)cancelAsDefault delegate:(id )delegate; -{ - // cancel previous alert - if (self.window.visible) { - if ([_delegate respondsToSelector:@selector(nonModalAlertWindowControllerDidCancel:)]) { - [_delegate nonModalAlertWindowControllerDidCancel:self]; - } - } - - _delegate = delegate; - - NSRect oldFrame = self.confirmButton.frame; - [self.confirmButton setTitle:confirmTitle]; - [self.confirmButton sizeToFit]; - - NSRect newFrame = self.confirmButton.frame; - - newFrame.size.width = MAX(90.0, (newFrame.size.width + 10.0)); - newFrame.origin.x += (oldFrame.size.width - newFrame.size.width); - [self.confirmButton setFrame:newFrame]; - - if (cancelButtonTitle) { - [self.cancelButton setTitle:cancelButtonTitle]; - [self.cancelButton sizeToFit]; - NSRect adjustedFrame = self.cancelButton.frame; - adjustedFrame.size.width = MAX(90.0, (adjustedFrame.size.width + 10.0)); - adjustedFrame.origin.x = newFrame.origin.x - adjustedFrame.size.width; - self.cancelButton.frame = adjustedFrame; - self.cancelButton.hidden = NO; - } - else { - self.cancelButton.hidden = YES; - } - - self.cancelButton.nextKeyView = self.confirmButton; - self.confirmButton.nextKeyView = self.cancelButton; - - if (cancelButtonTitle) { - if (cancelAsDefault) { - [self.window setDefaultButtonCell:self.cancelButton.cell]; - } - else { - self.cancelButton.keyEquivalent = @" "; - [self.window setDefaultButtonCell:self.confirmButton.cell]; - } - } - else { - [[self window] setDefaultButtonCell:self.confirmButton.cell]; - } - - self.titleTextField.stringValue = title; - - oldFrame = [self.contentTextField frame]; - self.contentTextField.stringValue = content; - - NSRect infiniteHeightFrame = oldFrame; - infiniteHeightFrame.size.width -= 4.0; - infiniteHeightFrame.size.height = 10240; - newFrame = [content boundingRectWithSize:infiniteHeightFrame.size options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName: self.contentTextField.font}]; - newFrame.size.width = MAX(newFrame.size.width, oldFrame.size.width); - newFrame.size.height += 4.0; - newFrame.origin = oldFrame.origin; - newFrame.origin.y -= (newFrame.size.height - oldFrame.size.height); - [self.contentTextField setFrame:newFrame]; - - NSRect windowFrame = [[self window] frame]; - windowFrame.size.height += (newFrame.size.height - oldFrame.size.height); - - self.window.level = CGShieldingWindowLevel() + 1; - [self.window setFrame:windowFrame display:YES]; - [self.window center]; - [self.window makeKeyAndOrderFront:self]; - [[NSApplication sharedApplication] activateIgnoringOtherApps:YES]; -} - -#pragma GCC diagnostic pop - -- (IBAction)confirmButtonAction:(id)sender -{ - [_delegate nonModalAlertWindowControllerDidConfirm:self]; - [self.window orderOut:self]; -} - -- (IBAction)cancelButtonAction:(id)sender -{ - [self cancel:sender]; -} - -- (void)cancel:(id)sender -{ - if ([_delegate respondsToSelector:@selector(nonModalAlertWindowControllerDidCancel:)]) { - [_delegate nonModalAlertWindowControllerDidCancel:self]; - } - - _delegate = nil; - [self.window orderOut:self]; -} - -@end diff --git a/vChewing.xcodeproj/project.pbxproj b/vChewing.xcodeproj/project.pbxproj index 6d0fe6c2..0ae003b0 100644 --- a/vChewing.xcodeproj/project.pbxproj +++ b/vChewing.xcodeproj/project.pbxproj @@ -19,6 +19,7 @@ 5BDF2CFE2791BE4400838ADB /* InputSourceHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BDF2CFD2791BE4400838ADB /* InputSourceHelper.swift */; }; 5BDF2CFF2791BECC00838ADB /* InputSourceHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BDF2CFD2791BE4400838ADB /* InputSourceHelper.swift */; }; 5BDF2D012791C03B00838ADB /* PreferencesWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BDF2D002791C03B00838ADB /* PreferencesWindowController.swift */; }; + 5BDF2D032791C71200838ADB /* NonModalAlertWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BDF2D022791C71200838ADB /* NonModalAlertWindowController.swift */; }; 5BF4A6FE27844738007DC6E7 /* frmAboutWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 5BF4A6FC27844738007DC6E7 /* frmAboutWindow.m */; }; 5BF4A70027844DC5007DC6E7 /* frmAboutWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5BF4A70227844DC5007DC6E7 /* frmAboutWindow.xib */; }; 6A0421A815FEF3F50061ED63 /* FastLM.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6A0421A615FEF3F50061ED63 /* FastLM.cpp */; }; @@ -46,8 +47,7 @@ 6ACA41FD15FC1D9000935EF6 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6ACA41F015FC1D9000935EF6 /* MainMenu.xib */; }; 6ACA41FF15FC1D9000935EF6 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6ACA41F415FC1D9000935EF6 /* main.m */; }; 6ACA420215FC1E5200935EF6 /* vChewing.app in Resources */ = {isa = PBXBuildFile; fileRef = 6A0D4EA215FC0D2D00ABF4B3 /* vChewing.app */; }; - 6AFF97F2253B299E007F1C49 /* OVNonModalAlertWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6AFF97F0253B299E007F1C49 /* OVNonModalAlertWindowController.xib */; }; - 6AFF97F3253B299E007F1C49 /* OVNonModalAlertWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6AFF97F1253B299E007F1C49 /* OVNonModalAlertWindowController.m */; }; + 6AFF97F2253B299E007F1C49 /* NonModalAlertWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6AFF97F0253B299E007F1C49 /* NonModalAlertWindowController.xib */; }; D427A9C125ED28CC005D43E0 /* OpenCCBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = D427A9C025ED28CC005D43E0 /* OpenCCBridge.swift */; }; D48550A325EBE689006A204C /* OpenCC in Frameworks */ = {isa = PBXBuildFile; productRef = D48550A225EBE689006A204C /* OpenCC */; }; /* End PBXBuildFile section */ @@ -95,6 +95,7 @@ 5BC3FB82278492DE0022E99A /* data-chs.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "data-chs.txt"; sourceTree = ""; }; 5BDF2CFD2791BE4400838ADB /* InputSourceHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InputSourceHelper.swift; sourceTree = ""; }; 5BDF2D002791C03B00838ADB /* PreferencesWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PreferencesWindowController.swift; sourceTree = ""; }; + 5BDF2D022791C71200838ADB /* NonModalAlertWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NonModalAlertWindowController.swift; sourceTree = ""; }; 5BF4A6FB27844738007DC6E7 /* frmAboutWindow.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = frmAboutWindow.h; sourceTree = ""; }; 5BF4A6FC27844738007DC6E7 /* frmAboutWindow.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = frmAboutWindow.m; sourceTree = ""; }; 5BF4A70327844DD0007DC6E7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/frmAboutWindow.xib; sourceTree = ""; }; @@ -202,9 +203,7 @@ 6ACA41F415FC1D9000935EF6 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Source/Installer/main.m; sourceTree = SOURCE_ROOT; }; 6ACA41F515FC1D9000935EF6 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/InfoPlist.strings"; sourceTree = ""; }; 6ACA41F715FC1D9000935EF6 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/Localizable.strings"; sourceTree = ""; }; - 6AFF97EF253B299E007F1C49 /* OVNonModalAlertWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVNonModalAlertWindowController.h; sourceTree = ""; }; - 6AFF97F0253B299E007F1C49 /* OVNonModalAlertWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = OVNonModalAlertWindowController.xib; sourceTree = ""; }; - 6AFF97F1253B299E007F1C49 /* OVNonModalAlertWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OVNonModalAlertWindowController.m; sourceTree = ""; }; + 6AFF97F0253B299E007F1C49 /* NonModalAlertWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NonModalAlertWindowController.xib; sourceTree = ""; }; D427A9BF25ED28CC005D43E0 /* vChewing-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "vChewing-Bridging-Header.h"; sourceTree = ""; }; D427A9C025ED28CC005D43E0 /* OpenCCBridge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenCCBridge.swift; sourceTree = ""; }; /* End PBXFileReference section */ @@ -277,8 +276,7 @@ 6A0D4EC715FC0D6400ABF4B3 /* InputMethodController.mm */, 6A0D4EC815FC0D6400ABF4B3 /* main.m */, 6A0D4EF615FC0DA600ABF4B3 /* vChewing-Prefix.pch */, - 6AFF97EF253B299E007F1C49 /* OVNonModalAlertWindowController.h */, - 6AFF97F1253B299E007F1C49 /* OVNonModalAlertWindowController.m */, + 5BDF2D022791C71200838ADB /* NonModalAlertWindowController.swift */, 5BDF2D002791C03B00838ADB /* PreferencesWindowController.swift */, D427A9C025ED28CC005D43E0 /* OpenCCBridge.swift */, 5BDF2CFD2791BE4400838ADB /* InputSourceHelper.swift */, @@ -394,7 +392,7 @@ isa = PBXGroup; children = ( 5BF4A70227844DC5007DC6E7 /* frmAboutWindow.xib */, - 6AFF97F0253B299E007F1C49 /* OVNonModalAlertWindowController.xib */, + 6AFF97F0253B299E007F1C49 /* NonModalAlertWindowController.xib */, 6A0D4EEE15FC0DA600ABF4B3 /* Images */, 6A0D4EF515FC0DA600ABF4B3 /* vChewing-Info.plist */, 6A0D4F4815FC0EE100ABF4B3 /* InfoPlist.strings */, @@ -571,7 +569,7 @@ 6A0D4F5815FC0EF900ABF4B3 /* Localizable.strings in Resources */, 6A2E40F6253A69DA00D1AE1D /* Images.xcassets in Resources */, 6A38BC1515FC117A00A8A51F /* data.txt in Resources */, - 6AFF97F2253B299E007F1C49 /* OVNonModalAlertWindowController.xib in Resources */, + 6AFF97F2253B299E007F1C49 /* NonModalAlertWindowController.xib in Resources */, 5B58E87F278413E7003EA2AD /* MITLicense.txt in Resources */, 6A187E2616004C5900466B2E /* MainMenu.xib in Resources */, 5BF4A70027844DC5007DC6E7 /* frmAboutWindow.xib in Resources */, @@ -628,12 +626,12 @@ 5BF4A6FE27844738007DC6E7 /* frmAboutWindow.m in Sources */, 5BC3EE1B278FC48C00F5E44C /* VerticalCandidateController.swift in Sources */, 5B42B64027876FDC00BB9B9F /* UserOverrideModel.cpp in Sources */, - 6AFF97F3253B299E007F1C49 /* OVNonModalAlertWindowController.m in Sources */, D427A9C125ED28CC005D43E0 /* OpenCCBridge.swift in Sources */, 6A0D4F4515FC0EB100ABF4B3 /* Mandarin.cpp in Sources */, 6A0421A815FEF3F50061ED63 /* FastLM.cpp in Sources */, 5BDF2D012791C03B00838ADB /* PreferencesWindowController.swift in Sources */, 5BC3EE1C278FC48C00F5E44C /* VTCandidateController.swift in Sources */, + 5BDF2D032791C71200838ADB /* NonModalAlertWindowController.swift in Sources */, 5BC3EE1D278FC48C00F5E44C /* HorizontalCandidateController.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0;