Dominique Leuenberger 2016-03-05 12:05:29 +00:00 committed by Git OBS Bridge
commit 0653c729a4
5 changed files with 143 additions and 1 deletions

11
hide-setup-menu.patch Normal file
View File

@ -0,0 +1,11 @@
diff -Nura ibus-1.5.8_old/setup/ibus-setup.desktop.in ibus-1.5.8_new/setup/ibus-setup.desktop.in
--- ibus-1.5.8_old/setup/ibus-setup.desktop.in 2014-07-24 12:24:25.000000000 +0800
+++ ibus-1.5.8_new/setup/ibus-setup.desktop.in 2015-10-15 19:12:16.476328652 +0800
@@ -4,6 +4,7 @@
Exec=ibus-setup
Icon=ibus-setup
Terminal=false
+NoDisplay=true
Type=Application
StartupNotify=true
Categories=Settings;

12
ibus-adapt-new-vala.patch Normal file
View File

@ -0,0 +1,12 @@
diff -Nura ibus-1.5.11/ui/gtk3/indicator.vala ibus-1.5.11_new/ui/gtk3/indicator.vala
--- ibus-1.5.11/ui/gtk3/indicator.vala 2015-07-16 07:08:03.000000000 +0000
+++ ibus-1.5.11_new/ui/gtk3/indicator.vala 2016-03-02 10:29:19.360124574 +0000
@@ -304,7 +304,7 @@
method_name);
}
- public override GLib.Variant? service_get_property(GLib.DBusConnection
+ public override GLib.Variant service_get_property(GLib.DBusConnection
connection,
string sender,
string object_path,

View File

@ -1,5 +1,38 @@
--------------------------------------------------------------------
Mon Feb 28 17:59:28 CET 2016 - qzhao@suse.com
- Add ibus-adapt-new-vala.patch: Fix ibus compile error under
new vala compiler, for SLE Desktop 12 SP2. This patch is only
for SLED.
--------------------------------------------------------------------
Mon Feb 28 15:57:01 CET 2016 - qzhao@suse.com
- Add conflict to fcitx to fulfill FATE#319095
deprecate fcitx chinese input method in favor of ibus
(dummy bsc#933411). This modification is only for SLED.
-------------------------------------------------------------------
Wed Feb 24 19:01:08 CET 2016 - tiwai@suse.de
Mon Feb 28 14:57:01 CET 2016 - sbrabec@suse.com
- Add support for translation-update-upstream (dummy bsc#933411).
-------------------------------------------------------------------
Mon Feb 28 12:20:10 CET 2016 - qzhao@suse.com
- Add setup-switch-im.patch. Switch to ibus when ibus not
running.(bnc#899259). This patch is only for SLED.
-------------------------------------------------------------------
Mon Feb 28 10:30:20 CET 2016 - qzhao@suse.com
- Add hide-setup-menu.patch
Make ibus-setup launch from indicator field.(bnc#899259)
Remove ibus-setup.desktop from main menu. This patch is only
for SLED.
-------------------------------------------------------------------
Wed Feb 24 11:01:08 CET 2016 - tiwai@suse.de
- Fix the invocation of ibus service for KDE, etc (boo#968486):
for DEs known to support autostart (KDE, XFCE and LXCE), ibus is

View File

@ -69,6 +69,15 @@ Patch7: ibus-python3-migration.patch
Patch8: im-engines-precede-xkb.patch
# PATCH-FIX-UPSTREAM ftake@geeko.jp
Patch9: ibus-fix-check-abs-icon-path-support.patch
# PATCH-FIX-SLE hide-setup-menu.patch bnc#899259 qzhao@suse.com
# ibus-setup should not launch from main menu.
Patch10: hide-setup-menu.patch
# PATCH-FIX-SLE setup-switch-im.patch bnc#899259 qzhao@suse.com
# switch to ibus when ibus not running.
Patch11: setup-switch-im.patch
# PATCH-FEATURE-SLE ibus-adapt-new-vala.patch qzhao@suse.com
# fix ibus compile error under new vala, for SLE Desktop 12 SP2.
Patch12: ibus-adapt-new-vala.patch
BuildRequires: dbus-1-glib-devel
BuildRequires: dbus-1-python-devel >= 0.83.0
BuildRequires: dconf-devel >= 0.7.5
@ -118,6 +127,10 @@ Requires: libibus-1_0-5 = %{version}
# versions to 3.0 only.
Requires: typelib-1_0-Gtk-3_0
Recommends: %{name}-lang
# PATCH-FEATURE-SLE Add conflict with fcitx FATE #319095 qzhao@suse.com -- Solve the problem for the people update from SP0 to SP1
%if !0%{?is_opensuse}
Conflicts: fcitx
%endif
#Fix cursor following problem in KDE4 for libreoffice.
%if 0%{?suse_version} != 1315
@ -247,6 +260,12 @@ sed -i \
%patch8 -p1
%patch9 -p1
%if !0%{?is_opensuse}
%patch10 -p1
%patch11 -p1
%patch12 -p1
%endif
cp -r %{SOURCE2} .
cp -r %{SOURCE3} .

67
setup-switch-im.patch Normal file
View File

@ -0,0 +1,67 @@
diff -Nura ibus-1.5.8/setup/main.py ibus-1.5.8_new/setup/main.py
--- ibus-1.5.8/setup/main.py 2014-07-24 04:24:25.000000000 +0000
+++ ibus-1.5.8_new/setup/main.py 2015-10-27 10:41:56.648379582 +0000
@@ -361,11 +361,16 @@
self.__engine_setup_exec_list[name] = os.spawnl(os.P_NOWAIT, *args)
def __init_bus(self):
+ method_name="ibus"
+ filename=".i18n"
+ usr_home =os.path.expanduser('~')
+
self.__bus = IBus.Bus()
if self.__bus.is_connected():
return
- message = _("The IBus daemon is not running. Do you wish to start it?")
+ message = _("Could not connect to IBus daemon.\n"
+ "Do you wish to switch to IBus on next login?")
dlg = Gtk.MessageDialog(message_type = Gtk.MessageType.QUESTION,
buttons = Gtk.ButtonsType.YES_NO,
text = message)
@@ -375,39 +380,12 @@
if id != Gtk.ResponseType.YES:
sys.exit(0)
- main_loop = GLib.MainLoop()
-
- timeout = 5
- GLib.timeout_add_seconds(timeout, lambda *args: main_loop.quit())
- self.__bus.connect("connected", lambda *args: main_loop.quit())
-
- os.spawnlp(os.P_NOWAIT, "ibus-daemon", "ibus-daemon", "--xim")
-
- main_loop.run()
-
- if self.__bus.is_connected():
- message = _("IBus has been started! "
- "If you cannot use IBus, add the following lines to your $HOME/.bashrc; then relog into your desktop.\n"
- " export GTK_IM_MODULE=ibus\n"
- " export XMODIFIERS=@im=ibus\n"
- " export QT_IM_MODULE=ibus"
- )
- dlg = Gtk.MessageDialog(message_type = Gtk.MessageType.INFO,
- buttons = Gtk.ButtonsType.OK,
- text = message)
- id = dlg.run()
- dlg.destroy()
- self.__flush_gtk_events()
- else:
- # Translators: %d == 5 currently
- message = _("IBus daemon could not be started in %d seconds")
- dlg = Gtk.MessageDialog(message_type = Gtk.MessageType.INFO,
- buttons = Gtk.ButtonsType.OK,
- text = message % timeout)
- id = dlg.run()
- dlg.destroy()
- self.__flush_gtk_events()
- sys.exit(0)
+ filename = os.path.join(usr_home, filename)
+ f=file(filename,"w+")
+ cmd = 'export INPUT_METHOD=\"' + method_name + '\"'
+ f.writelines(cmd)
+ f.close()
+ sys.exit(0)
def __shortcut_button_clicked_cb(self, button, name, section, _name, entry):
buttons = (_("_Cancel"), Gtk.ResponseType.CANCEL,