Skip to content

Commit

Permalink
v0.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
0312birdzhang committed May 26, 2018
1 parent c1a854e commit 39c48c8
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 26 deletions.
6 changes: 3 additions & 3 deletions libgooglepinyin/libgooglepinyin.pro
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ TARGET = $$qtLibraryTarget($$TARGET)

uri = xyz.birdzhang.ime

OTHER_FILES +=\
data/rawdict_utf16_65105_freq.txt \
data/valid_utf16.txt
#OTHER_FILES +=\
# data/rawdict_utf16_65105_freq.txt \
# data/valid_utf16.txt

CONFIG *= thread

Expand Down
2 changes: 1 addition & 1 deletion miaomiaomiao/harbour-souniaoime.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ X-Nemo-Application-Type=silica-qt5
Icon=harbour-souniaoime
Exec=harbour-souniaoime
Name=SouBirdIME
Name[cn]=搜鸟输入法
Name[zh_CN]=搜鸟输入法

18 changes: 11 additions & 7 deletions miaomiaomiao/maliit/plugins/com/jolla/SouniaoHandler.qml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ InputHandler {
handler.composingEnabled = handler.pinyinMode
keyboard.layout.pinyinMode = handler.pinyinMode
if (handler.preedit != "") {
commit(handler.preedit)
// commit(handler.preedit)
}
reset()
}
Expand Down Expand Up @@ -142,7 +142,7 @@ InputHandler {
var tmpSubPy = tmpPy.slice(parseInt(pySqlStart[fixLen+1]), tmpPy.length)

MInputMethodQuick.sendCommit(item.text)
MInputMethodQuick.sendPreedit( tmpSubPy )
// MInputMethodQuick.sendPreedit( tmpSubPy )
preedit = tmpSubPy

if(hasMore && fetchMany){
Expand Down Expand Up @@ -744,9 +744,8 @@ InputHandler {

function selectPhrase(phrase, index) {
console.log("phrase clicked: " + phrase)
// MInputMethodQuick.sendCommit(phrase)
gpy.acceptPhrase(index);
preedit = "";
handler.preedit = "";
if (preedit.length > 0 ) {
MInputMethodQuick.sendPreedit(preedit)
}
Expand Down Expand Up @@ -784,12 +783,16 @@ InputHandler {
return "\'-".indexOf(character) >= 0
}
function applyPrediction(replacement, index) {
// console.log("candidate clicked: " + replacement + "\n")
handler.preedit = "";
if(pressedKey.text && pressedKey.text.length > 0){
console.log("=================================================")
pressedKey.text = "";
}

replacement = replacement + " "
candidateSpaceIndex = MInputMethodQuick.surroundingTextValid
? MInputMethodQuick.cursorPosition + replacement.length : -1
commit(replacement)
// thread.acceptPrediction(index)
commit(replacement);
}

function selectPhraseAndShrink(phrase, index) {
Expand Down Expand Up @@ -819,6 +822,7 @@ InputHandler {
}

function commit(text) {
handler.preedit = "";
MInputMethodQuick.sendCommit(text)
reset()
}
Expand Down
23 changes: 9 additions & 14 deletions miaomiaomiao/qml/pages/FirstPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Page{

SectionHeader{
text: "说明"
font.pixelSize: Theme.fontSizeExtraSmall
font.pixelSize: Theme.fontSizeMedium
}
Label{
text: "本程序大量参考木木大大的山寨谷歌输入法跟gexc大大的拼音输入法,后端采用谷歌拼音输入法代码,做到了既可以使用gexc大大的输入法键盘,又"+
Expand All @@ -31,7 +31,7 @@ Page{
+"<br/><br/>本程序只是测试一下开源的谷歌拼音输入法,并无其他意图,在旗鱼上更智能的输入法是不存在的~😂"
+"<br/><br/>A pinyin input method for simple chinese user."
wrapMode: Text.RichText
font.pixelSize: Theme.fontSizeTiny
font.pixelSize: Theme.fontSizeSmall
color: Theme.primaryColor
width: parent.width
anchors{
Expand All @@ -45,29 +45,23 @@ Page{

SectionHeader{
text: "作者"
font.pixelSize: Theme.fontSizeExtraSmall
font.pixelSize: Theme.fontSizeMedium
}

Label{
text: "旗鱼俱乐部 @0312birdzhang 出品"
wrapMode: Text.WordWrap
textFormat: Text.RichText
font.pixelSize: Theme.fontSizeTiny
font.pixelSize: Theme.fontSizeSmall
color: Theme.primaryColor
width: parent.width - Theme.paddingLarge
horizontalAlignment: Text.AlignRight
}

SectionHeader{
text: "图标"
font.pixelSize: Theme.fontSizeExtraSmall
}

Label{
text: "蝉曦 出品"
text: "图标由蝉曦出品"
wrapMode: Text.WordWrap
textFormat: Text.RichText
font.pixelSize: Theme.fontSizeTiny
font.pixelSize: Theme.fontSizeSmall
color: Theme.primaryColor
width: parent.width - Theme.paddingLarge
horizontalAlignment: Text.AlignRight
Expand All @@ -80,11 +74,12 @@ Page{

SectionHeader{
text: "自定义设置"
font.pixelSize: Theme.fontSizeMedium
}

SectionHeader{
text: "联想词数量"
font.pixelSize: Theme.fontSizeExtraSmall
font.pixelSize: Theme.fontSizeMedium * 0.8
}
Slider {
minimumValue: 5
Expand All @@ -100,7 +95,7 @@ Page{

SectionHeader{
text: "候选词数量"
font.pixelSize: Theme.fontSizeExtraSmall
font.pixelSize: Theme.fontSizeMedium * 0.8
}

Slider {
Expand Down
2 changes: 1 addition & 1 deletion rpm/harbour-souniaoime.spec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Name: harbour-souniaoime
%{!?qtc_make:%define qtc_make make}
%{?qtc_builddir:%define _builddir %qtc_builddir}

Version: 0.3.1
Version: 0.3.2
Release: 1
Summary: PinyinIme for Sailfish OS
License: LGPLv2
Expand Down

0 comments on commit 39c48c8

Please sign in to comment.