Category Archives: fcitx development

Fcitx 4.2.1

fcitx 4.2.1 Changes related to API: 1. Cleanup Unused macro and API 2. Some new FcitxInputState series API for get the origin key event for frontend. 3. Portable with custom path, hide two path related API that may break portable. … Continue reading

Posted in fcitx development | 6 Comments

为什么Gtk程序总爱给我找麻烦

http://code.google.com/p/fcitx/issues/detail?id=528 这是起因,当然铺垫还有很多,我就懒得说了。 Glib 使用 C 实现 signal 的一个缺陷。具体来讲就是这么回事,在glib里面,很多时候处理signal,为了通用,以及能够使用同一个函数作为signal_connect,于是所有的函数指针都会转化为 (void*)(G_CALLBACK)     g_signal_connect(context->slave,                      “commit”,                      G_CALLBACK(_slave_commit_cb),                      context); 那么问题在于,缺少对 callback 函数的合法性验证,可能会出现各种潜在的问题。在不是有意为之的前提下,程序员仍然会更容易犯错误。 拿pidgin里面的一个问题举例,pidgin的状态输入框,不知道有没有人注意到,在里面用backspace和输入法是很不正常的,会同时删掉输入法这边和pidgin里面两个字符。 为什么?明显是一个按键事件被搞了两次。 我的一个朋友花了一些时间去debug这个问题: Finally I traced it down to the problem. 我本来是看见这么一行: g_signal_connect(G_OBJECT(gtkconv->entry), “key-release-event”, G_CALLBACK(gtk_conv_key_press_cb), NULL); 去掉就没事了。 这个函数如下: static void … Continue reading

Posted in fcitx development | 7 Comments

M17N & Mozc

Compiling Mozc is a really just as hard as Chromimum, so I don’t recommend to try it now, I haven’t finished doing all the build system related work for Mozc. fcitx-m17n is quite a lot simple, just use the regular … Continue reading

Posted in fcitx development | Tagged , , | 2 Comments

Make things that someone will use it

Well, this is only a little post about my personal feeling after join Fcitx. Following is for anyone who have interest in bringing up a open source project. When a project starts, there might not be no user at all, … Continue reading

Posted in fcitx development | Tagged | 2 Comments

Fcitx Portable

邮件列表上有人想要,于是修改了一下,现在可以提供类似解压了就可以直接运行的方式。 适用场合:非管理员,而且编译依赖不能满足。 http://uploads.csslayer.info/uploads/fcitx_portable.tar.bz2 解压后在fcitx_portable目录下执行 fcitx 那个脚本即可。里面砍掉了不少模块,比如dbus相关的一些。压缩包是64位的。稍微折腾了一下让classic-ui也可以用了。里面还留下了 测试时的light-ui ,可以用 ./fcitx -u fcitx-light-ui 来启用。理论上也可以容易的包含cloudpinyin进去,不过我偷懒了。 想要自己制作一个的话,通过 make install DESTDIR=xxx 安装到任意目录,然后参考其中的fcitx那个脚本修改32位对应的内容。然后通过 ldd 查看依赖的库,复制到对应的目录下面。建议的话编译时禁用 pango,或者完全不用Pango用light ui代替。 建议找你能找到的最老的系统来编译,glibc版本越老要求的内核版本越低。 不过只能用xim,可能存在的问题大家懂得。当然那三个老环境变量还是不能少。 Have fun 🙂

Posted in fcitx development | 6 Comments