Skip to content

Commit 91e24ad

Browse files
author
Park Shinjo
committed
bugfix on layout switching
1 parent 805a03c commit 91e24ad

File tree

4 files changed

+33
-71
lines changed

4 files changed

+33
-71
lines changed

rpm/jolla-input-ko.spec

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Name: dotdanbae
2-
Version: 0.1
2+
Version: 0.2
33
Release: 1%{?dist}
44
Summary: Korean layout and input method for Sailfish OS
55
License: GPLv2+
@@ -43,3 +43,19 @@ rm -rf %{buildroot}
4343
/usr/share/maliit/plugins/com/jolla/layouts/ko_common/KoNaratgeulInputHandler.qml
4444
/usr/share/maliit/plugins/com/jolla/layouts/ko_common/2set_handler.js
4545
/usr/share/maliit/plugins/com/jolla/layouts/ko_common/naratgeul_handler.js
46+
47+
%changelog
48+
* Sat Oct 25 2014 Park Shinjo <[email protected]> 0.1
49+
- Fix layout switching bug.
50+
51+
* Wed Feb 19 2014 Park Shinjo <[email protected]> 0.1
52+
- Added Naratgeul layout.
53+
- Bumped version number and changed name.
54+
- Fixed bug on trailing syllables in 2-set layout.
55+
56+
* Tue Jan 14 2014 Park Shinjo <[email protected]> 0.02
57+
- Rewrite to use ohi instead of libhangul.
58+
- Removes usage of any native code.
59+
60+
* Mon Jan 13 2014 Park Shinjo <[email protected]> 0.01
61+
- Initial release based on libhangul.

src/ko.conf

+2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
[ko_2set.qml]
22
name=한글(두벌식)
33
languageCode=KO
4+
handler=layouts/ko_common/KoInputHandler.qml
45

56
[ko_naratgeul.qml]
67
name=한글(나랏글)
78
languageCode=KO
9+
handler=layouts/ko_common/KoNaratgeulInputHandler.qml

src/ko_2set.qml

+6-34
Original file line numberDiff line numberDiff line change
@@ -3,43 +3,15 @@
33

44
import QtQuick 2.0
55
import Sailfish.Silica 1.0
6-
import "ko_common"
76
import ".."
87

98
KeyboardLayout {
10-
type: "korean"
11-
12-
KoInputHandler {
13-
id: koInputHandler
14-
}
15-
16-
Component.onCompleted: init()
17-
18-
Connections {
19-
target: keyboard
20-
onInputHandlerChanged: handlerChanged()
21-
}
22-
23-
function init() {
24-
// force onInputHandlerChanged signal by
25-
// making sure that the input handler was not
26-
// previously pasteInputHandler
27-
if (keyboard.allowLayoutChanges) {
28-
var oldHandler = keyboard.inputHandler
29-
keyboard.inputHandler = xt9Handler.item
30-
oldHandler.active = false
31-
keyboard.inputHandler.active = true
32-
}
33-
}
34-
35-
function handlerChanged() {
36-
if (keyboard.allowLayoutChanges && keyboard.inputHandler == pasteInputHandler &&
37-
canvas.layoutRow.layout != null && canvas.layoutRow.layout.type == type) {
38-
var oldHandler = keyboard.inputHandler
39-
keyboard.inputHandler = koInputHandler
40-
oldHandler.active = false
41-
koInputHandler.active = true
42-
}
9+
// enables possibility to use own InputHandler,
10+
// disables autocaps and text prediction
11+
type: "custom"
12+
Component.onCompleted: {
13+
// disable autocaps
14+
keyboard.autocaps = false
4315
}
4416

4517
KeyboardRow {

src/ko_naratgeul.qml

+8-36
Original file line numberDiff line numberDiff line change
@@ -3,48 +3,20 @@
33

44
import QtQuick 2.0
55
import Sailfish.Silica 1.0 as Silica
6-
import "ko_common"
76
import ".."
87

98
KeyboardLayout {
109
id: main
1110
portraitMode: true
1211
width: geometry.keyboardWidthPortrait
13-
height: 4 * geometry. keyHeightPortrait
14-
15-
type: "korean"
16-
17-
KoNaratgeulInputHandler {
18-
id: koNaratgeulInputHandler
19-
}
20-
21-
Component.onCompleted: init()
22-
23-
Connections {
24-
target: keyboard
25-
onInputHandlerChanged: handlerChanged()
26-
}
27-
28-
function init() {
29-
// force onInputHandlerChanged signal by
30-
// making sure that the input handler was not
31-
// previously pasteInputHandler
32-
if (keyboard.allowLayoutChanges) {
33-
var oldHandler = keyboard.inputHandler
34-
keyboard.inputHandler = xt9Handler.item
35-
oldHandler.active = false
36-
keyboard.inputHandler.active = true
37-
}
38-
}
39-
40-
function handlerChanged() {
41-
if (keyboard.allowLayoutChanges && keyboard.inputHandler == pasteInputHandler &&
42-
canvas.layoutRow.layout != null && canvas.layoutRow.layout.type == type) {
43-
var oldHandler = keyboard.inputHandler
44-
keyboard.inputHandler = koNaratgeulInputHandler
45-
oldHandler.active = false
46-
koNaratgeulInputHandler.active = true
47-
}
12+
height: 4 * geometry.keyHeightPortrait
13+
14+
// enables possibility to use own InputHandler,
15+
// disables autocaps and text prediction
16+
type: "custom"
17+
Component.onCompleted: {
18+
// disable autocaps
19+
keyboard.autocaps = false
4820
}
4921

5022
KeyboardRow {

0 commit comments

Comments
 (0)