Hello community, here is the log from the commit of package fcitx-rime for openSUSE:Factory checked in at 2014-06-10 14:38:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/fcitx-rime (Old) and /work/SRC/openSUSE:Factory/.fcitx-rime.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "fcitx-rime" Changes: -------- --- /work/SRC/openSUSE:Factory/fcitx-rime/fcitx-rime.changes 2013-11-20 10:25:19.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.fcitx-rime.new/fcitx-rime.changes 2014-06-10 14:39:00.000000000 +0200 @@ -1,0 +2,6 @@ +Mon Jun 9 05:02:01 UTC 2014 - [email protected] + +- update version 0.3.1 + * Fix github issues fcitx/fcitx-rime#14 + +------------------------------------------------------------------- Old: ---- fcitx-rime-0.3.0.tar.xz New: ---- fcitx-rime-0.3.1.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ fcitx-rime.spec ++++++ --- /var/tmp/diff_new_pack.a1GC2T/_old 2014-06-10 14:39:01.000000000 +0200 +++ /var/tmp/diff_new_pack.a1GC2T/_new 2014-06-10 14:39:01.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package fcitx-rime # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: fcitx-rime -Version: 0.3.0 +Version: 0.3.1 Release: 0 Summary: Rime input engine support for Fcitx License: GPL-2.0+ ++++++ fcitx-rime-0.3.0.tar.xz -> fcitx-rime-0.3.1.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcitx-rime-0.3.0/po/de.po new/fcitx-rime-0.3.1/po/de.po --- old/fcitx-rime-0.3.0/po/de.po 2013-11-10 14:11:24.000000000 +0100 +++ new/fcitx-rime-0.3.1/po/de.po 2014-02-04 13:36:39.000000000 +0100 @@ -1,48 +1,57 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# +# # Translators: # mar well <[email protected]>, 2013 msgid "" msgstr "" "Project-Id-Version: fcitx\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2013-07-28 12:02-0400\n" -"PO-Revision-Date: 2013-07-28 16:09+0000\n" +"POT-Creation-Date: 2014-02-04 12:36+0000\n" +"PO-Revision-Date: 2014-01-01 08:57+0000\n" "Last-Translator: Xuetian Weng <[email protected]>\n" -"Language-Team: German (http://www.transifex.com/projects/p/fcitx/language/de/)\n" +"Language-Team: German (http://www.transifex.com/projects/p/fcitx/language/" +"de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: src/fcitx-rime.c:54 -msgid "Rime is under maintenance ..." -msgstr "" - -#: src/fcitx-rime.c:56 -msgid "Rime is ready." -msgstr "" +#: src/fcitx-rime.c:147 src/fcitx-rime.c:148 +msgid "Deploy" +msgstr "Deploy" -#: src/fcitx-rime.c:58 -msgid "Rime has encountered an error. See /tmp/rime.fcitx.ERROR for details." +#: src/fcitx-rime.c:517 +msgid "English" msgstr "" -#: src/fcitx-rime.c:64 src/fcitx-rime.c:114 src/fcitx-rime.conf.in:3 +#: src/fcitx-rime.c:69 src/fcitx-rime.c:127 src/fcitx-rime.conf.in:3 #: src/rime.conf.in:3 msgid "Rime" msgstr "Rime" -#: src/fcitx-rime.c:134 src/fcitx-rime.c:135 -msgid "Deploy" -msgstr "Deploy" - -#: src/fcitx-rime.c:143 src/fcitx-rime.c:144 -msgid "Synchronize" -msgstr "Synchronisieren" - #: src/fcitx-rime.conf.in:4 msgid "Rime Wrapper For Fcitx" msgstr "Rime Wrapper für Fcitx" + +#: src/fcitx-rime.c:63 +msgid "Rime has encountered an error. See /tmp/rime.fcitx.ERROR for details." +msgstr "" + +#: src/fcitx-rime.c:61 +msgid "Rime is ready." +msgstr "" + +#: src/fcitx-rime.c:59 +msgid "Rime is under maintenance ..." +msgstr "" + +#: src/fcitx-rime.c:171 +msgid "Schema List" +msgstr "" + +#: src/fcitx-rime.c:156 src/fcitx-rime.c:157 +msgid "Synchronize" +msgstr "Synchronisieren" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcitx-rime-0.3.0/po/fcitx-rime.pot new/fcitx-rime-0.3.1/po/fcitx-rime.pot --- old/fcitx-rime-0.3.0/po/fcitx-rime.pot 2013-11-10 14:11:24.000000000 +0100 +++ new/fcitx-rime-0.3.1/po/fcitx-rime.pot 2014-02-04 13:36:39.000000000 +0100 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2013-07-28 12:02-0400\n" +"POT-Creation-Date: 2013-11-29 06:01-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <[email protected]>\n" @@ -17,31 +17,39 @@ "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -#: src/fcitx-rime.c:54 +#: src/fcitx-rime.c:59 msgid "Rime is under maintenance ..." msgstr "" -#: src/fcitx-rime.c:56 +#: src/fcitx-rime.c:61 msgid "Rime is ready." msgstr "" -#: src/fcitx-rime.c:58 +#: src/fcitx-rime.c:63 msgid "Rime has encountered an error. See /tmp/rime.fcitx.ERROR for details." msgstr "" -#: src/fcitx-rime.c:64 src/fcitx-rime.c:114 src/fcitx-rime.conf.in:3 +#: src/fcitx-rime.c:69 src/fcitx-rime.c:127 src/fcitx-rime.conf.in:3 #: src/rime.conf.in:3 msgid "Rime" msgstr "" -#: src/fcitx-rime.c:134 src/fcitx-rime.c:135 +#: src/fcitx-rime.c:147 src/fcitx-rime.c:148 msgid "Deploy" msgstr "" -#: src/fcitx-rime.c:143 src/fcitx-rime.c:144 +#: src/fcitx-rime.c:156 src/fcitx-rime.c:157 msgid "Synchronize" msgstr "" +#: src/fcitx-rime.c:171 +msgid "Schema List" +msgstr "" + +#: src/fcitx-rime.c:517 +msgid "English" +msgstr "" + #: src/fcitx-rime.conf.in:4 msgid "Rime Wrapper For Fcitx" msgstr "" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcitx-rime-0.3.0/po/ja.po new/fcitx-rime-0.3.1/po/ja.po --- old/fcitx-rime-0.3.0/po/ja.po 2013-11-10 14:11:24.000000000 +0100 +++ new/fcitx-rime-0.3.1/po/ja.po 2014-02-04 13:36:39.000000000 +0100 @@ -1,49 +1,60 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# +# # Translators: -# しろう, 2013 -# しろう, 2013 +# shirou - しろう, 2013 +# shirou - しろう, 2013 msgid "" msgstr "" "Project-Id-Version: fcitx\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2013-07-28 12:02-0400\n" -"PO-Revision-Date: 2013-08-07 15:01+0000\n" -"Last-Translator: しろう\n" -"Language-Team: Japanese (http://www.transifex.com/projects/p/fcitx/language/ja/)\n" +"POT-Creation-Date: 2014-02-04 12:36+0000\n" +"PO-Revision-Date: 2014-01-01 08:57+0000\n" +"Last-Translator: Xuetian Weng <[email protected]>\n" +"Language-Team: Japanese (http://www.transifex.com/projects/p/fcitx/language/" +"ja/)\n" +"Language: ja\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: ja\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: src/fcitx-rime.c:54 -msgid "Rime is under maintenance ..." -msgstr "Rimeはメンテナンス中です..." - -#: src/fcitx-rime.c:56 -msgid "Rime is ready." -msgstr "Rimeの準備ができました。" +#: src/fcitx-rime.c:147 src/fcitx-rime.c:148 +msgid "Deploy" +msgstr "デプロイ" -#: src/fcitx-rime.c:58 -msgid "Rime has encountered an error. See /tmp/rime.fcitx.ERROR for details." -msgstr "Rimeでエラーが起こりました。より詳しくは /tmp/rime.fcitx.ERROR を見てください。" +#: src/fcitx-rime.c:517 +msgid "English" +msgstr "" -#: src/fcitx-rime.c:64 src/fcitx-rime.c:114 src/fcitx-rime.conf.in:3 +#: src/fcitx-rime.c:69 src/fcitx-rime.c:127 src/fcitx-rime.conf.in:3 #: src/rime.conf.in:3 msgid "Rime" msgstr "Rime" -#: src/fcitx-rime.c:134 src/fcitx-rime.c:135 -msgid "Deploy" -msgstr "デプロイ" - -#: src/fcitx-rime.c:143 src/fcitx-rime.c:144 -msgid "Synchronize" -msgstr "同期" - #: src/fcitx-rime.conf.in:4 msgid "Rime Wrapper For Fcitx" msgstr "Fcitx 用 Rime ラッパー" + +#: src/fcitx-rime.c:63 +msgid "Rime has encountered an error. See /tmp/rime.fcitx.ERROR for details." +msgstr "" +"Rimeでエラーが起こりました。より詳しくは /tmp/rime.fcitx.ERROR を見てくださ" +"い。" + +#: src/fcitx-rime.c:61 +msgid "Rime is ready." +msgstr "Rimeの準備ができました。" + +#: src/fcitx-rime.c:59 +msgid "Rime is under maintenance ..." +msgstr "Rimeはメンテナンス中です..." + +#: src/fcitx-rime.c:171 +msgid "Schema List" +msgstr "" + +#: src/fcitx-rime.c:156 src/fcitx-rime.c:157 +msgid "Synchronize" +msgstr "同期" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcitx-rime-0.3.0/po/vi.po new/fcitx-rime-0.3.1/po/vi.po --- old/fcitx-rime-0.3.0/po/vi.po 2013-11-10 14:11:24.000000000 +0100 +++ new/fcitx-rime-0.3.1/po/vi.po 2014-02-04 13:36:39.000000000 +0100 @@ -1,48 +1,57 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# +# # Translators: -# bizover, 2013 +# bizover <[email protected]>, 2013 msgid "" msgstr "" "Project-Id-Version: fcitx\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2013-07-28 12:02-0400\n" -"PO-Revision-Date: 2013-07-30 14:58+0000\n" -"Last-Translator: bizover\n" -"Language-Team: Vietnamese (http://www.transifex.com/projects/p/fcitx/language/vi/)\n" +"POT-Creation-Date: 2014-02-04 12:36+0000\n" +"PO-Revision-Date: 2014-01-01 08:57+0000\n" +"Last-Translator: Xuetian Weng <[email protected]>\n" +"Language-Team: Vietnamese (http://www.transifex.com/projects/p/fcitx/" +"language/vi/)\n" +"Language: vi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: vi\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: src/fcitx-rime.c:54 -msgid "Rime is under maintenance ..." -msgstr "Rime đang bảo trì..." - -#: src/fcitx-rime.c:56 -msgid "Rime is ready." -msgstr "Rime sẵn sàng," +#: src/fcitx-rime.c:147 src/fcitx-rime.c:148 +msgid "Deploy" +msgstr "Triển khai" -#: src/fcitx-rime.c:58 -msgid "Rime has encountered an error. See /tmp/rime.fcitx.ERROR for details." -msgstr "Rime gặp lỗi. Xem ở /tmp/rime.fcitx.ERROR để biết chi tiết." +#: src/fcitx-rime.c:517 +msgid "English" +msgstr "" -#: src/fcitx-rime.c:64 src/fcitx-rime.c:114 src/fcitx-rime.conf.in:3 +#: src/fcitx-rime.c:69 src/fcitx-rime.c:127 src/fcitx-rime.conf.in:3 #: src/rime.conf.in:3 msgid "Rime" msgstr "Rime" -#: src/fcitx-rime.c:134 src/fcitx-rime.c:135 -msgid "Deploy" -msgstr "Triển khai" - -#: src/fcitx-rime.c:143 src/fcitx-rime.c:144 -msgid "Synchronize" -msgstr "Đồng bộ hóa" - #: src/fcitx-rime.conf.in:4 msgid "Rime Wrapper For Fcitx" msgstr "Bộ Wrapper cho Fcitx" + +#: src/fcitx-rime.c:63 +msgid "Rime has encountered an error. See /tmp/rime.fcitx.ERROR for details." +msgstr "Rime gặp lỗi. Xem ở /tmp/rime.fcitx.ERROR để biết chi tiết." + +#: src/fcitx-rime.c:61 +msgid "Rime is ready." +msgstr "Rime sẵn sàng," + +#: src/fcitx-rime.c:59 +msgid "Rime is under maintenance ..." +msgstr "Rime đang bảo trì..." + +#: src/fcitx-rime.c:171 +msgid "Schema List" +msgstr "" + +#: src/fcitx-rime.c:156 src/fcitx-rime.c:157 +msgid "Synchronize" +msgstr "Đồng bộ hóa" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcitx-rime-0.3.0/po/zh_CN.po new/fcitx-rime-0.3.1/po/zh_CN.po --- old/fcitx-rime-0.3.0/po/zh_CN.po 2013-11-10 14:11:24.000000000 +0100 +++ new/fcitx-rime-0.3.1/po/zh_CN.po 2014-02-04 13:36:39.000000000 +0100 @@ -1,49 +1,59 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# +# # Translators: +# Xuetian Weng <[email protected]>, 2014 # Xuetian Weng <[email protected]>, 2012-2013 # wwj402 <[email protected]>, 2013 msgid "" msgstr "" "Project-Id-Version: fcitx\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2013-07-28 12:02-0400\n" -"PO-Revision-Date: 2013-08-07 15:38+0000\n" -"Last-Translator: wwj402 <[email protected]>\n" -"Language-Team: Chinese (China) (http://www.transifex.com/projects/p/fcitx/language/zh_CN/)\n" +"POT-Creation-Date: 2014-02-04 12:36+0000\n" +"PO-Revision-Date: 2014-01-08 21:13+0000\n" +"Last-Translator: Xuetian Weng <[email protected]>\n" +"Language-Team: Chinese (China) (http://www.transifex.com/projects/p/fcitx/" +"language/zh_CN/)\n" +"Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: zh_CN\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: src/fcitx-rime.c:54 -msgid "Rime is under maintenance ..." -msgstr "Rime 正在维护中..." - -#: src/fcitx-rime.c:56 -msgid "Rime is ready." -msgstr "Rime 就绪。" +#: src/fcitx-rime.c:147 src/fcitx-rime.c:148 +msgid "Deploy" +msgstr "重新部署" -#: src/fcitx-rime.c:58 -msgid "Rime has encountered an error. See /tmp/rime.fcitx.ERROR for details." -msgstr "Rime 出现了一个错误。请参阅/tmp/rime.fcitx.ERROR中细节。" +#: src/fcitx-rime.c:517 +msgid "English" +msgstr "英文" -#: src/fcitx-rime.c:64 src/fcitx-rime.c:114 src/fcitx-rime.conf.in:3 +#: src/fcitx-rime.c:69 src/fcitx-rime.c:127 src/fcitx-rime.conf.in:3 #: src/rime.conf.in:3 msgid "Rime" msgstr "中州韻" -#: src/fcitx-rime.c:134 src/fcitx-rime.c:135 -msgid "Deploy" -msgstr "重新部署" - -#: src/fcitx-rime.c:143 src/fcitx-rime.c:144 -msgid "Synchronize" -msgstr "同步" - #: src/fcitx-rime.conf.in:4 msgid "Rime Wrapper For Fcitx" msgstr "Fcitx 的中州韻封装" + +#: src/fcitx-rime.c:63 +msgid "Rime has encountered an error. See /tmp/rime.fcitx.ERROR for details." +msgstr "Rime 出现了一个错误。请参阅/tmp/rime.fcitx.ERROR中细节。" + +#: src/fcitx-rime.c:61 +msgid "Rime is ready." +msgstr "Rime 就绪。" + +#: src/fcitx-rime.c:59 +msgid "Rime is under maintenance ..." +msgstr "Rime 正在维护中..." + +#: src/fcitx-rime.c:171 +msgid "Schema List" +msgstr "方案列表" + +#: src/fcitx-rime.c:156 src/fcitx-rime.c:157 +msgid "Synchronize" +msgstr "同步" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcitx-rime-0.3.0/po/zh_TW.po new/fcitx-rime-0.3.1/po/zh_TW.po --- old/fcitx-rime-0.3.0/po/zh_TW.po 2013-11-10 14:11:24.000000000 +0100 +++ new/fcitx-rime-0.3.1/po/zh_TW.po 2014-02-04 13:36:39.000000000 +0100 @@ -1,47 +1,56 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# +# # Translators: msgid "" msgstr "" "Project-Id-Version: fcitx\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2013-07-28 12:02-0400\n" -"PO-Revision-Date: 2013-07-28 16:09+0000\n" +"POT-Creation-Date: 2014-02-04 12:36+0000\n" +"PO-Revision-Date: 2014-01-01 08:57+0000\n" "Last-Translator: Xuetian Weng <[email protected]>\n" -"Language-Team: Chinese (Taiwan) (http://www.transifex.com/projects/p/fcitx/language/zh_TW/)\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" -"Language: zh_TW\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: src/fcitx-rime.c:54 -msgid "Rime is under maintenance ..." -msgstr "" - -#: src/fcitx-rime.c:56 -msgid "Rime is ready." -msgstr "" +#: src/fcitx-rime.c:147 src/fcitx-rime.c:148 +msgid "Deploy" +msgstr "重新部署" -#: src/fcitx-rime.c:58 -msgid "Rime has encountered an error. See /tmp/rime.fcitx.ERROR for details." +#: src/fcitx-rime.c:517 +msgid "English" msgstr "" -#: src/fcitx-rime.c:64 src/fcitx-rime.c:114 src/fcitx-rime.conf.in:3 +#: src/fcitx-rime.c:69 src/fcitx-rime.c:127 src/fcitx-rime.conf.in:3 #: src/rime.conf.in:3 msgid "Rime" msgstr "中州韻" -#: src/fcitx-rime.c:134 src/fcitx-rime.c:135 -msgid "Deploy" -msgstr "重新部署" - -#: src/fcitx-rime.c:143 src/fcitx-rime.c:144 -msgid "Synchronize" -msgstr "同步" - #: src/fcitx-rime.conf.in:4 msgid "Rime Wrapper For Fcitx" msgstr "Fcitx 的中州韻封裝" + +#: src/fcitx-rime.c:63 +msgid "Rime has encountered an error. See /tmp/rime.fcitx.ERROR for details." +msgstr "" + +#: src/fcitx-rime.c:61 +msgid "Rime is ready." +msgstr "" + +#: src/fcitx-rime.c:59 +msgid "Rime is under maintenance ..." +msgstr "" + +#: src/fcitx-rime.c:171 +msgid "Schema List" +msgstr "" + +#: src/fcitx-rime.c:156 src/fcitx-rime.c:157 +msgid "Synchronize" +msgstr "同步" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcitx-rime-0.3.0/src/fcitx-rime.c new/fcitx-rime-0.3.1/src/fcitx-rime.c --- old/fcitx-rime-0.3.0/src/fcitx-rime.c 2013-11-10 14:11:24.000000000 +0100 +++ new/fcitx-rime-0.3.1/src/fcitx-rime.c 2014-02-04 13:36:39.000000000 +0100 @@ -15,6 +15,7 @@ char* iconname; RimeApi* api; boolean firstRun; + FcitxUIMenu schemamenu; } FcitxRime; static void* FcitxRimeCreate(FcitxInstance* instance); @@ -34,6 +35,8 @@ static void FcitxRimeToggleDeploy(void* arg); static void FcitxRimeResetUI(void* arg); static void FcitxRimeUpdateStatus(FcitxRime* rime); +static boolean FcitxRimeSchemaMenuAction(FcitxUIMenu *menu, int index); +static void FcitxRimeSchemaMenuUpdate(FcitxUIMenu *menu); FCITX_EXPORT_API FcitxIMClass ime = { @@ -163,6 +166,15 @@ hk.func = FcitxRimeResetUI; FcitxInstanceRegisterResetInputHook(instance, hk); + + FcitxMenuInit(&rime->schemamenu); + rime->schemamenu.name = strdup(_("Schema List")); + rime->schemamenu.candStatusBind = strdup("rime-enzh"); + rime->schemamenu.MenuAction = FcitxRimeSchemaMenuAction; + rime->schemamenu.UpdateMenu = FcitxRimeSchemaMenuUpdate; + rime->schemamenu.priv = rime; + rime->schemamenu.isSubMenu = false; + FcitxUIRegisterMenu(rime->owner, &rime->schemamenu); return rime; } @@ -174,6 +186,10 @@ rime->api->destroy_session(rime->session_id); rime->session_id = 0; } + + FcitxUIUnRegisterMenu(rime->owner, &rime->schemamenu); + FcitxMenuFinalize(&rime->schemamenu); + fcitx_utils_free(rime->iconname); rime->api->finalize(); free(rime); @@ -250,6 +266,8 @@ } FcitxUISetStatusString(rime->owner, "rime-enzh", text, text); rime->api->free_status(&status); + } else { + FcitxUISetStatusString(rime->owner, "rime-enzh", "\xe2\x8c\x9b", "\xe2\x8c\x9b"); } } @@ -281,6 +299,7 @@ rime->session_id = rime->api->create_session(); } if (!rime->session_id) { // service disabled + FcitxRimeUpdateStatus(rime); return IRV_TO_PROCESS; } boolean result = rime->api->process_key(rime->session_id, sym, state); @@ -453,6 +472,59 @@ FcitxRimeUpdateStatus(rime); } + +boolean FcitxRimeSchemaMenuAction(FcitxUIMenu* menu, int index) +{ + FcitxRime * rime = menu->priv; + if (rime->api->is_maintenance_mode()) { + return false; + } + if (!rime->api->find_session(rime->session_id)) { + rime->session_id = rime->api->create_session(); + } + + if (index == 0) { + rime->api->set_option(rime->session_id, "ascii_mode", true); + } else { + rime->api->set_option(rime->session_id, "ascii_mode", false); + RimeSchemaList list = {0}; + if (rime->api->get_schema_list(&list)) { + if (list.size > index - 1) { + rime->api->select_schema(rime->session_id,list.list[index-1].schema_id); + FcitxRimeUpdateStatus(rime); + FcitxRimeGetCandWords(rime); + FcitxUIUpdateInputWindow(rime->owner); + } + rime->api->free_schema_list(&list); + } + } + + return true; +} + +void FcitxRimeSchemaMenuUpdate(FcitxUIMenu* menu) +{ + FcitxRime * rime = menu->priv; + if (rime->api->is_maintenance_mode()) { + return; + } + if (!rime->api->find_session(rime->session_id)) { + rime->session_id = rime->api->create_session(); + } + + FcitxMenuClear(menu); + + FcitxMenuAddMenuItem(menu, _("English"), MENUTYPE_SIMPLE, NULL); + RimeSchemaList list = {0}; + if (rime->api->get_schema_list(&list)) { + size_t i = 0; + for (i = 0; i < list.size; ++i) { + FcitxMenuAddMenuItem(menu, list.list[i].name, MENUTYPE_SIMPLE, NULL); + } + rime->api->free_schema_list(&list); + } +} + static const char* FcitxRimeGetIMIcon(void* arg) { FcitxRime* rime = (FcitxRime*) arg; @@ -460,7 +532,7 @@ if (rime->api->get_status(rime->session_id, &status)) { char* text = ""; if (status.is_disabled) { - text = "@rime-disabled"; + text = "@rime-disable"; } else if (status.is_ascii_mode) { text = "@rime-latin"; } else if (status.schema_id) { @@ -474,7 +546,7 @@ return text; } - return ""; + return "@rime-disable"; } static const char* FcitxRimeGetDeployIcon(void *arg) @@ -513,6 +585,8 @@ { FcitxRime* rime = (FcitxRime*) arg; rime->api->sync_user_data(); + FcitxRimeGetCandWords(rime); + FcitxUIUpdateInputWindow(rime->owner); } void FcitxRimeToggleDeploy(void* arg) @@ -526,4 +600,6 @@ FcitxRimeStart(rime, true); FcitxRimeUpdateStatus(rime); + FcitxRimeGetCandWords(rime); + FcitxUIUpdateInputWindow(rime->owner); } -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
