diff options
author | Nicolás Reynolds <fauno@endefensadelsl.org> | 2014-03-29 03:33:12 +0000 |
---|---|---|
committer | Nicolás Reynolds <fauno@endefensadelsl.org> | 2014-03-29 03:33:12 +0000 |
commit | 59b98e5d487a93e706f9a34568b6dc1bd317e89e (patch) | |
tree | f4e6438f0d880ab85ad1fa777100866e8d5728b1 /community/fcitx | |
parent | def73efccccb818d214cb818e8b4de8385444a43 (diff) |
Sat Mar 29 03:28:40 UTC 2014
Diffstat (limited to 'community/fcitx')
-rw-r--r-- | community/fcitx/PKGBUILD | 24 | ||||
-rw-r--r-- | community/fcitx/add-a-context-variable-to-disable-punc.patch | 59 |
2 files changed, 74 insertions, 9 deletions
diff --git a/community/fcitx/PKGBUILD b/community/fcitx/PKGBUILD index b02e94367..6abc383d9 100644 --- a/community/fcitx/PKGBUILD +++ b/community/fcitx/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 98738 2013-10-17 14:01:45Z andyrtr $ +# $Id: PKGBUILD 108551 2014-03-28 15:39:10Z fyan $ # Maintainer: Felix Yan <felixonmars@gmail.com> # Contributor: Andrea Scarpino <andrea@archlinux.org> # Contributor: csslayer <wengxt AT gmail com> @@ -6,17 +6,22 @@ pkgbase=fcitx pkgname=('fcitx' 'fcitx-gtk2' 'fcitx-gtk3' 'fcitx-qt4') pkgver=4.2.8.3 -pkgrel=2 +pkgrel=3 groups=('fcitx-im') arch=('i686' 'x86_64') url="http://fcitx-im.org" license=('GPL') -makedepends=('cmake' 'doxygen' 'gtk2' 'gtk3' 'qt4' 'icu' 'mesa' \ - 'iso-codes' 'gobject-introspection' 'libxkbfile') -source=(http://download.fcitx-im.org/$pkgbase/$pkgbase-${pkgver}_dict.tar.xz) +makedepends=('cmake' 'doxygen' 'gtk2' 'gtk3' 'qt4' 'icu' 'mesa' 'opencc' \ + 'iso-codes' 'gobject-introspection' 'libxkbfile' 'enchant') +source=(http://download.fcitx-im.org/$pkgbase/$pkgbase-${pkgver}_dict.tar.xz + add-a-context-variable-to-disable-punc.patch) + +prepare() { + cd ${pkgbase}-${pkgver} + patch -p1 -i ../add-a-context-variable-to-disable-punc.patch +} build() { - cd "$srcdir" mkdir -p build cd build @@ -36,7 +41,7 @@ build() { } check() { - cd "${srcdir}/build" + cd build make test } @@ -73,7 +78,7 @@ package_fcitx() { 'gettext: for fcitx-po-parser') install=fcitx.install - cd "${srcdir}/build" + cd build make DESTDIR="${pkgdir}" install rm -r "${pkgdir}/usr/lib/"{gtk-2.0,gtk-3.0,qt4} @@ -119,4 +124,5 @@ package_fcitx-qt4() { make DESTDIR="${pkgdir}" install } -sha512sums=('93c7aa5209f344e1e89addb1dca7a76cde884e4467c0db5f79e758ea8ffb0fe1207ba1c507fb6574fe8223fa873ed5d1dd44835b70cf9254f5149df8e242e92d') +sha512sums=('93c7aa5209f344e1e89addb1dca7a76cde884e4467c0db5f79e758ea8ffb0fe1207ba1c507fb6574fe8223fa873ed5d1dd44835b70cf9254f5149df8e242e92d' + 'ceb4d1b768f2f0c90c5bcde2c00a713883bed28d0e0e1f00a00c685020794d296045690cd55939127d0e204851248fe107e8a277571a8f7dbafde0eed29c340d') diff --git a/community/fcitx/add-a-context-variable-to-disable-punc.patch b/community/fcitx/add-a-context-variable-to-disable-punc.patch new file mode 100644 index 000000000..c0bdd9049 --- /dev/null +++ b/community/fcitx/add-a-context-variable-to-disable-punc.patch @@ -0,0 +1,59 @@ +From: Xuetian Weng <wengxt@gmail.com> +Date: Tue, 11 Mar 2014 00:13:43 +0800 +Subject: add a context variable to disable punc + +--- + src/lib/fcitx/context.h | 2 ++ + src/module/punc/punc.c | 12 ++++++++++++ + 2 files changed, 14 insertions(+) + +diff --git a/src/lib/fcitx/context.h b/src/lib/fcitx/context.h +index 32115af..05f0f91 100644 +--- a/src/lib/fcitx/context.h ++++ b/src/lib/fcitx/context.h +@@ -70,6 +70,8 @@ extern "C" { + #define CONTEXT_DISABLE_AUTO_FIRST_CANDIDATE_HIGHTLIGHT "CONTEXT_DISABLE_AUTO_FIRST_CANDIDATE_HIGHTLIGHT" + /** disable auto first candidate highlight */ + #define CONTEXT_DISABLE_FULLWIDTH "CONTEXT_DISABLE_FULLWIDTH" ++ /** disable punc module */ ++ #define CONTEXT_DISABLE_PUNC "CONTEXT_DISABLE_PUNC" + + /** + * @brief register a new global context variable +diff --git a/src/module/punc/punc.c b/src/module/punc/punc.c +index be6dec3..3327f9c 100644 +--- a/src/module/punc/punc.c ++++ b/src/module/punc/punc.c +@@ -154,6 +154,8 @@ void* PuncCreate(FcitxInstance* instance) + PuncWhichCopy, PuncWhichFree, + puncState); + ++ FcitxInstanceRegisterWatchableContext(instance, CONTEXT_DISABLE_PUNC, FCT_Boolean, FCF_ResetOnInputMethodChange); ++ + FcitxPuncAddFunctions(instance); + return puncState; + } +@@ -250,6 +252,11 @@ boolean PuncPreFilter(void* arg, FcitxKeySym sym, unsigned int state, + { + FCITX_UNUSED(retVal); + FcitxPuncState *puncState = (FcitxPuncState*)arg; ++ boolean disablePunc = FcitxInstanceGetContextBoolean( ++ puncState->owner, CONTEXT_DISABLE_PUNC); ++ if (disablePunc) ++ return false; ++ + if (FcitxHotkeyIsHotKeySimple(sym, state) && + !FcitxHotkeyIsHotKeyDigit(sym, state) && !IsHotKeyPunc(sym, state)) + puncState->bLastIsNumber = false; +@@ -269,6 +276,11 @@ boolean ProcessPunc(void* arg, FcitxKeySym sym, unsigned int state, INPUT_RETURN + if (*retVal != IRV_TO_PROCESS) + return false; + ++ boolean disablePunc = FcitxInstanceGetContextBoolean( ++ puncState->owner, CONTEXT_DISABLE_PUNC); ++ if (disablePunc) ++ return false; ++ + FcitxCandidateWordList *candList = FcitxInputStateGetCandidateList(input); + if (FcitxCandidateWordGetListSize(candList) != 0) { + if (FcitxCandidateWordGetHasGoneToNextPage(candList) && |