Accepting request 182422 from home:ftake:branches:M17N

- Merge branches on M17N:Devel and home:dimstar:branches:GNOME:Factory
  * Merge changelog and spec written by dimstar@opensuse.org
- Update to 1.5.2 by hillwood@linuxfans.org
  * Implement use-system-keyboard-layout
  * Fix crash of ibus-setup
- Update to 1.5.1 by hillwood@linuxfans.org
  * Add fr(bepo) XKB engine
  * Fix crash 
- Update to 1.5.0 by douglarek@outlook.com 
  * Renew IM-switch UI, logic, and shortcut customization
  * Integrate XKB keyboard layouts into IME. Now ibus can manage both
    IME and XKB layouts seamlessly
  * Improve ibus performance by replace some python components with
    vala implementations
  * Improve gobject-introspection support
  * Improve vala language support
  * New functions to restrict config signal: ibus_config_watch/unwatch
  * Remove gnome-icon-theme-legacy dependency. 
  * Add version property in IBusEngineDesc. 
  * Add IBusProperty.symbol for the short label. 
  * Support dconf 0.13.4
  * Add ibus command line tool 
  * Improve unit test
  * ibus-daemon now monitors .xml files by default
  * "make check" does not require "make install" 
  * Support out-of-tree build
  * pygobject override is added to help migrate from the old python binding.
  * Many bug fixings.
- Switch to dconf from GConf
- Add python bindings

OBS-URL: https://build.opensuse.org/request/show/182422
OBS-URL: https://build.opensuse.org/package/show/M17N/ibus?expand=0&rev=65
This commit is contained in:
Dr. Werner Fink 2013-07-07 17:40:03 +00:00 committed by Git OBS Bridge
parent 865d6451a7
commit 9af57aa903
11 changed files with 110 additions and 336 deletions

View File

@ -22,6 +22,6 @@ ibus-gtk3
postun "<prefix>%{_bindir}/gtk-query-immodules-3.0 --update-cache" postun "<prefix>%{_bindir}/gtk-query-immodules-3.0 --update-cache"
postun "%endif" postun "%endif"
supplements "packageand(ibus:gtk3-<targettype>)" supplements "packageand(ibus:gtk3-<targettype>)"
libibus-1_0-0 libibus-1_0-5
obsoletes "libibus2-<targettype> < <version>" obsoletes "libibus2-<targettype> < <version>"

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2418d9960d177c0ce7d3dc5ef8ab75cfc00e30f5e2c730b7d82f4f22666a04d7
size 1489482

3
ibus-1.5.2.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:394f5653e336c6bc02cb055b8eac9f0c9b2a337d582b278e3e825e8cf3f0230d
size 1882764

View File

@ -1,11 +1,6 @@
ibus README for SuSE ibus README for SuSE
How to start using ibus How to start using ibus
Note:
Since GNOME 3.6 does not support IBus 1.4, IBus's indicator icon is not placed on GNOME panel in the top of screen
by default. This package includes a GNOME shell extension named IBus 1.4 indicator to resolve this problem.
Please enable the extension manually from gnome-tweak-tool GUI if you need the indicator on the panel.
English: English:
0:Note: ibus don't support QT3 immodule, 0:Note: ibus don't support QT3 immodule,

View File

@ -1,18 +0,0 @@
diff -ru ibus-1.4.0.org/bus/ibusimpl.c ibus-1.4.0/bus/ibusimpl.c
--- ibus-1.4.0.org/bus/ibusimpl.c 2011-12-01 01:45:56.453139058 +0900
+++ ibus-1.4.0/bus/ibusimpl.c 2011-12-01 01:55:53.941669370 +0900
@@ -530,9 +530,12 @@
GVariant *variant = ibus_config_get_value (ibus->config, "general", "preload_engines");
if (variant != NULL) {
- done = TRUE;
+ if (g_variant_n_children (variant) > 0) {
+ done = TRUE;
+ g_variant_unref (variant);
+ return;
+ }
g_variant_unref (variant);
- return;
}
done = TRUE;

View File

