Commit 1aec3d1c authored by YunQiang Su's avatar YunQiang Su

Imported Upstream version 0.2.0

parent d69ec8e6
build/*
*~
build*/
.*
!.git*
.git/
*.tar.*
*.kdev4
.kdev_include_paths
.directory
*.kate-swp
*.orig
*~
tags
astyle.sh
cscope.*
*.part
cmake_minimum_required (VERSION 2.6)
cmake_minimum_required(VERSION 2.6)
project(fcitx-chewing)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
FIND_PACKAGE(Chewing REQUIRED)
FIND_PACKAGE(Gettext REQUIRED)
FIND_PACKAGE(Fcitx REQUIRED)
FIND_PACKAGE(Fcitx 4.2.7 REQUIRED)
# uninstall target
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY)
add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
_fcitx_add_uninstall_target()
set(CMAKE_C_FLAGS "-Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -fvisibility=hidden ${CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -fvisibility=hidden ${CMAKE_CXX_FLAGS}")
......@@ -23,16 +15,16 @@ set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed ${CMAKE_SHARED_LINKER_FLAGS}")
set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--as-needed ${CMAKE_MODULE_LINKER_FLAGS}")
if(NOT DEFINED LIB_INSTALL_DIR)
set(LIB_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib)
set(LIB_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib)
endif()
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/config.h.in"
"${CMAKE_CURRENT_BINARY_DIR}/config.h"
)
"${CMAKE_CURRENT_SOURCE_DIR}/config.h.in"
"${CMAKE_CURRENT_BINARY_DIR}/config.h"
)
set(libdir ${LIB_INSTALL_DIR})
add_subdirectory(po)
add_subdirectory(src)
add_subdirectory(data)
add_subdirectory(po)
......@@ -2,7 +2,7 @@
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
......@@ -305,7 +305,7 @@ the "copyright" line and a pointer to where the full notice is found.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
Also add information on how to contact you by electronic and paper mail.
......
if (NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
string(REGEX REPLACE "\n" ";" files "${files}")
foreach (file ${files})
message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
if (EXISTS "$ENV{DESTDIR}${file}" OR IS_SYMLINK "$ENV{DESTDIR}${file}")
execute_process(
COMMAND @CMAKE_COMMAND@ -E remove "$ENV{DESTDIR}${file}"
OUTPUT_VARIABLE rm_out
RESULT_VARIABLE rm_retval
)
if(NOT ${rm_retval} EQUAL 0)
message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
endif (NOT ${rm_retval} EQUAL 0)
else (EXISTS "$ENV{DESTDIR}${file}" OR IS_SYMLINK "$ENV{DESTDIR}${file}")
message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
endif (EXISTS "$ENV{DESTDIR}${file}" OR IS_SYMLINK "$ENV{DESTDIR}${file}")
endforeach(file)
\ No newline at end of file
fcitx_add_addon_conf_file(fcitx-chewing.conf)
fcitx_add_configdesc_file(fcitx-chewing.desc)
fcitx_add_inputmethod_conf_file(chewing.conf)
install(FILES chewing.png DESTINATION share/fcitx/skin/default/)
install(FILES chewing.png DESTINATION share/fcitx/skin/classic/)
install(FILES chewing.png DESTINATION share/fcitx/skin/dark/)
install(FILES chewing.png DESTINATION share/fcitx/imicon/)
file(GLOB PO_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.po)
file(RELATIVE_PATH REL_SOURCE_ROOT ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR})
if ("${REL_SOURCE_ROOT}" STREQUAL "")
set(REL_SOURCE_ROOT ".")
endif("${REL_SOURCE_ROOT}" STREQUAL "")
set(POT_FILE fcitx-chewing.pot)
configure_file(POTFILES.in.in ${CMAKE_CURRENT_BINARY_DIR}/POTFILES.in)
extract_fcitx_addon_conf_postring()
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/desc.po
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/getdescpo ${PROJECT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS getdescpo)
add_custom_target(
pot
COMMAND INTLTOOL_EXTRACT=${INTLTOOL_EXTRACT} srcdir=${CMAKE_CURRENT_BINARY_DIR} ${INTLTOOL_UPDATE} --gettext-package fcitx-chewing --pot
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/conf.po ${CMAKE_CURRENT_BINARY_DIR}/desc.po
)
# Update .po files and compile them to binary .gmo files
gettext_create_translations(${POT_FILE} ALL ${PO_FILES})
set(PO_LANGS zh_CN zh_TW)
foreach(lang ${PO_LANGS})
fcitx_translate_add_po_file("${lang}" "${lang}.po")
endforeach()
fcitx_translate_set_pot_target(pot fcitx-chewing fcitx-chewing.pot)
# List of source files which contain translatable strings.
./po/desc.po
./po/conf.po
@REL_SOURCE_ROOT@/src/eim.c
@REL_SOURCE_ROOT@/src/eim.h
@REL_SOURCE_ROOT@/data/fcitx-chewing.conf.in
......@@ -7,82 +7,82 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-01-09 00:00+0800\n"
"Report-Msgid-Bugs-To: fcitx-dev@googlegroups.com\n"
"POT-Creation-Date: 2013-01-25 13:06-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"Language: LANG\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: /home/saber/Develop/fcitx-chewing/data/fcitx-chewing.desc:3
#: src/eim.c:129 src/chewing.conf.in:3 src/fcitx-chewing.conf.in:3
#: src/fcitx-chewing.desc:1 src/fcitx-chewing.desc:6 src/fcitx-chewing.desc:11
#: src/fcitx-chewing.desc:16 src/fcitx-chewing.desc:21
msgid "Chewing"
msgstr ""
#: src/fcitx-chewing.conf.in:4
msgid "Chewing Wrapper For Fcitx"
msgstr ""
#: src/fcitx-chewing.desc:3
msgid "Add Phrase Forward"
msgstr ""
#: /home/saber/Develop/fcitx-chewing/data/fcitx-chewing.desc:8
#: src/fcitx-chewing.desc:8
msgid "Backward phrase choice"
msgstr ""
#: /home/saber/Develop/fcitx-chewing/data/fcitx-chewing.desc:13
#: src/fcitx-chewing.desc:13
msgid "Automatically shift cursor"
msgstr ""
#: /home/saber/Develop/fcitx-chewing/data/fcitx-chewing.desc:18
#: src/fcitx-chewing.desc:18
msgid "Space as selection key"
msgstr ""
#: /home/saber/Develop/fcitx-chewing/data/fcitx-chewing.desc:23
#: src/fcitx-chewing.desc:23
msgid "Keyboard Layout"
msgstr ""
# unknown
#: /home/saber/Develop/fcitx-chewing/build/po/tmp/fcitx-chewing.conf.in.h:1
#: /home/saber/Develop/fcitx-chewing/build/po/../..//src/eim.c:130
msgid "Chewing"
msgstr ""
#: unknown
msgid "DACHEN_CP26 Keyboard"
msgstr ""
#: unknown
#: src/fcitx-chewing.desc:26
msgid "Default Keyboard"
msgstr ""
#: unknown
msgid "Dvorak Keyboard"
#: src/fcitx-chewing.desc:27
msgid "Hsu's Keyboard"
msgstr ""
#: unknown
msgid "Dvorak Keyboard with Hsu's support"
#: src/fcitx-chewing.desc:28
msgid "IBM Keyboard"
msgstr ""
#: unknown
msgid "ETen26 Keyboard"
#: src/fcitx-chewing.desc:29
msgid "Gin-Yieh Keyboard"
msgstr ""
#: unknown
#: src/fcitx-chewing.desc:30
msgid "ETen Keyboard"
msgstr ""
#: unknown
msgid "Gin-Yieh Keyboard"
#: src/fcitx-chewing.desc:31
msgid "ETen26 Keyboard"
msgstr ""
#: unknown
msgid "Han-Yu PinYin Keyboard"
#: src/fcitx-chewing.desc:32
msgid "Dvorak Keyboard"
msgstr ""
#: unknown
msgid "Hsu's Keyboard"
#: src/fcitx-chewing.desc:33
msgid "Dvorak Keyboard with Hsu's support"
msgstr ""
#: unknown
msgid "IBM Keyboard"
#: src/fcitx-chewing.desc:34
msgid "DACHEN_CP26 Keyboard"
msgstr ""
#: /home/saber/Develop/fcitx-chewing/build/po/tmp/fcitx-chewing.conf.in.h:2
msgid "Chewing Wrapper For Fcitx"
#: src/fcitx-chewing.desc:35
msgid "Han-Yu PinYin Keyboard"
msgstr ""
#!/bin/sh
filename=desc.po
indir=$1
outdir=$2
cd "$outdir"
rm -f "$outdir/$filename"; touch "$outdir/$filename"
cat > "$outdir/$filename" <<EOF
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: fcitx-dev@googlegroups.com\n"
"POT-Creation-Date: 2010-11-17 11:48+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
EOF
cd $indir
descfiles=`find "$indir" -name ".hg" -prune -or -name "test" -prune -or -iname "*.desc" | grep desc`
# Extract Description
for f in $descfiles
do
awk '/^[\t ]*Description=/ { print "\n#: '$f':" NR"\n" "msgid \"" substr($0, 13)"\"\n" "msgstr \"\""}' "$f" >> "$outdir/$filename"
done
# Extract Group Name
grep -nH '^\[' $descfiles | grep -v 'DescriptionFile' | awk ' "^[" { split($0, a, ":"); split(a[3], b, "/"); print substr(b[1], 2); }' | sort | uniq | awk '{ print "# unknown\nmsgid \""$0"\"\nmsgstr \"\"\n"; }' >> "$outdir/$filename"
# Extract Enum Name
grep -h 'Enum[0-9]' $descfiles | sed -e 's/Enum[0-9]=//g' | sort | uniq | awk '{ print "#: unknown\nmsgid \""$0"\"\nmsgstr \"\"\n"; }' >> "$outdir/$filename"
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Weng Xuetian <wengxt@gmail.com>, 2010, 2011, 2012.
# Translators:
# Weng Xuetian <wengxt@gmail.com>, 2010-2012.
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-01-09 00:00+0800\n"
"PO-Revision-Date: 2012-01-09 00:01+0800\n"
"Last-Translator: Weng Xuetian <wengxt@gmail.com>\n"
"Language-Team: Chinese Simplified <fcitx-dev@googlegroups.com>\n"
"Project-Id-Version: fcitx\n"
"Report-Msgid-Bugs-To: fcitx-dev@googlegroups.com\n"
"POT-Creation-Date: 2013-01-25 13:06-0500\n"
"PO-Revision-Date: 2012-01-25 08:25+0000\n"
"Last-Translator: Xuetian Weng <wengxt@gmail.com>\n"
"Language-Team: Chinese (China) <fcitx-dev@googlegroups.com>\n"
"Language: zh_CN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Lokalize 1.4\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: /home/saber/Develop/fcitx-chewing/data/fcitx-chewing.desc:3
#: src/fcitx-chewing.desc:3
msgid "Add Phrase Forward"
msgstr "前方加词"
#: /home/saber/Develop/fcitx-chewing/data/fcitx-chewing.desc:13
#: src/fcitx-chewing.desc:13
msgid "Automatically shift cursor"
msgstr "选词完毕自动移到下一个词"
#: /home/saber/Develop/fcitx-chewing/data/fcitx-chewing.desc:8
#: src/fcitx-chewing.desc:8
msgid "Backward phrase choice"
msgstr "后方选择字词"
#: /home/saber/Develop/fcitx-chewing/build/po/tmp/fcitx-chewing.conf.in.h:1
#: /home/saber/Develop/fcitx-chewing/build/po/../..//src/eim.c:130
#: src/eim.c:129 src/chewing.conf.in:3 src/fcitx-chewing.conf.in:3
#: src/fcitx-chewing.desc:1 src/fcitx-chewing.desc:6 src/fcitx-chewing.desc:11
#: src/fcitx-chewing.desc:16 src/fcitx-chewing.desc:21
msgid "Chewing"
msgstr "新酷音"
#: /home/saber/Develop/fcitx-chewing/build/po/tmp/fcitx-chewing.conf.in.h:2
#: src/fcitx-chewing.conf.in:4
msgid "Chewing Wrapper For Fcitx"
msgstr "Fcitx 的 新酷音封装"
#: unknown
#: src/fcitx-chewing.desc:34
msgid "DACHEN_CP26 Keyboard"
msgstr "大千26键键盘"
#: unknown
#: src/fcitx-chewing.desc:26
msgid "Default Keyboard"
msgstr "默认键盘"
#: unknown
#: src/fcitx-chewing.desc:32
msgid "Dvorak Keyboard"
msgstr "Dvorak键盘"
#: unknown
#: src/fcitx-chewing.desc:33
msgid "Dvorak Keyboard with Hsu's support"
msgstr "Dvorak键盘 + 许氏注音"
#: unknown
#: src/fcitx-chewing.desc:30
msgid "ETen Keyboard"
msgstr "倚天键盘"
#: unknown
#: src/fcitx-chewing.desc:31
msgid "ETen26 Keyboard"
msgstr "倚天26键键盘"
#: unknown
#: src/fcitx-chewing.desc:29
msgid "Gin-Yieh Keyboard"
msgstr "精业键盘"
#: unknown
#: src/fcitx-chewing.desc:35
msgid "Han-Yu PinYin Keyboard"
msgstr "汉语拼音键盘"
#: unknown
#: src/fcitx-chewing.desc:27
msgid "Hsu's Keyboard"
msgstr "许氏键盘"
#: unknown
#: src/fcitx-chewing.desc:28
msgid "IBM Keyboard"
msgstr "IBM键盘"
#: /home/saber/Develop/fcitx-chewing/data/fcitx-chewing.desc:23
#: src/fcitx-chewing.desc:23
msgid "Keyboard Layout"
msgstr "键盘布局"
#: /home/saber/Develop/fcitx-chewing/data/fcitx-chewing.desc:18
#: src/fcitx-chewing.desc:18
msgid "Space as selection key"
msgstr "空格键选词"
......@@ -10,84 +10,84 @@
msgid ""
msgstr ""
"Project-Id-Version: fcitx\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-01-09 00:00+0800\n"
"PO-Revision-Date: 2012-08-25 06:57+0000\n"
"Last-Translator: Cheng-Chia Tseng <pswo10680@gmail.com>\n"
"Report-Msgid-Bugs-To: fcitx-dev@googlegroups.com\n"
"POT-Creation-Date: 2013-01-25 13:06-0500\n"
"PO-Revision-Date: 2012-12-06 16:36+0000\n"
"Last-Translator: Hiunn_Hue <hiunnhue108@ymail.com>\n"
"Language-Team: Chinese (Taiwan) (http://www.transifex.com/projects/p/fcitx/"
"language/zh_TW/)\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: /home/saber/Develop/fcitx-chewing/data/fcitx-chewing.desc:3
#: src/fcitx-chewing.desc:3
msgid "Add Phrase Forward"
msgstr "前方加詞"
#: /home/saber/Develop/fcitx-chewing/data/fcitx-chewing.desc:13
#: src/fcitx-chewing.desc:13
msgid "Automatically shift cursor"
msgstr "選字完畢自動移到下一個字"
#: /home/saber/Develop/fcitx-chewing/data/fcitx-chewing.desc:8
#: src/fcitx-chewing.desc:8
msgid "Backward phrase choice"
msgstr "後方選擇字詞"
# unknown
#: /home/saber/Develop/fcitx-chewing/build/po/tmp/fcitx-chewing.conf.in.h:1
#: /home/saber/Develop/fcitx-chewing/build/po/../..//src/eim.c:130
#: src/eim.c:129 src/chewing.conf.in:3 src/fcitx-chewing.conf.in:3
#: src/fcitx-chewing.desc:1 src/fcitx-chewing.desc:6 src/fcitx-chewing.desc:11
#: src/fcitx-chewing.desc:16 src/fcitx-chewing.desc:21
msgid "Chewing"
msgstr "新酷音"
#: /home/saber/Develop/fcitx-chewing/build/po/tmp/fcitx-chewing.conf.in.h:2
#: src/fcitx-chewing.conf.in:4
msgid "Chewing Wrapper For Fcitx"
msgstr "Fcitx 的新酷音封装"
#: unknown
#: src/fcitx-chewing.desc:34
msgid "DACHEN_CP26 Keyboard"
msgstr "大千26鍵"
#: unknown
#: src/fcitx-chewing.desc:26
msgid "Default Keyboard"
msgstr "預設鍵盤"
#: unknown
#: src/fcitx-chewing.desc:32
msgid "Dvorak Keyboard"
msgstr "Dvorak 鍵盤"
#: unknown
#: src/fcitx-chewing.desc:33
msgid "Dvorak Keyboard with Hsu's support"
msgstr "Dvorak 鍵盤 + 許氏注音"
#: unknown
#: src/fcitx-chewing.desc:30
msgid "ETen Keyboard"
msgstr "倚天鍵盤"
#: unknown
#: src/fcitx-chewing.desc:31
msgid "ETen26 Keyboard"
msgstr "倚天26鍵鍵盤"
#: unknown
#: src/fcitx-chewing.desc:29
msgid "Gin-Yieh Keyboard"
msgstr "精業鍵盤"
#: unknown
#: src/fcitx-chewing.desc:35
msgid "Han-Yu PinYin Keyboard"
msgstr "漢語拼音排列"
#: unknown
#: src/fcitx-chewing.desc:27
msgid "Hsu's Keyboard"
msgstr "許氏鍵盤"
#: unknown
#: src/fcitx-chewing.desc:28
msgid "IBM Keyboard"
msgstr "IBM 鍵盤"
#: /home/saber/Develop/fcitx-chewing/data/fcitx-chewing.desc:23
#: src/fcitx-chewing.desc:23
msgid "Keyboard Layout"
msgstr "鍵盤配置"
#: /home/saber/Develop/fcitx-chewing/data/fcitx-chewing.desc:18
#: src/fcitx-chewing.desc:18
msgid "Space as selection key"
msgstr "使用空白鍵選擇候選字詞"
......@@ -11,5 +11,8 @@ set( fcitx_chewing_sources
add_definitions( -DLOCALEDIR=\"${CMAKE_INSTALL_PREFIX}/share/locale\" )
fcitx_add_addon(fcitx-chewing ${fcitx_chewing_sources} )
target_link_libraries (fcitx-chewing ${CHEWING_LIBRARIES})
fcitx_add_addon_full(chewing
DESC
SOURCES ${fcitx_chewing_sources}
IM_CONFIG chewing.conf
LINK_LIBS ${CHEWING_LIBRARIES})
\ No newline at end of file
......@@ -107,7 +107,6 @@ void* FcitxChewingCreate(FcitxInstance* instance)
FcitxChewing* chewing = (FcitxChewing*) fcitx_utils_malloc0(sizeof(FcitxChewing));
FcitxGlobalConfig* config = FcitxInstanceGetGlobalConfig(instance);
FcitxInputState *input = FcitxInstanceGetInputState(instance);
FcitxCandidateWordSetChoose(FcitxInputStateGetCandidateList(input), DIGIT_STR_CHOOSE);
bindtextdomain("fcitx-chewing", LOCALEDIR);
......@@ -270,9 +269,11 @@ INPUT_RETURN_VALUE FcitxChewingGetCandWords(void* arg)
FcitxMessages *clientPreedit = FcitxInputStateGetClientPreedit(input);
ChewingContext * ctx = chewing->context;
FcitxGlobalConfig* config = FcitxInstanceGetGlobalConfig(chewing->owner);
FcitxCandidateWordList* candList = FcitxInputStateGetCandidateList(input);
chewing_set_candPerPage(ctx, config->iMaxCandWord);
FcitxCandidateWordSetPageSize(FcitxInputStateGetCandidateList(input), config->iMaxCandWord);
FcitxCandidateWordSetPageSize(candList, config->iMaxCandWord);
FcitxCandidateWordSetChoose(candList, DIGIT_STR_CHOOSE);
//clean up window asap
FcitxInstanceCleanInputWindow(chewing->owner);
......@@ -299,7 +300,7 @@ INPUT_RETURN_VALUE FcitxChewingGetCandWords(void* arg)
cw.strExtra = NULL;
cw.strWord = strdup(str);
cw.wordType = MSG_OTHER;
FcitxCandidateWordAppend(FcitxInputStateGetCandidateList(input), &cw);
FcitxCandidateWordAppend(candList, &cw);
chewing_free(str);
index ++;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment