Skip to content
Permalink
Browse files

Merge pull request #532 from youknowone/fix-beta8

메뉴 동작 수정 등
  • Loading branch information...
youknowone committed May 27, 2019
2 parents 0104cf6 + 7a1c3a3 commit 98a27bab9636c0ee6a8d8ed3fb44935da6e14db1
@@ -332,7 +332,6 @@
38863C66140E64EB00A8ED76 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
38863C67140E64EB00A8ED76 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
38863C68140E64EB00A8ED76 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
38863C96140E669000A8ED76 /* CIMInputController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CIMInputController.m; sourceTree = "<group>"; };
388E2A601469249700ADBDA5 /* Hangul.strings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; path = Hangul.strings; sourceTree = "<group>"; };
388FD02A175EDB5500469B76 /* Version.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Version.xcconfig; sourceTree = "<group>"; };
389289BC217B331B00F94F2C /* ComposerDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComposerDelegate.swift; sourceTree = "<group>"; };
@@ -470,7 +469,6 @@
388FD02A175EDB5500469B76 /* Version.xcconfig */,
38EE97791A00148D00AD19B8 /* TISInputSource.h */,
38EE977A1A00148D00AD19B8 /* TISInputSource.m */,
38863C96140E669000A8ED76 /* CIMInputController.m */,
E5ED2DE3213030B700BD9B13 /* GureumMenu.swift */,
E5A0EA092139098800D4AD69 /* GureumAppDelegate.swift */,
3831983B21DB744900E20D78 /* UpdateManager.swift */,

This file was deleted.

@@ -10,7 +10,13 @@ import Cocoa
import Foundation
import GureumCore