@ -1,34 +0,0 @@
diff -ru ibus-1.4.2/docs/reference/ibus/ibus-docs.sgml.in ibus-1.4.2.mod/docs/reference/ibus/ibus-docs.sgml.in
--- ibus-1.4.2/docs/reference/ibus/ibus-docs.sgml.in 2012-03-07 00:34:36.000000000 +0900
+++ ibus-1.4.2.mod/docs/reference/ibus/ibus-docs.sgml.in 2013-01-10 20:58:01.204986242 +0900
@@ -74,8 +74,10 @@
<xi:include href="xml/ibusenginedesc.xml"/>
<xi:include href="xml/ibusfactory.xml"/>
<xi:include href="xml/ibusinputcontext.xml"/>
+ <xi:include href="xml/ibuskeys.xml"/>
<xi:include href="xml/ibuskeymap.xml"/>
<xi:include href="xml/ibuskeysyms.xml"/>
+ <xi:include href="xml/ibusutil.xml"/>
</chapter>
<chapter>
<title>Configuration</title>
@@ -92,9 +94,6 @@
<title>Communication</title>
<para>Here lists the service communication functions.</para>
<xi:include href="xml/ibusbus.xml"/>
- <xi:include href="xml/ibusconnection.xml"/>
- <xi:include href="xml/ibusmessage.xml"/>
- <xi:include href="xml/ibuspendingcall.xml"/>
<xi:include href="xml/ibusproxy.xml"/>
<xi:include href="xml/ibusserializable.xml"/>
<xi:include href="xml/ibusservice.xml"/>
@@ -104,9 +103,7 @@
<para>Definition and functions for IBus internal use.</para>
<xi:include href="xml/ibusdebug.xml"/>
<xi:include href="xml/ibuserror.xml"/>
- <xi:include href="xml/ibusmainloop.xml"/>
<xi:include href="xml/ibusobject.xml"/>
- <xi:include href="xml/ibusserver.xml"/>
<xi:include href="xml/ibusshare.xml"/>
<xi:include href="xml/ibustypes.xml"/>
</chapter>

View File

@ -1,12 +0,0 @@
diff -ru ibus-1.4.2.org/ui/gtk/panel.py ibus-1.4.2/ui/gtk/panel.py
--- ibus-1.4.2.org/ui/gtk/panel.py 2012-08-22 23:16:51.000000000 +0900
+++ ibus-1.4.2/ui/gtk/panel.py 2013-02-11 16:40:38.328356131 +0900
@@ -112,7 +112,7 @@
self.__status_icon.set_visible(False)
# gtk_status_icon_set_name() is not available in pygtk2 2.17
if hasattr(self.__status_icon, 'set_name'):
- self.__status_icon.set_name('ibus-ui-gtk')
+ self.__status_icon.set_name('ibus-ui-gtk-14')
self.__status_icon.set_title(_("IBus Panel"))
# Hide icon until bus get the name owner.
#self.__status_icon.set_visible(True)

View File

@ -1,3 +1,49 @@
-------------------------------------------------------------------
Thu Jul 4 15:41:12 UTC 2013 - ftake@geeko.jp
- Merge branches on M17N:Devel and home:dimstar:branches:GNOME:Factory
* Merge changelog and spec written by dimstar@opensuse.org
- Update to 1.5.2 by hillwood@linuxfans.org
* Implement use-system-keyboard-layout
* Fix crash of ibus-setup
- Update to 1.5.1 by hillwood@linuxfans.org
* Add fr(bepo) XKB engine
* Fix crash
- Update to 1.5.0 by douglarek@outlook.com
* Renew IM-switch UI, logic, and shortcut customization
* Integrate XKB keyboard layouts into IME. Now ibus can manage both
IME and XKB layouts seamlessly
* Improve ibus performance by replace some python components with
vala implementations
* Improve gobject-introspection support
* Improve vala language support
* New functions to restrict config signal: ibus_config_watch/unwatch
* Remove gnome-icon-theme-legacy dependency.
* Add version property in IBusEngineDesc.
* Add IBusProperty.symbol for the short label.
* Support dconf 0.13.4
* Add ibus command line tool
* Improve unit test
* ibus-daemon now monitors .xml files by default
* "make check" does not require "make install"
* Support out-of-tree build
* pygobject override is added to help migrate from the old python binding.
* Many bug fixings.
- Switch to dconf from GConf
- Add python bindings
- Add vala bindings
- Drop obsoleted patches:
* ibus-fix-default-preload-engines.patch
* ibus-fix-docs-build-error.patch
* ibus-fix-tray-icon-on-gnome-3.6.patch
* ibus_indicator-14.patch
- Obsoletes ibus-gnome-shell
- Separate translation files into ibus-lang
- Rename libibus-1_0-0 subpackage to libibus-1_0-5, following
upstreams soname change.
- Clean up spec file
* remove special cases for 11.4 and 12.1
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Apr 2 17:49:53 UTC 2013 - ftake@geeko.jp Tue Apr 2 17:49:53 UTC 2013 - ftake@geeko.jp

