diff --git a/fcitx-4.2.4.1.tar.bz2 b/fcitx-4.2.4.1.tar.bz2 deleted file mode 100644 index 97300b7..0000000 --- a/fcitx-4.2.4.1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:27d21fc2a37255219b0ff643be72614f3a3314b46c9d7a263e965b096efded52 -size 904487 diff --git a/fcitx-README.suse b/fcitx-README.suse index eac011c..938c954 100644 --- a/fcitx-README.suse +++ b/fcitx-README.suse @@ -9,7 +9,7 @@ The number "30" makes fcitx have priority over other input-method (e.g 50-scim o If you prefer not using fcitx, mv 30-fcitx to 80-fcitx (for example). Or see 2. 2.If for some reason can't start fcitx when login Xwindow -There is another input-method who has higher priority then fcitx (e.g 10-oxim) +There is another input-method who has higher priority than fcitx (e.g 10-oxim) You can edit ~/.xim, see ~/.xim.template for more informations. Or edit ~/.profile, add export INPUT_METHOD="fcitx" @@ -18,32 +18,32 @@ copy this file to ~/.xim, then you can use fcitx next login X. 3.You want to use your own input-method other than system setting (1)System setting: -Edit /etc/sysconfig/language , set INPUT_METHOD="scim-bridge", or whatever you want,Make sure your start-up script is put in /etc/X11/xim.d/ with same name ypu mention. +Edit /etc/sysconfig/language , set INPUT_METHOD="fcitx", or whatever you want,Make sure your start-up script is put in /etc/X11/xim.d/ with same name ypu mention. (2)For specific language setting: Link a start-up script in /etc/X11/xim.d/ to your locale with a higher priority (smaller number), eg -ln -s /etc/X11/xim.d/scim-bridge /etc/X11/xim.d/zh_CN/20-scim-bridge +ln -s /etc/X11/xim.d/fcitx /etc/X11/xim.d/zh_CN/20-fcitx (3)Personal setting: Edit ~/.profile add -export INPUT_METHOD="scim-bridge" or whatever script in /etc/X11/xim.d/ +export INPUT_METHOD="fcitx" or whatever script in /etc/X11/xim.d/ or white your own ~/.xim, see ~/.xim.template for more informations. 4.Bug report or any suggestion to -http://code.google.com/p/fcitx/ +https://github.com/fcitx/ Chinese: -1.当您使用的语系是en 或zh_CN时,SuSE 会自动启动fcitx -启动的script是/etc/X11/xim.d/YOUR-LOCALE/30-fcitx,这是一个到上层目录fcitx的连结 -"30"这个数字使他的优先顺序高于90-xcin及50-scim +1.当您使用的语系是 en 或 zh_CN 时,SuSE 会自动启动 fcitx +启动的脚本是 /etc/X11/xim.d/YOUR-LOCALE/30-fcitx,这是一个到上层目录 fcitx 的连结 +"30"这个数字使他的优先顺序高于 90-xcin 及 50-scim 如果您不喜欢这个顺序,修改连结的名称为(例如:80-fcitx),或参考2. -2.重新登入X后,如果不能用fcitx...可能是: -有别的输入法的优先顺序高于fcitx(例如:10-oxim) -您可以编辑~/.xim,请参考~/.xim.template -安装fcitx后,会有一个范本:/usr/share/doc/packages/fcitx/xim.fcitx.suse.template -将这个档案复制到您的~/.xim,当您下次登入X时就可以使用fcitx了 -或编辑~/.profile,加入 +2.重新登入 X 后,如果不能用 fcitx...可能是: +有别的输入法的优先顺序高于 fcitx (例如:10-oxim) +您可以编辑 ~/.xim,请参考 ~/.xim.template +安装 fcitx 后,会有一个范本:/usr/share/doc/packages/fcitx/xim.fcitx.suse.template +将这个档案复制到您的 ~/.xim,当您下次登入X时就可以使用 fcitx 了 +或编辑 ~/.profile,加入 export INPUT_METHOD="fcitx" 3.如果您想要自己选择输入法而非使用系统设定 @@ -52,11 +52,11 @@ export INPUT_METHOD="fcitx" 请注意你的启动程序必须位于 /etc/X11/xim.d/,并和您指定的名称相同 (2)针对特定语言: 将您的启动程序连结到你的语系中,并前置较高的优先顺序(较小数字),例如 -ln -s /etc/X11/xim.d/fcitx /etc/X11/xim.d/zh_CN/20-scim-bridge +ln -s /etc/X11/xim.d/fcitx /etc/X11/xim.d/zh_CN/30-fcitx (3)个人设定: 编辑 ~/.profile 加入 export INPUT_METHOD="fcitx" 或其他在 /etc/X11/xim.d/ 的启动程序 或自行编写启动程序 ~/.xim,请参考 ~/.xim.template 5.臭虫回报或建议请至 -http://code.google.com/p/fcitx/ +https://github.com/fcitx/ diff --git a/fcitx.changes b/fcitx.changes index c664926..fb4a19f 100644 --- a/fcitx.changes +++ b/fcitx.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Sun Aug 26 01:15:41 UTC 2012 - i@marguerite.su + +- add openSUSE-branding theme for 12.2 + +------------------------------------------------------------------- +Thu Aug 16 22:34:07 UTC 2012 - i@marguerite.su + +- add Dependency: libpresage-devel, which will provide word prediction + for keyboard users. + ------------------------------------------------------------------- Sun Jul 22 00:13:01 UTC 2012 - i@marguerite.su diff --git a/fcitx.spec b/fcitx.spec index 9eac68b..a0369fe 100644 --- a/fcitx.spec +++ b/fcitx.spec @@ -35,6 +35,7 @@ Source5: pinyin.tar.gz Source6: table.tar.gz # for fedora auto-start Source7: xinput-fcitx +Source8: openSUSE-default.tar.gz #FIX-FOR-UPSTREAM i@marguerite.su - dont download online Patch1: fix_fcitx_googlecode_resolv_error.patch BuildRequires: cairo-devel @@ -50,6 +51,7 @@ BuildRequires: desktop-file-utils BuildRequires: libxkbfile-devel %endif BuildRequires: enchant-devel +BuildRequires: libpresage-devel BuildRequires: iso-codes-devel BuildRequires: pango-devel %if 0%{?suse_version} >= 1110 || 0%{?fedora_version} @@ -85,6 +87,7 @@ Requires: %{name}-qt4 = %{version}-%{release} %if 0%{?suse_version} Recommends: %{name}-pinyin = %{version}-%{release} Recommends: %{name}-table = %{version}-%{release} +Requires: %{name}-branding = %{version} %endif %if 0%{?fedora_version} Requires(post): %{_sbindir}/alternatives @@ -305,6 +308,26 @@ Requires: lib%{name}%{libver} = %{version}-%{release} %description pinyin-tools Tools to convert txt or scel(sougou pinyin data format) pinyin sheets to fcitx match lists. +%if 0%{?suse_version} + +%package branding-openSUSE +Summary: openSUSE default Skin for Fcitx +Group: System/I18n/Chinese +Requires: %{name} = %{version}-%{release} +%if 0%{?suse_version} >= 1140 +BuildArch: noarch +%endif +Provides: %{name}-branding = %{version} +Conflicts: otherproviders(%{name}-branding) +Supplements: packageand(%{name}:branding-openSUSE) + +%description branding-openSUSE +openSUSE default skin for Fcitx + +You can either use this package or download from kde-look.org using knewstaff in fcitx-config-kde4. + +%endif + %package skin-classic Summary: Fcitx Classic Skin Group: System/I18n/Chinese @@ -372,6 +395,16 @@ make DESTDIR=%{buildroot} install cd .. +%if 0%{?suse_version} +# install openSUSE branding +pushd %{buildroot}%{_datadir}/%{name}/skin/ +tar -xzf %{SOURCE8} +popd +pushd %{buildroot}%{_datadir}/%{name}/configdesc +sed -i 's/DefaultValue=default/DefaultValue=openSUSE-default/' %{buildroot}%{_datadir}/%{name}/configdesc/fcitx-classic-ui.desc +popd +%endif + # fix desktop file sed -i "s/x-fskin/x-fskin;/" %{buildroot}%{_datadir}/applications/fcitx-skin-installer.desktop @@ -394,14 +427,18 @@ desktop-file-install --add-category="System" --delete-original --dir=%{buildroot %if 0%{?suse_version} mkdir %{buildroot}%{_docdir} mv %{buildroot}%{_datadir}/doc/%{name}/ %{buildroot}%{_docdir} +cp -r %{SOURCE2} %{buildroot}%{_docdir}/%{name}/ +cp -r %{SOURCE3} %{buildroot}%{_docdir}/%{name}/ cp -r AUTHORS %{buildroot}%{_docdir}/%{name}/ cp -r ChangeLog %{buildroot}%{_docdir}/%{name}/ %endif %if 0%{?fedora_version} mkdir %{buildroot}%{_docdir}/packages/ mv %{buildroot}%{_datadir}/doc/%{name}/ %{buildroot}%{_docdir}/packages/ -cp -r AUTHORS %{buildroot}%{_docdir}/packages/%{name}/ -cp -r ChangeLog %{buildroot}%{_docdir}/packages/%{name}/ +cp -r %{SOURCE2} %{buildroot}%{_docdir}/packages/%{name}/ +cp -r %{SOURCE3} %{buildroot}%{_docdir}/packages/%{name}/ +cp -r AUTHORS %{buildroot}%{_docdir}/%{name}/ +cp -r ChangeLog %{buildroot}%{_docdir}/%{name}/ %endif # create autostart @@ -554,6 +591,9 @@ update-desktop-database %{_datadir}/applications &>/dev/null || %exclude %{_libdir}/%{name}/fcitx-pinyin.so %exclude %{_libdir}/%{name}/fcitx-table.so %exclude %{_libdir}/%{name}/fcitx-qw.so +%if 0%{?suse_version} +%exclude %{_datadir}/%{name}/skin/openSUSE-default +%endif %exclude %{_datadir}/%{name}/skin/classic %exclude %{_datadir}/%{name}/skin/dark @@ -667,6 +707,14 @@ update-desktop-database %{_datadir}/applications &>/dev/null || %{_mandir}/man1/mb2org.1.gz %{_mandir}/man1/scel2org.1.gz +%if 0%{?suse_version} + +%files branding-openSUSE +%defattr(-,root,root) +%{_datadir}/%{name}/skin/openSUSE-default + +%endif + %files skin-classic %defattr(-,root,root) %{_datadir}/%{name}/skin/classic diff --git a/fix-fcitx-4.2.4.1-memory-overflow.patch b/fix-fcitx-4.2.4.1-memory-overflow.patch deleted file mode 100644 index 7f2a092..0000000 --- a/fix-fcitx-4.2.4.1-memory-overflow.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -urN fcitx-4.2.4.1.orig/src/module/xkb/xkb.c fcitx-4.2.4.1/src/module/xkb/xkb.c ---- fcitx-4.2.4.1.orig/src/module/xkb/xkb.c 2012-06-16 22:27:00.087029656 +0800 -+++ fcitx-4.2.4.1/src/module/xkb/xkb.c 2012-06-16 22:29:18.941293740 +0800 -@@ -197,8 +197,7 @@ - xkbParentDir = strdup("/usr/share/X11"); - } - -- rulesFile = fcitx_utils_malloc0(sizeof(char) * (1 + strlen(xkbParentDir) + strlen(rulesName) + strlen("/xkb/rules/"))); -- sprintf(rulesFile, "%s/xkb/rules/%s.xml", xkbParentDir, rulesName); -+ asprintf(&rulesFile, "%s/xkb/rules/%s.xml", xkbParentDir, rulesName); - fcitx_utils_free(xkbParentDir); - } - -diff -urN fcitx-4.2.4.1.orig/src/ui/classic/skin.c fcitx-4.2.4.1/src/ui/classic/skin.c ---- fcitx-4.2.4.1.orig/src/ui/classic/skin.c 2012-06-16 22:27:00.090029620 +0800 -+++ fcitx-4.2.4.1/src/ui/classic/skin.c 2012-06-16 22:30:39.775283176 +0800 -@@ -216,7 +216,7 @@ - const char* fallbackChainNoFallback[] = { buf }; - const char* fallbackChainPanel[] = { buf, "skin/default" }; - const char* fallbackChainTray[] = { "imicon" }; -- const char* fallbackChainPanelIMIcon[] = { buf, "imicon" }; -+ const char* fallbackChainPanelIMIcon[] = { buf, "imicon", "skin/default" }; - - HASH_FIND_STR(*imageTable, name, image); - if (image != NULL) { diff --git a/openSUSE-default.tar.gz b/openSUSE-default.tar.gz new file mode 100644 index 0000000..ba09ce7 --- /dev/null +++ b/openSUSE-default.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:214eece3d83697699542b4f9c8324b3193019c9f2e8eb27223065fe586766551 +size 1838938 diff --git a/xim.fcitx.suse.template b/xim.fcitx.suse.template index 265320d..11a3d70 100644 --- a/xim.fcitx.suse.template +++ b/xim.fcitx.suse.template @@ -6,17 +6,18 @@ #if any program can't input Chinese, try export LC_CTYPE=zh_CN.UTF-8, e.g #export LC_CTYPE=zh_CN.UTF-8 -export XMODIFIERS="@im=fcitx" -export GTK_IM_MODULE=xim -export QT_IM_SWITCHER=imsw-multi -export QT_IM_MODULE=xim -fcitx -d -## Note for FCITX version >= 4.1 +## For FCITX 3 series and 4.0 Only +#export XMODIFIERS="@im=fcitx" +#export GTK_IM_MODULE=xim +#export QT_IM_SWITCHER=imsw-multi +#export QT_IM_MODULE=xim +#fcitx -d + +## For FCITX version >= 4.1 #Since FCITX 4.1, you can use fcitx itself (besides xim) as the immodule,so the following code might work better (fcitx-gtk2/3, fcitx-qt must be installed), especially when you are using gnome3. -#export XMODIFIERS="@im=fcitx" -#export GTK_IM_MODULE=fcitx -#export QT_IM_MODULE=fcitx -#fcitx -d -# +export XMODIFIERS="@im=fcitx" +export GTK_IM_MODULE=fcitx +export QT_IM_MODULE=fcitx +fcitx -d \ No newline at end of file