extension GureumAppDelegate {
// 왜 App delegate가 아니라 여기 붙는건지 모르겠다
extension InputController {
@IBAction func showStandardAboutPanel(_ sender: Any) {
NSApp.activate(ignoringOtherApps: true)
NSApp.orderFrontStandardAboutPanel(sender)
}

@IBAction func checkRecentVersion(_: Any) {
guard let info = UpdateManager.shared.requestRecentVersion() else {
return
@@ -45,26 +51,22 @@ extension GureumAppDelegate {
}

@IBAction func openWebsite(_: Any) {
if let url = URL(string: "http://gureum.io") {
NSWorkspace.shared.open(url)
}
let url = URL(string: "http://gureum.io")!
NSWorkspace.shared.open(url)
}

@IBAction func openWebsiteHelp(_: Any) {
if let url = URL(string: "http://dan.gureum.io") {
NSWorkspace.shared.open(url)
}
let url = URL(string: "http://dan.gureum.io")!
NSWorkspace.shared.open(url)
}

@IBAction func openWebsiteSource(_: Any) {
if let url = URL(string: "http://ssi.gureum.io") {
NSWorkspace.shared.open(url)
}
let url = URL(string: "http://ssi.gureum.io")!
NSWorkspace.shared.open(url)
}

@IBAction func openWebsiteIssues(_: Any) {
if let url = URL(string: "http://meok.gureum.io") {
NSWorkspace.shared.open(url)
}
let url = URL(string: "http://meok.gureum.io")!
NSWorkspace.shared.open(url)
}
}
@@ -373,7 +373,7 @@
<key>org.youknowone.inputmethod.Gureum.qwerty</key>
<dict>
<key>KeyboardLayout</key>
<string>com.apple.keylayout.US</string>
<string>com.apple.keylayout.ABC</string>
<key>TISInputSourceID</key>
<string>org.youknowone.inputmethod.Gureum.qwerty</string>
<key>TISIntendedLanguage</key>
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14460.31"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.70"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication"/>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject">
<customObject id="-3" userLabel="Application">
<connections>
<outlet property="delegate" destination="494" id="537"/>
</connections>
@@ -21,36 +21,39 @@
<items>
<menuItem title="구름 입력기에 관하여" id="539">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="showStandardAboutPanel:" target="-1" id="yba-6W-HBg"/>
</connections>
</menuItem>
<menuItem title="업데이트 확인" id="557">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="checkRecentVersion:" target="494" id="iAc-Fb-XKV"/>
<action selector="checkRecentVersion:" target="-1" id="YEc-yG-BVR"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="561"/>
<menuItem title="웹사이트..." id="555">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="openWebsite:" target="494" id="qXD-LJ-2eV"/>
<action selector="openWebsite:" target="-1" id="eec-B8-qkM"/>
</connections>
</menuItem>
<menuItem title=" 도움말..." id="553">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="openWebsiteHelp:" target="494" id="3GP-kp-Nx0"/>
<action selector="openWebsiteHelp:" target="-1" id="VZu-lL-IGx"/>
</connections>
</menuItem>
<menuItem title=" 버그 알리기..." id="564">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="openWebsiteIssues:" target="494" id="eEb-ZD-TRB"/>
<action selector="openWebsiteIssues:" target="-1" id="PPJ-ho-kct"/>
</connections>
</menuItem>
<menuItem title=" 소스 코드..." id="562">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="openWebsiteSource:" target="494" id="9e7-Ql-FjA"/>
<action selector="openWebsiteSource:" target="-1" id="MXc-ok-c68"/>
</connections>
</menuItem>
</items>
@@ -61,7 +61,7 @@ public class Configuration: UserDefaults {
ConfigurationName.inputModeEmoticonKey.rawValue: Configuration.convertShortcutToConfiguration((0x24, [.shift, .option])),
ConfigurationName.inputModeHanjaKey.rawValue: Configuration.convertShortcutToConfiguration((0x24, .option)),
ConfigurationName.optionKeyBehavior.rawValue: 0,
ConfigurationName.overridingKeyboardName.rawValue: "com.apple.keylayout.US",
ConfigurationName.overridingKeyboardName.rawValue: "com.apple.keylayout.ABC",

ConfigurationName.romanModeByEscapeKey.rawValue: false,
ConfigurationName.showsInputForHanjaCandidates.rawValue: false,
@@ -102,13 +102,6 @@ public class InputController: IMKInputController {
#endif
}

extension InputController {
@IBAction func showStandardAboutPanel(_ sender: Any) {
NSApp.activate(ignoringOtherApps: true)
NSApp.orderFrontStandardAboutPanel(sender)
}
}

// IMKServerInputTextData, IMKServerInputHandleEvent, IMKServerInputKeyBinding 중 하나를 구현하여 입력 구현
public extension InputController { // IMKServerInputHandleEvent
// Receiving Events Directly from the Text Services Manager
@@ -193,15 +186,15 @@ public extension InputController { // IMKStateSetting

override func activateServer(_ sender: Any!) {
dlog(true, "server activated")
let client = asClient(sender)
super.activateServer(client)
super.activateServer(sender)
}

override func deactivateServer(_ sender: Any!) {
dlog(true, "server deactivating")
commitComposition(sender)
let client = asClient(sender)
super.deactivateServer(client)
if responds(to: #selector(commitComposition(_:))) {
self.commitComposition(sender)
}
super.deactivateServer(sender)
}
}

@@ -285,41 +285,5 @@ extension InputReceiver { // IMKStateSetting
default:
dlog(true, "**** UNKNOWN TAG %ld !!! ****", tag)
}

return

// 미국자판으로 기본자판 잡는 것도 임시로 포기
/*
TISInputSource *mainSource = _USSource();
NSString *mainSourceID = mainSource.identifier;
TISInputSource *currentSource = [TISInputSource currentSource];
dlog(1, @"current source: %@", currentSource);
[TISInputSource setInputMethodKeyboardLayoutOverride:mainSource];
TISInputSource *override = [TISInputSource inputMethodKeyboardLayoutOverride];
if (override == nil) {
dlog(1, @"override fail");
TISInputSource *currentASCIISource = [TISInputSource currentASCIICapableLayoutSource];
dlog(1, @"ascii: %@", currentASCIISource);
id ASCIISourceID = currentASCIISource.identifier;
if (![ASCIISourceID isEqualToString:mainSourceID]) {
dlog(1, @"id: %@ != %@", ASCIISourceID, mainSourceID);
BOOL mainSourceIsEnabled = mainSource.enabled;
//if (!mainSourceIsEnabled) {
// [mainSource enable];
//}
if (mainSourceIsEnabled) {
[mainSource select];
[currentSource select];
}
//if (!mainSourceIsEnabled) {
// [mainSource disable];
//}
}
} else {
dlog(1, @"overrided");
}
*/
}
}
@@ -42,7 +42,7 @@ class TestViewController: NSViewController {
}
let selected = self.inputClient.selectedRange()
let marked = self.inputClient.markedRange()
if event.keyCode == kVK_Delete, (selected.length > 0 && selected != marked) {
if event.keyCode == kVK_Delete, selected.length > 0, selected != marked {
self.inputController.cancelComposition()
self.inputClient.insertText("", replacementRange: selected)
self.inputClient.setMarkedText("", selectionRange: NSRange(location: 0, length: 0), replacementRange: NSRange(location: selected.location, length: 0))
@@ -17,25 +17,25 @@
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="176" y="715" width="400" height="300"/>
<rect key="screenRect" x="0.0" y="0.0" width="2560" height="1417"/>
<rect key="screenRect" x="0.0" y="0.0" width="1680" height="1027"/>
<view key="contentView" id="se5-gp-TjO">
<rect key="frame" x="0.0" y="0.0" width="400" height="300"/>
<rect key="frame" x="0.0" y="0.0" width="407" height="300"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<scrollView borderType="none" autohidesScrollers="YES" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" usesPredominantAxisScrolling="NO" findBarPosition="belowContent" translatesAutoresizingMaskIntoConstraints="NO" id="6I9-vn-Dbb">
<rect key="frame" x="0.0" y="0.0" width="400" height="300"/>
<rect key="frame" x="0.0" y="0.0" width="407" height="300"/>
<clipView key="contentView" drawsBackground="NO" copiesOnScroll="NO" id="Psn-Uh-zb1">
<rect key="frame" x="0.0" y="0.0" width="400" height="300"/>
<rect key="frame" x="0.0" y="0.0" width="392" height="300"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view translatesAutoresizingMaskIntoConstraints="NO" id="Mwx-RP-qRv">
<rect key="frame" x="0.0" y="-250" width="400" height="550"/>
<rect key="frame" x="0.0" y="-250" width="392" height="550"/>
<subviews>
<stackView distribution="fillEqually" orientation="vertical" alignment="leading" spacing="20" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="kLe-bm-FOO">
<rect key="frame" x="20" y="32" width="360" height="501"/>
<rect key="frame" x="20" y="32" width="352" height="501"/>
<subviews>
<stackView distribution="fill" orientation="vertical" alignment="leading" spacing="11" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="4Td-o5-z1h">
<rect key="frame" x="0.0" y="390" width="360" height="111"/>
<rect key="frame" x="0.0" y="390" width="352" height="111"/>
<subviews>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="DRr-ZG-wMG">
<rect key="frame" x="-2" y="94" width="101" height="17"/>
@@ -143,7 +143,7 @@
<constraint firstAttribute="width" constant="160" id="G3O-6L-dgF"/>
<constraint firstAttribute="height" constant="20" id="igh-sw-xvN"/>
</constraints>
<comboBoxCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" usesDataSource="YES" numberOfVisibleItems="5" id="djp-BV-Tu6">
<comboBoxCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" usesDataSource="YES" numberOfVisibleItems="5" id="djp-BV-Tu6">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
@@ -240,7 +240,7 @@
</customSpacing>
</stackView>
<stackView distribution="fill" orientation="vertical" alignment="leading" spacing="11" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="g8D-VJ-ONL">
<rect key="frame" x="0.0" y="0.0" width="360" height="146"/>
<rect key="frame" x="0.0" y="0.0" width="352" height="146"/>
<subviews>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="a8y-l9-yXh">
<rect key="frame" x="-2" y="129" width="90" height="17"/>
@@ -438,11 +438,11 @@
<constraint firstAttribute="height" constant="300" id="Jso-1l-2z0"/>
</constraints>
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="Kcx-Qf-mei">
<rect key="frame" x="0.0" y="285" width="384" height="15"/>
<rect key="frame" x="0.0" y="285" width="392" height="15"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="0.59200000000000008" horizontal="NO" id="E1U-9N-bFJ">
<rect key="frame" x="384" y="0.0" width="16" height="300"/>
<scroller key="verticalScroller" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="E1U-9N-bFJ">
<rect key="frame" x="392" y="0.0" width="15" height="300"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
</scrollView>

0 comments on commit 98a27ba

Please sign in to comment.
You can’t perform that action at this time.