diff -Nru fcitx-googlepinyin-0.1.5/cmake/FindGooglepinyin.cmake fcitx-googlepinyin-0.1.6/cmake/FindGooglepinyin.cmake
--- fcitx-googlepinyin-0.1.5/cmake/FindGooglepinyin.cmake 2012-03-09 12:07:27.000000000 +0800
+++ fcitx-googlepinyin-0.1.6/cmake/FindGooglepinyin.cmake 2012-09-16 22:44:20.000000000 +0800
@@ -16,7 +16,7 @@
endif(GOOGLEPINYIN_INCLUDE_DIR AND GOOGLEPINYIN_LIBRARIES)
find_package(PkgConfig REQUIRED)
-pkg_check_modules(PC_LIBGOOGLEPINYIN "googlepinyin >= 1.0")
+pkg_check_modules(PC_LIBGOOGLEPINYIN "googlepinyin>=1.0")
find_path(GOOGLEPINYIN_MAIN_INCLUDE_DIR
NAMES pinyinime.h
@@ -30,7 +30,7 @@
set(GOOGLEPINYIN_LIBDIR "${PC_LIBGOOGLEPINYIN_LIBDIR}")
include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(GOOGLEPINYIN DEFAULT_MSG
+find_package_handle_standard_args(Googlepinyin DEFAULT_MSG
GOOGLEPINYIN_LIBRARIES
GOOGLEPINYIN_MAIN_INCLUDE_DIR
)
diff -Nru fcitx-googlepinyin-0.1.5/data/CMakeLists.txt fcitx-googlepinyin-0.1.6/data/CMakeLists.txt
--- fcitx-googlepinyin-0.1.5/data/CMakeLists.txt 2012-03-09 12:07:27.000000000 +0800
+++ fcitx-googlepinyin-0.1.6/data/CMakeLists.txt 2012-09-16 22:44:20.000000000 +0800
@@ -1,4 +1,8 @@
fcitx_add_addon_conf_file(fcitx-googlepinyin.conf)
-fcitx_add_configdesc_file(fcitx-googlepinyin.desc)
+fcitx_add_inputmethod_conf_file(googlepinyin.conf)
-fcitx_add_inputmethod_conf_file(googlepinyin.conf)
\ No newline at end of file
+install(FILES googlepinyin.png RENAME fcitx-googlepinyin.png DESTINATION share/icons/hicolor/48x48/apps)
+install(FILES googlepinyin-16.png RENAME fcitx-googlepinyin.png DESTINATION share/icons/hicolor/16x16/apps)
+install(FILES googlepinyin.png DESTINATION share/fcitx/imicon RENAME googlepinyin.png)
+install(FILES googlepinyin-16.png DESTINATION share/fcitx/skin/default RENAME googlepinyin.png)
+install(FILES googlepinyin-16.png DESTINATION share/fcitx/skin/classic RENAME googlepinyin.png)
diff -Nru fcitx-googlepinyin-0.1.5/data/fcitx-googlepinyin.desc fcitx-googlepinyin-0.1.6/data/fcitx-googlepinyin.desc
--- fcitx-googlepinyin-0.1.5/data/fcitx-googlepinyin.desc 2012-03-09 12:07:27.000000000 +0800
+++ fcitx-googlepinyin-0.1.6/data/fcitx-googlepinyin.desc 1970-01-01 08:00:00.000000000 +0800
@@ -1,7 +0,0 @@
-[GooglePinyin/Priority]
-Type=Integer
-DefaultValue=1
-Description=Priority of GooglePinyin
-
-[DescriptionFile]
-LocaleDomain=fcitx-googlepinyin
Binary files /tmp/rsnseijHQ2/fcitx-googlepinyin-0.1.5/data/googlepinyin-16.png and /tmp/hm1pFEQkMM/fcitx-googlepinyin-0.1.6/data/googlepinyin-16.png differ
diff -Nru fcitx-googlepinyin-0.1.5/data/googlepinyin-16.svg fcitx-googlepinyin-0.1.6/data/googlepinyin-16.svg
--- fcitx-googlepinyin-0.1.5/data/googlepinyin-16.svg 1970-01-01 08:00:00.000000000 +0800
+++ fcitx-googlepinyin-0.1.6/data/googlepinyin-16.svg 2012-09-16 22:44:20.000000000 +0800
@@ -0,0 +1,78 @@
+
+
+
+
diff -Nru fcitx-googlepinyin-0.1.5/data/googlepinyin.conf.in fcitx-googlepinyin-0.1.6/data/googlepinyin.conf.in
--- fcitx-googlepinyin-0.1.5/data/googlepinyin.conf.in 2012-03-09 12:07:27.000000000 +0800
+++ fcitx-googlepinyin-0.1.6/data/googlepinyin.conf.in 2012-09-16 22:44:20.000000000 +0800
@@ -2,6 +2,6 @@
UniqueName=googlepinyin
_Name=Google Pinyin
IconName=googlepinyin
-Priority=1
+Priority=10
LangCode=zh_CN
-Parent=fcitx-googlepinyin
\ No newline at end of file
+Parent=fcitx-googlepinyin
Binary files /tmp/rsnseijHQ2/fcitx-googlepinyin-0.1.5/data/googlepinyin.png and /tmp/hm1pFEQkMM/fcitx-googlepinyin-0.1.6/data/googlepinyin.png differ
diff -Nru fcitx-googlepinyin-0.1.5/data/googlepinyin.svg fcitx-googlepinyin-0.1.6/data/googlepinyin.svg
--- fcitx-googlepinyin-0.1.5/data/googlepinyin.svg 1970-01-01 08:00:00.000000000 +0800
+++ fcitx-googlepinyin-0.1.6/data/googlepinyin.svg 2012-09-16 22:44:20.000000000 +0800
@@ -0,0 +1,78 @@
+
+
+
+
diff -Nru fcitx-googlepinyin-0.1.5/debian/changelog fcitx-googlepinyin-0.1.6/debian/changelog
--- fcitx-googlepinyin-0.1.5/debian/changelog 2012-05-15 18:42:04.000000000 +0800
+++ fcitx-googlepinyin-0.1.6/debian/changelog 2012-10-01 21:16:10.000000000 +0800
@@ -1,3 +1,10 @@
+fcitx-googlepinyin (0.1.6-1) unstable; urgency=low
+
+ * New upstream release:
+ + Limit input and install icon to avoid crash.
+
+ -- Aron Xu Mon, 01 Oct 2012 21:10:23 +0800
+
fcitx-googlepinyin (0.1.5-2) unstable; urgency=low
* Fix debian/watch: googlecode.
diff -Nru fcitx-googlepinyin-0.1.5/po/CMakeLists.txt fcitx-googlepinyin-0.1.6/po/CMakeLists.txt
--- fcitx-googlepinyin-0.1.5/po/CMakeLists.txt 2012-03-09 12:07:27.000000000 +0800
+++ fcitx-googlepinyin-0.1.6/po/CMakeLists.txt 2012-09-16 22:44:20.000000000 +0800
@@ -10,15 +10,11 @@
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-googlepinyin --pot
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/conf.po ${CMAKE_CURRENT_BINARY_DIR}/desc.po
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/conf.po
)
# Update .po files and compile them to binary .gmo files
diff -Nru fcitx-googlepinyin-0.1.5/po/fcitx-googlepinyin.pot fcitx-googlepinyin-0.1.6/po/fcitx-googlepinyin.pot
--- fcitx-googlepinyin-0.1.5/po/fcitx-googlepinyin.pot 2012-03-09 12:07:27.000000000 +0800
+++ fcitx-googlepinyin-0.1.6/po/fcitx-googlepinyin.pot 2012-09-16 22:44:20.000000000 +0800
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-08-27 22:03+0800\n"
+"POT-Creation-Date: 2012-04-03 09:54+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,16 +17,8 @@
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: /home/saber/Develop/fcitx-googlepinyin/data/fcitx-googlepinyin.desc:4
-msgid "Priority of GooglePinyin"
-msgstr ""
-
-# unknown
-#: /home/saber/Develop/fcitx-googlepinyin/build/po/../..//src/eim.cpp:445
-msgid "GooglePinyin"
-msgstr ""
-
#: /home/saber/Develop/fcitx-googlepinyin/build/po/tmp/fcitx-googlepinyin.conf.in.h:1
+#: /home/saber/Develop/fcitx-googlepinyin/build/po/../..//src/eim.cpp:485
msgid "Google Pinyin"
msgstr ""
diff -Nru fcitx-googlepinyin-0.1.5/po/getdescpo fcitx-googlepinyin-0.1.6/po/getdescpo
--- fcitx-googlepinyin-0.1.5/po/getdescpo 2012-03-09 12:07:27.000000000 +0800
+++ fcitx-googlepinyin-0.1.6/po/getdescpo 1970-01-01 08:00:00.000000000 +0800
@@ -1,46 +0,0 @@
-#!/bin/sh
-filename=desc.po
-indir=$1
-outdir=$2
-
-cd "$outdir"
-
-rm -f "$outdir/$filename"; touch "$outdir/$filename"
-
-cat > "$outdir/$filename" <, 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 \n"
-"Language-Team: LANGUAGE \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"
-
diff -Nru fcitx-googlepinyin-0.1.5/po/POTFILES.in.in fcitx-googlepinyin-0.1.6/po/POTFILES.in.in
--- fcitx-googlepinyin-0.1.5/po/POTFILES.in.in 2012-03-09 12:07:27.000000000 +0800
+++ fcitx-googlepinyin-0.1.6/po/POTFILES.in.in 2012-09-16 22:44:20.000000000 +0800
@@ -1,7 +1,5 @@
# List of source files which contain translatable strings.
-./po/desc.po
./po/conf.po
@REL_SOURCE_ROOT@/src/eim.cpp
@REL_SOURCE_ROOT@/src/eim.h
-@REL_SOURCE_ROOT@/src/config.cpp
@REL_SOURCE_ROOT@/data/fcitx-googlepinyin.conf.in
diff -Nru fcitx-googlepinyin-0.1.5/po/zh_CN.po fcitx-googlepinyin-0.1.6/po/zh_CN.po
--- fcitx-googlepinyin-0.1.5/po/zh_CN.po 2012-03-09 12:07:27.000000000 +0800
+++ fcitx-googlepinyin-0.1.6/po/zh_CN.po 2012-09-16 22:44:20.000000000 +0800
@@ -8,10 +8,10 @@
msgstr ""
"Project-Id-Version: fcitx\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-08-27 22:03+0800\n"
+"POT-Creation-Date: 2012-04-03 09:54+0800\n"
"PO-Revision-Date: 2011-11-16 06:56+0000\n"
"Last-Translator: csslayer \n"
-"Language-Team: LANGUAGE \n"
+"Language-Team: Chinese (China) \n"
"Language: zh_CN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -19,18 +19,17 @@
"Plural-Forms: nplurals=1; plural=0\n"
#: /home/saber/Develop/fcitx-googlepinyin/build/po/tmp/fcitx-googlepinyin.conf.in.h:1
+#: /home/saber/Develop/fcitx-googlepinyin/build/po/../..//src/eim.cpp:485
msgid "Google Pinyin"
msgstr "Google 拼音"
-# unknown
-#: /home/saber/Develop/fcitx-googlepinyin/build/po/../..//src/eim.cpp:445
-msgid "GooglePinyin"
-msgstr "Google 拼音"
-
-#: /home/saber/Develop/fcitx-googlepinyin/data/fcitx-googlepinyin.desc:4
-msgid "Priority of GooglePinyin"
-msgstr "Google 拼音的优先级"
-
#: /home/saber/Develop/fcitx-googlepinyin/build/po/tmp/fcitx-googlepinyin.conf.in.h:2
msgid "Wrapper of Google Pinyin on Android"
msgstr "Android 上的 Google 拼音的封装"
+
+# unknown
+#~ msgid "GooglePinyin"
+#~ msgstr "Google 拼音"
+
+#~ msgid "Priority of GooglePinyin"
+#~ msgstr "Google 拼音的优先级"
diff -Nru fcitx-googlepinyin-0.1.5/po/zh_TW.po fcitx-googlepinyin-0.1.6/po/zh_TW.po
--- fcitx-googlepinyin-0.1.5/po/zh_TW.po 2012-03-09 12:07:27.000000000 +0800
+++ fcitx-googlepinyin-0.1.6/po/zh_TW.po 2012-09-16 22:44:20.000000000 +0800
@@ -3,15 +3,16 @@
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
+# Alisha , 2012.
msgid ""
msgstr ""
"Project-Id-Version: fcitx\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-08-27 22:03+0800\n"
-"PO-Revision-Date: 2011-11-16 06:53+0000\n"
-"Last-Translator: FULL NAME \n"
+"POT-Creation-Date: 2012-04-03 09:54+0800\n"
+"PO-Revision-Date: 2012-01-26 16:06+0000\n"
+"Last-Translator: Alisha \n"
"Language-Team: Chinese (Taiwan) (http://www.transifex.net/projects/p/fcitx/"
-"team/zh_TW/)\n"
+"language/zh_TW/)\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -19,18 +20,17 @@
"Plural-Forms: nplurals=1; plural=0\n"
#: /home/saber/Develop/fcitx-googlepinyin/build/po/tmp/fcitx-googlepinyin.conf.in.h:1
+#: /home/saber/Develop/fcitx-googlepinyin/build/po/../..//src/eim.cpp:485
msgid "Google Pinyin"
-msgstr ""
-
-# unknown
-#: /home/saber/Develop/fcitx-googlepinyin/build/po/../..//src/eim.cpp:445
-msgid "GooglePinyin"
-msgstr ""
-
-#: /home/saber/Develop/fcitx-googlepinyin/data/fcitx-googlepinyin.desc:4
-msgid "Priority of GooglePinyin"
-msgstr ""
+msgstr "Google 拼音"
#: /home/saber/Develop/fcitx-googlepinyin/build/po/tmp/fcitx-googlepinyin.conf.in.h:2
msgid "Wrapper of Google Pinyin on Android"
-msgstr ""
+msgstr "Android 上的 Google 拼音的封裝"
+
+# unknown
+#~ msgid "GooglePinyin"
+#~ msgstr "Google 拼音"
+
+#~ msgid "Priority of GooglePinyin"
+#~ msgstr "Google 拼音優先權"
diff -Nru fcitx-googlepinyin-0.1.5/src/CMakeLists.txt fcitx-googlepinyin-0.1.6/src/CMakeLists.txt
--- fcitx-googlepinyin-0.1.5/src/CMakeLists.txt 2012-03-09 12:07:27.000000000 +0800
+++ fcitx-googlepinyin-0.1.6/src/CMakeLists.txt 2012-09-16 22:44:20.000000000 +0800
@@ -1,6 +1,5 @@
set(FCITX_GOOGLEPINYIN_SRCS
eim.cpp
- config.cpp
)
include_directories(
diff -Nru fcitx-googlepinyin-0.1.5/src/config.cpp fcitx-googlepinyin-0.1.6/src/config.cpp
--- fcitx-googlepinyin-0.1.5/src/config.cpp 2012-03-09 12:07:27.000000000 +0800
+++ fcitx-googlepinyin-0.1.6/src/config.cpp 1970-01-01 08:00:00.000000000 +0800
@@ -1,26 +0,0 @@
-/***************************************************************************
- * Copyright (C) 2010~2011 by CSSlayer *
- * wengxt@gmail.com *
- * *
- * This program is free software: you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation, either version 3 of the License, or *
- * (at your option) any later version. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License *
- * along with this program. If not, see . *
- * *
- ***************************************************************************/
-
-#include "eim.h"
-
-/* USE fcitx provided macro to bind config and variable */
-CONFIG_BINDING_BEGIN(FcitxGooglePinyinConfig);
-CONFIG_BINDING_REGISTER("GooglePinyin", "Priority", iPriority);
-CONFIG_BINDING_END();
-// kate: indent-mode cstyle; space-indent on; indent-width 0;
diff -Nru fcitx-googlepinyin-0.1.5/src/eim.cpp fcitx-googlepinyin-0.1.6/src/eim.cpp
--- fcitx-googlepinyin-0.1.5/src/eim.cpp 2012-03-09 12:07:27.000000000 +0800
+++ fcitx-googlepinyin-0.1.6/src/eim.cpp 2012-09-16 22:44:20.000000000 +0800
@@ -67,8 +67,6 @@
static void FcitxGooglePinyinUpdateCand(FcitxGooglePinyin* googlepinyin);
static boolean DecodeIsDone(FcitxGooglePinyin* googlepinyin);
static void GetCCandString(FcitxGooglePinyin* googlepinyin, int index);
-static boolean LoadGooglePinyinConfig(FcitxGooglePinyinConfig* fs);
-static void SaveGooglePinyinConfig(FcitxGooglePinyinConfig* fs);
CONFIG_DESC_DEFINE(GetGooglePinyinConfigDesc, "fcitx-googlepinyin.desc")
@@ -76,7 +74,6 @@
* @brief Reset the status.
*
**/
-__EXPORT_API
void FcitxGooglePinyinReset (void* arg)
{
FcitxGooglePinyin* googlepinyin = (FcitxGooglePinyin*) arg;
@@ -124,7 +121,6 @@
* @param count count from XKeyEvent
* @return INPUT_RETURN_VALUE
**/
-__EXPORT_API
INPUT_RETURN_VALUE FcitxGooglePinyinDoInput(void* arg, FcitxKeySym sym, unsigned int state)
{
FcitxGooglePinyin* googlepinyin = (FcitxGooglePinyin*) arg;
@@ -146,6 +142,13 @@
googlepinyin->CursorPos ++;
TryBestSearch(googlepinyin);
ime_pinyin::im_get_sps_str(&len);
+ if (googlepinyin->candNum > 0) {
+ GetCCandString(googlepinyin, 0);
+ if (fcitx_utf8_strlen(googlepinyin->ubuf) > MAX_GOOGLEPINYIN_HZ) {
+ FcitxGooglePinyinDoInput(googlepinyin, FcitxKey_BackSpace, 0);
+ return IRV_DO_NOTHING;
+ }
+ }
if (len == 0 && strlen(googlepinyin->buf) == 1)
{
FcitxGooglePinyinReset(googlepinyin);
@@ -367,7 +370,6 @@
* @param searchMode
* @return INPUT_RETURN_VALUE
**/
-__EXPORT_API
INPUT_RETURN_VALUE FcitxGooglePinyinGetCandWords(void* arg)
{
FcitxGooglePinyin* googlepinyin = (FcitxGooglePinyin*) arg;
@@ -403,7 +405,6 @@
* @param iIndex index of candidate word
* @return the string of canidate word
**/
-__EXPORT_API
INPUT_RETURN_VALUE FcitxGooglePinyinGetCandWord (void* arg, FcitxCandidateWord* candWord)
{
FcitxGooglePinyin* googlepinyin = (FcitxGooglePinyin*) arg;
@@ -434,16 +435,10 @@
* @param arg
* @return successful or not
**/
-__EXPORT_API
void* FcitxGooglePinyinCreate (FcitxInstance* instance)
{
FcitxGooglePinyin* googlepinyin = (FcitxGooglePinyin*) fcitx_utils_malloc0(sizeof(FcitxGooglePinyin));
bindtextdomain("fcitx-googlepinyin", LOCALEDIR);
- if (!LoadGooglePinyinConfig(&googlepinyin->config))
- {
- free(googlepinyin);
- return NULL;
- }
char* userDict = NULL;
googlepinyin->owner = instance;
@@ -494,7 +489,7 @@
FcitxInstanceRegisterIM(instance,
googlepinyin,
"googlepinyin",
- _("GooglePinyin"),
+ _("Google Pinyin"),
"googlepinyin",
FcitxGooglePinyinInit,
FcitxGooglePinyinReset,
@@ -504,7 +499,7 @@
SaveFcitxGooglePinyin,
ReloadConfigFcitxGooglePinyin,
NULL,
- googlepinyin->config.iPriority,
+ 5,
"zh_CN"
);
return googlepinyin;
@@ -515,61 +510,15 @@
*
* @return int
**/
-__EXPORT_API
void FcitxGooglePinyinDestroy (void* arg)
{
free(arg);
}
-__EXPORT_API void ReloadConfigFcitxGooglePinyin(void* arg)
-{
- FcitxGooglePinyin* googlepinyin = (FcitxGooglePinyin*) arg;
- LoadGooglePinyinConfig(&googlepinyin->config);
-}
-
-/**
- * @brief Load the config file for fcitx-googlepinyin
- *
- * @param Bool is reload or not
- **/
-boolean LoadGooglePinyinConfig(FcitxGooglePinyinConfig* fs)
-{
- FcitxConfigFileDesc *configDesc = GetGooglePinyinConfigDesc();
- if (configDesc == NULL)
- return false;
-
- FILE *fp = FcitxXDGGetFileUserWithPrefix("conf", "fcitx-googlepinyin.config", "r", NULL);
-
- if (!fp)
- {
- if (errno == ENOENT)
- SaveGooglePinyinConfig(fs);
- }
- FcitxConfigFile *cfile = FcitxConfigParseConfigFileFp(fp, configDesc);
- FcitxGooglePinyinConfigConfigBind(fs, cfile, configDesc);
- FcitxConfigBindSync(&fs->gconfig);
-
- if (fp)
- fclose(fp);
-
- return true;
-}
-
-/**
- * @brief Save the config
- *
- * @return void
- **/
-void SaveGooglePinyinConfig(FcitxGooglePinyinConfig* fs)
+void ReloadConfigFcitxGooglePinyin(void* arg)
{
- FcitxConfigFileDesc *configDesc = GetGooglePinyinConfigDesc();
- FILE *fp = FcitxXDGGetFileUserWithPrefix("conf", "fcitx-googlepinyin.config", "w", NULL);
- FcitxConfigSaveConfigFileFp(fp, &fs->gconfig, configDesc);
- if (fp)
- fclose(fp);
}
-
boolean DecodeIsDone(FcitxGooglePinyin* googlepinyin)
{
const ime_pinyin::uint16* start = 0;
diff -Nru fcitx-googlepinyin-0.1.5/src/eim.h fcitx-googlepinyin-0.1.6/src/eim.h
--- fcitx-googlepinyin-0.1.5/src/eim.h 2012-03-09 12:07:27.000000000 +0800
+++ fcitx-googlepinyin-0.1.6/src/eim.h 2012-09-16 22:44:20.000000000 +0800
@@ -34,12 +34,8 @@
#define RET_BUF_LEN 256
#define UTF8_BUF_LEN 4096
-#define MAX_GOOGLEPINYIN_INPUT MAX_USER_INPUT
-
-typedef struct _FcitxGooglePinyinConfig {
- FcitxGenericConfig gconfig;
- int iPriority;
-} FcitxGooglePinyinConfig;
+#define MAX_GOOGLEPINYIN_INPUT 35
+#define MAX_GOOGLEPINYIN_HZ 10
typedef struct _GooglePinyinCandWord {
int index;
@@ -47,7 +43,6 @@
typedef struct _FcitxGooglePinyin
{
- FcitxGooglePinyinConfig config;
FcitxInstance* owner;
iconv_t conv;
char buf[MAX_GOOGLEPINYIN_INPUT + 1];
@@ -67,8 +62,5 @@
__EXPORT_API void ReloadConfigFcitxGooglePinyin(void*);
__EXPORT_API void SaveFcitxGooglePinyin(void* arg);;
-
-CONFIG_BINDING_DECLARE(FcitxGooglePinyinConfig);
-
#endif
// kate: indent-mode cstyle; space-indent on; indent-width 0;