154
ibus.spec
View File

@ -16,12 +16,8 @@
# #
%define build_gtk3 (0%{suse_version} >= 1140)
%define build_without_dbus_autolaunch (0%{suse_version} >= 1210)
%define domain_name %{name}10
Name: ibus Name: ibus
Version: 1.4.2 Version: 1.5.2
Release: 0 Release: 0
Url: http://code.google.com/p/ibus/ Url: http://code.google.com/p/ibus/
Summary: Intelligent Input Bus for Linux OS Summary: Intelligent Input Bus for Linux OS
@ -29,25 +25,17 @@ License: LGPL-2.1+
Group: System/I18n/Chinese Group: System/I18n/Chinese
Source: http://ibus.googlecode.com/files/%{name}-%{version}.tar.gz Source: http://ibus.googlecode.com/files/%{name}-%{version}.tar.gz
Source1: xim.d-ibus
Source2: ibus-README.suse Source2: ibus-README.suse
Source3: xim.ibus.suse.template Source3: xim.ibus.suse.template
Source4: xim.d-ibus-121 Source4: xim.d-ibus-121
Patch0: ibus-python-install-dir.patch Patch0: ibus-python-install-dir.patch
Patch1: ibus-fix-default-preload-engines.patch
# PATCH-FIX-OPENSUSE ibus-fix-docs-build-error.patch
Patch2: ibus-fix-docs-build-error.patch
# PATCH-FIX-OPENSUSE ibus-fix-tray-icon-on-gnome-3.6.patch
Patch3: ibus-fix-tray-icon-on-gnome-3.6.patch
# PATCH-FIX-OPENSUSE ibus_indicator-14.patch
Patch4: ibus_indicator-14.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: /usr/bin/touch PreReq: /usr/bin/touch
Provides: locale(ja;ko;zh) Provides: locale(ja;ko;zh)
BuildRequires: dbus-1-glib-devel BuildRequires: dbus-1-glib-devel
BuildRequires: dbus-1-python-devel >= 0.83.0 BuildRequires: dbus-1-python-devel >= 0.83.0
BuildRequires: dconf-devel >= 0.7.5
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: gconf2-devel >= 2.12
BuildRequires: gettext-devel BuildRequires: gettext-devel
BuildRequires: glib2-devel >= 2.26.0 BuildRequires: glib2-devel >= 2.26.0
BuildRequires: gobject-introspection-devel >= 0.9.6 BuildRequires: gobject-introspection-devel >= 0.9.6
@ -60,16 +48,21 @@ BuildRequires: pkg-config
BuildRequires: python >= 2.5 BuildRequires: python >= 2.5
BuildRequires: python-gobject2-devel BuildRequires: python-gobject2-devel
BuildRequires: update-desktop-files BuildRequires: update-desktop-files
BuildRequires: pkgconfig(vapigen) >= 0.16
Requires: dbus-1-python Requires: dbus-1-python
Requires: gconf2 Requires: dconf
Requires: gobject-introspection Requires: gobject-introspection
Requires: iso-codes Requires: iso-codes
Requires: libibus-1_0-0 = %{version} Requires: libibus-1_0-5 = %{version}
Requires: notification-daemon Requires: notification-daemon
Requires: python-gtk Requires: python-gtk
Requires: python-notify Requires: python-notify
Requires: python-xdg Requires: python-xdg
%gconf_schemas_prereq %if 0%{suse_version} >= 1220
Requires: typelib-1_0-Gtk-2_0
Requires: typelib-1_0-Gtk-3_0
%endif
Obsoletes: ibus-gnome-shell
%define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)") %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")
%define gtk_binary_version %(pkg-config --variable=gtk_binary_version gtk+-2.0) %define gtk_binary_version %(pkg-config --variable=gtk_binary_version gtk+-2.0)
@ -79,11 +72,11 @@ IBus means Intelligent Input Bus. It is a new input framework for Linux OS. It p
full featured and user friendly input method user interface. It also may help full featured and user friendly input method user interface. It also may help
developers to develop input method easily. developers to develop input method easily.
%package -n libibus-1_0-0 %package -n libibus-1_0-5
Summary: IBus libraries Summary: IBus libraries
Group: System/I18n/Chinese Group: System/I18n/Chinese
%description -n libibus-1_0-0 %description -n libibus-1_0-5
This package contains the libraries for IBus This package contains the libraries for IBus
%package -n typelib-1_0-IBus-1_0 %package -n typelib-1_0-IBus-1_0
@ -103,8 +96,6 @@ Supplements: packageand(ibus:gtk2)
%description gtk %description gtk
This package contains ibus im module for gtk2 This package contains ibus im module for gtk2
%if %{build_gtk3}
%package gtk3 %package gtk3
Summary: IBus im module for gtk3 Summary: IBus im module for gtk3
@ -116,18 +107,16 @@ Supplements: packageand(ibus:gtk3)
%description gtk3 %description gtk3
This package contains ibus im module for gtk3 This package contains ibus im module for gtk3
%endif
%package gnome-shell %package -n python-ibus
# This implicitly draws in the GNOME Shell itself and thus is separate Summary: Python module for ibus
Summary: GNOME Shell integration for IBus Group: System/I18n/Chinese
Group: System/GUI/GNOME Requires: %{name} = %{version}
BuildArch: noarch
Supplements: packageand(gnome-shell:ibus) %description -n python-ibus
This package contains python module for ibus
%description gnome-shell
The package contains the files for integrating IBus into the GNOME
Shell.
%package devel %package devel
Summary: Development tools for ibus Summary: Development tools for ibus
@ -136,45 +125,38 @@ Requires: dbus-1-devel
Requires: glib2-devel Requires: glib2-devel
Requires: gtk-doc Requires: gtk-doc
Requires: ibus = %{version} Requires: ibus = %{version}
Requires: libibus-1_0-5 = %{version}
Requires: typelib-1_0-IBus-1_0 = %{version} Requires: typelib-1_0-IBus-1_0 = %{version}
%description devel %description devel
The ibus-devel package contains the header files and developer The ibus-devel package contains the header files and developer
docs for ibus. docs for ibus.
%lang_package
%prep %prep
%setup -q %setup -q
%patch0 -p1 %patch0 -p1
%patch1 -p1
%patch2 -p1
%if 0%{suse_version} >= 1230
%patch3 -p1
%patch4 -p1
%endif
%build %build
autoreconf -fi autoreconf -fi
intltoolize -f intltoolize -f
%configure --disable-static \ %configure --disable-static \
%if %{build_gtk3} --enable-gtk3 \
--enable-gtk3 \ --enable-vala \
%endif --enable-python-library \
--disable-iso-codes-check \ --enable-introspection \
--disable-gobject-introspection \ --disable-gconf \
--enable-gtk-doc \ --enable-dconf \
--libexecdir=%{_prefix}/%{_lib}/ibus --enable-gtk-doc \
make %{?_smp_mflags} --libexecdir=%{_prefix}/%{_lib}/ibus
make %{?jobs:-j %jobs}
%install %install
make install DESTDIR="%buildroot" %makeinstall
# autostart # autostart
mkdir -p $RPM_BUILD_ROOT/etc/X11/xim.d/ mkdir -p $RPM_BUILD_ROOT/etc/X11/xim.d/
%if %{build_without_dbus_autolaunch}
install -m 644 $RPM_SOURCE_DIR/xim.d-ibus-121 $RPM_BUILD_ROOT/etc/X11/xim.d/ibus install -m 644 $RPM_SOURCE_DIR/xim.d-ibus-121 $RPM_BUILD_ROOT/etc/X11/xim.d/ibus
%else
install -m 644 $RPM_SOURCE_DIR/xim.d-ibus $RPM_BUILD_ROOT/etc/X11/xim.d/ibus
%endif
sed -i 1i"SYS_LIB=%{_lib}" $RPM_BUILD_ROOT/etc/X11/xim.d/ibus sed -i 1i"SYS_LIB=%{_lib}" $RPM_BUILD_ROOT/etc/X11/xim.d/ibus
PRIORITY=40 PRIORITY=40
@ -190,16 +172,6 @@ pushd $RPM_BUILD_ROOT/etc/X11/xim.d/
done done
popd popd
# fix python-bytecode-inconsistent-mtime
pushd %{buildroot}%{_datadir}/ibus/ui/gtk
%py_compile i18n.py
mv ./i18n.pyc %{buildroot}%{_datadir}/ibus/setup/i18n.pyc
popd
pushd %{buildroot}%{_datadir}/ibus/ui/gtk
%py_compile -O engineabout.py
mv ./engineabout.pyo %{buildroot}%{_datadir}/ibus/setup/engineabout.pyo
popd
# remove static libs # remove static libs
rm -f $RPM_BUILD_ROOT/%{_libdir}/gtk-2.0/%{gtk_binary_version}/immodules/im-ibus.*a rm -f $RPM_BUILD_ROOT/%{_libdir}/gtk-2.0/%{gtk_binary_version}/immodules/im-ibus.*a
rm -f $RPM_BUILD_ROOT/%{_libdir}/libibus-*.*a rm -f $RPM_BUILD_ROOT/%{_libdir}/libibus-*.*a
@ -212,69 +184,63 @@ ln -sf %{_datadir}/icons/hicolor/48x48/apps/ibus-keyboard.png \
%suse_update_desktop_file %name Utility DesktopUtility %suse_update_desktop_file %name Utility DesktopUtility
%suse_update_desktop_file %name-setup System Utility settings %suse_update_desktop_file %name-setup System Utility settings
%find_lang %{domain_name}
%find_gconf_schemas
cat %{name}.schemas_list %{domain_name}.lang > %{name}.lst
%fdupes %buildroot/%_prefix %fdupes %buildroot/%_prefix
%fdupes -s $RPM_BUILD_ROOT %fdupes -s $RPM_BUILD_ROOT
%if 0%{suse_version} >= 1230 %find_lang ibus10 %{?no_lang_C}
install -m755 -d %{buildroot}%{_datadir}/gnome-shell/extensions/ibus_indicator-14@ftake.github.com
install -m644 ibus_indicator-14@ftake.github.com/* %{buildroot}%{_datadir}/gnome-shell/extensions/ibus_indicator-14@ftake.github.com
%endif
%pre -f %{name}.schemas_pre %post
%glib2_gsettings_schema_post
%posttrans
dconf update
%postun
%glib2_gsettings_schema_postun
dconf update
%post gtk %post gtk
%gtk2_immodule_post %gtk2_immodule_post
%preun -f %{name}.schemas_preun
%posttrans -f %{name}.schemas_posttrans
%postun gtk %postun gtk
%gtk2_immodule_postun %gtk2_immodule_postun
%post -n libibus-1_0-0 -p /sbin/ldconfig %post -n libibus-1_0-5 -p /sbin/ldconfig
%postun -n libibus-1_0-0 -p /sbin/ldconfig %postun -n libibus-1_0-5 -p /sbin/ldconfig
%if %{build_gtk3}
%post gtk3 %post gtk3
%gtk3_immodule_post %gtk3_immodule_post
%postun gtk3 %postun gtk3
%gtk3_immodule_postun %gtk3_immodule_postun
%endif
%files -f %{name}.lst %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc AUTHORS COPYING README %doc AUTHORS COPYING README
%doc $RPM_SOURCE_DIR/xim.ibus.suse.template %doc $RPM_SOURCE_DIR/xim.ibus.suse.template
%doc $RPM_SOURCE_DIR/ibus-README.suse %doc $RPM_SOURCE_DIR/ibus-README.suse
%dir /etc/X11/xim.d %dir /etc/X11/xim.d
%config /etc/X11/xim.d/* %config /etc/X11/xim.d/*
%{python_sitelib}/ibus
%dir %{_datadir}/ibus/ %dir %{_datadir}/ibus/
%{_bindir}/ibus
%{_bindir}/ibus-daemon %{_bindir}/ibus-daemon
%{_bindir}/ibus-setup %{_bindir}/ibus-setup
%{_datadir}/ibus/* %{_datadir}/ibus/*
%{_datadir}/applications/* %{_datadir}/applications/*
%dir %{_datadir}/GConf
%dir %{_datadir}/GConf/gsettings
%{_datadir}/GConf/gsettings/ibus.convert
%{_datadir}/glib-2.0/schemas/org.freedesktop.ibus.gschema.xml
%{_datadir}/icons/hicolor/*/apps/* %{_datadir}/icons/hicolor/*/apps/*
%{_datadir}/pixmaps/* %{_datadir}/pixmaps/*
%{_prefix}/%{_lib}/ibus %{_prefix}/%{_lib}/ibus
%{_datadir}/bash-completion
%config %{_sysconfdir}/dconf/
%if 0%{suse_version} >= 1230 %files lang -f ibus10.lang
%files gnome-shell
%defattr(-,root,root)
%dir %{_datadir}/gnome-shell/
%dir %{_datadir}/gnome-shell/extensions/
%dir %{_datadir}/gnome-shell/extensions/ibus_indicator-14@ftake.github.com/
%{_datadir}/gnome-shell/extensions/ibus_indicator-14@ftake.github.com/*
%endif
%files -n libibus-1_0-0 %files -n libibus-1_0-5
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_libdir}/lib*.so.* %{_libdir}/lib*.so.*
@ -286,12 +252,13 @@ install -m644 ibus_indicator-14@ftake.github.com/* %{buildroot}%{_datadir}/gnome
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_libdir}/gtk-2.0/%{gtk_binary_version}/immodules/im-ibus.so %{_libdir}/gtk-2.0/%{gtk_binary_version}/immodules/im-ibus.so
%if %suse_version >= 1140
%files gtk3 %files gtk3
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_libdir}/gtk-3.0/3.0.0/immodules/* %{_libdir}/gtk-3.0/3.0.0/immodules/*
%endif
%files -n python-ibus
%defattr(-,root,root,-)
%{_libdir}/python2.7/site-packages/ibus
%files devel %files devel
%defattr(-,root,root,-) %defattr(-,root,root,-)
@ -300,7 +267,6 @@ install -m644 ibus_indicator-14@ftake.github.com/* %{buildroot}%{_datadir}/gnome
%{_datadir}/gtk-doc/html/* %{_datadir}/gtk-doc/html/*
%{_libdir}/pkgconfig/* %{_libdir}/pkgconfig/*
%{_datadir}/gir-1.0/IBus-1.0.gir %{_datadir}/gir-1.0/IBus-1.0.gir
%dir %{_datadir}/vala %{_datadir}/vala/vapi/*
%{_datadir}/vala/*
%changelog %changelog

View File

@ -1,116 +0,0 @@
diff -ruN ibus-1.4.2.org/ibus_indicator-14@ftake.github.com/extension.js ibus-1.4.2/ibus_indicator-14@ftake.github.com/extension.js
--- ibus-1.4.2.org/ibus_indicator-14@ftake.github.com/extension.js 1970-01-01 09:00:00.000000000 +0900
+++ ibus-1.4.2/ibus_indicator-14@ftake.github.com/extension.js 2013-02-17 00:46:21.244945766 +0900
@@ -0,0 +1,107 @@
+const Main = imports.ui.main
+const Shell = imports.gi.Shell
+const Panel = imports.ui.panel
+const Lang = imports.lang
+const PanelMenu = imports.ui.panelMenu
+const NotificationDaemon = imports.ui.notificationDaemon;
+
+let addIndicator = null
+
+const AddIndicator = new Lang.Class({
+ Name: 'AddIndicator',
+
+ _init: function() {
+ Main.notificationDaemon._trayManager.connect('tray-icon-added', Lang.bind(this, this._onTrayIconAdded))
+ Main.notificationDaemon._trayManager.connect('tray-icon-removed', Lang.bind(this, this._onTrayIconRemoved))
+ Panel.PANEL_ITEM_IMPLEMENTATIONS['ibus-ui-gtk-14'] = null;
+ },
+
+ _onTrayIconAdded: function(manager, actor) {
+ if (actor.wm_class == 'ibus-ui-gtk-14') {
+ // for patched IBus 1.4
+ this._icon = actor;
+ this._addIBusIndicator();
+ } else if (actor.wm_class == 'ibus-ui-gtk') {
+ try {
+ var IBus = imports.gi.IBus
+ if (!('new_async' in IBus.Bus)) {
+ // This IBus does not support GNOME 3.6
+ this._icon = actor;
+ this._addIBusIndicator();
+ }
+ } catch (e) {
+ IBus = null
+ log(e)
+ }
+ }
+ },
+
+ _addIBusIndicator: function() {
+ if (this._enabled && this._icon) {
+ this._removeFromNotificationDaemon();
+ this._icon.height = Panel.PANEL_ICON_SIZE
+ this._icon.queue_redraw()
+ this._indicator = new PanelMenu.Button()
+ this._indicator.actor.add_actor(this._icon)
+ Main.panel.addToStatusArea('ibus-ui-gtk-14', this._indicator, 0, 'right')
+ NotificationDaemon.STANDARD_TRAY_ICON_IMPLEMENTATIONS['ibus-ui-gtk-14'] = 'keyboard'
+ }
+ },
+
+ _removeIBusIndicator: function() {
+ if (this._indicator) {
+ this._indicator.actor.remove_actor(this._icon);
+// this._icon.unparent();
+ this._indicator.destroy();
+ this._indicator = null;
+ }
+ },
+
+ _onTrayIconRemoved: function(manager, actor) {
+ if (actor.wm_class == 'ibus-ui-gtk-14' || actor.wm_class == 'ibus-ui-gtk') {
+ this._removeIBusIndicator();
+ this._icon = null;
+ }
+ },
+
+ _removeFromNotificationDaemon: function() {
+ if (this._icon) {
+ let source = Main.notificationDaemon._lookupSource(null, this._icon.pid, true);
+ if (source) {
+ this._icon.get_parent().remove_actor(this._icon)
+// this._icon.unparent()
+ source.destroy();
+ }
+ }
+ },
+
+ _enabled: false,
+ enable: function() {
+ this._enabled = true;
+ this._addIBusIndicator();
+ },
+
+ disable: function() {
+ this._enabled = false;
+ this._removeIBusIndicator();
+ NotificationDaemon.STANDARD_TRAY_ICON_IMPLEMENTATIONS['ibus-ui-gtk-14'] = undefined;
+ if (this._icon) {
+ //Main.notificationDaemon._onTrayIconAdded(null, this._icon);
+ Main.notificationDaemon._getSource(
+ this._icon.title || this._icon.wm_class || C_("program", "Unknown"),
+ this._icon.pid, null, null, this._icon);
+ }
+ }
+})
+
+function init() {
+ addIndicator = new AddIndicator();
+}
+
+function enable() {
+ addIndicator.enable();
+}
+
+function disable() {
+ addIndicator.disable();
+}
diff -ruN ibus-1.4.2.org/ibus_indicator-14@ftake.github.com/metadata.json ibus-1.4.2/ibus_indicator-14@ftake.github.com/metadata.json
--- ibus-1.4.2.org/ibus_indicator-14@ftake.github.com/metadata.json 1970-01-01 09:00:00.000000000 +0900
+++ ibus-1.4.2/ibus_indicator-14@ftake.github.com/metadata.json 2013-02-17 00:46:29.038879855 +0900
@@ -0,0 +1 @@
+{"shell-version": ["3.6"], "uuid": "ibus_indicator-14@ftake.github.com", "name": "IBus 1.4 indicator", "description": "An indicator for IBus 1.4"}

View File

@ -1,53 +0,0 @@
OLD_PATH=$PATH
PATH=/usr/bin:/usr/X11R6/bin:/opt/kde3/bin:$PATH
if ! type -p ibus-daemon > /dev/null 2>&1 ; then
echo "ibus is not available."
PATH=$OLD_PATH
return 1
fi
#when skim installed, Autostart must be "false".
#here we move $HOME/.kde/share/config/skimrc to skimrc.orig.ibus
case "$WINDOWMANAGER" in
*kde*)
if type -p skim > /dev/null 2>&1 \
&& ! grep -i -q "^[[:space:]]*Autostart.*=.*false" $HOME/.kde/share/config/skimrc
then
if [ -f $HOME/.kde/share/config/skimrc.orig.ibus ] ; then
mv -f $HOME/.kde/share/config/skimrc $HOME/.kde/share/config/skimrc.orig.ibus
chmod 777 $HOME/.kde/share/config/skimrc.orig.ibus
fi
cat > $HOME/.kde/share/config/skimrc << __END
[General]
Autostart=false
__END
chmod 777 $HOME/.kde/share/config/skimrc
else
# do nothing
:
fi
;;
*)
# do nothing
;;
esac
# Determine the LC_CTYPE locale category setting
#tmplang=${LC_ALL-${LC_CTYPE-${LANG-en_US}}}
export LC_CTYPE=$LANG
export XMODIFIERS="@im=ibus"
export GTK_IM_MODULE=ibus
export QT_IM_SWITCHER=imsw-multi
if [ -e /usr/$SYS_LIB/qt4/plugins/inputmethods/libqtim-ibus.so ]; then
export QT_IM_MODULE=ibus
else
export QT_IM_MODULE=xim
fi
ibus-daemon --xim -d
PATH=$OLD_PATH
# success:
return 0