ibus/setup-switch-im.patch

66 lines
2.7 KiB
Diff
Raw Normal View History

--- ibus-1.5.26/setup/main.py.org 2022-03-14 14:15:48.000000000 +0900
+++ ibus-1.5.26/setup/main.py 2022-08-21 23:04:59.698814168 +0900
Accepting request 838688 from home:hillwood:branches:M17N - Update version to 1.5.23 * Generate simple.xml with denylist 6042974 508527d 37db75b 6879879 59b902a 568d58d 6ed34f3 5959d6f 5d67a28 394d9a8 ed7bc8d e938846 3aa670e 0d90da4 e4dd6d1 * Accept xdigits only for Unicode typing a440942 * Update emoji-parser with CLDR emoji annotation release-31-0-1 9a9f828 * Update ibusunicodegen.h with unicode-ucd 13.0.0 e10fc89 * Delete deprecated ENABLE_APPINDICATOR_ENGINE_ICON check aa3a9f0 * Fix SEGV 02105c4 f591381 * Fix some errors in ibus-desktop-testing-runner 7b0d091 8da0167 * Refactor source files 0b9d936 0ad5e9a * Fix string formats in translatable strings 7caead1 f8c468a ce865f6 * Use WAYLAND_DISPLAY on Wayland sessions to make up IBus socket name (Carlos Garnacho) 8ce2520 * Skip parsing of compose sequence with invalid keysyms (Neil Shepperd) 0da3cec * Tell Pango about the engine language in the candidate panel (Aaron Muir Hamilton) 3f098dc 79a09f1 * Fix for several error spotted by static analyzer (ntfs.hard) 00adea6 * Remove glib_check_version() in gtk immodule (Changwoo Ryu) 5765bfd * Build the Emoji dictionaries in parallel (Changwoo Ryu) 59d0de4 * Update translation - Drop 0001-Replace-the-Qt-check-for-appindicator-engine-icon-wi.patch, 0001-Replace-the-Qt-check-for-appindicator-engine-icon-wi.patch, ibus-socket-name-compatibility.patch. Merged by upstream OBS-URL: https://build.opensuse.org/request/show/838688 OBS-URL: https://build.opensuse.org/package/show/M17N/ibus?expand=0&rev=240
2020-09-30 09:09:17 +02:00
@@ -508,11 +508,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('~')
Accepting request 838688 from home:hillwood:branches:M17N - Update version to 1.5.23 * Generate simple.xml with denylist 6042974 508527d 37db75b 6879879 59b902a 568d58d 6ed34f3 5959d6f 5d67a28 394d9a8 ed7bc8d e938846 3aa670e 0d90da4 e4dd6d1 * Accept xdigits only for Unicode typing a440942 * Update emoji-parser with CLDR emoji annotation release-31-0-1 9a9f828 * Update ibusunicodegen.h with unicode-ucd 13.0.0 e10fc89 * Delete deprecated ENABLE_APPINDICATOR_ENGINE_ICON check aa3a9f0 * Fix SEGV 02105c4 f591381 * Fix some errors in ibus-desktop-testing-runner 7b0d091 8da0167 * Refactor source files 0b9d936 0ad5e9a * Fix string formats in translatable strings 7caead1 f8c468a ce865f6 * Use WAYLAND_DISPLAY on Wayland sessions to make up IBus socket name (Carlos Garnacho) 8ce2520 * Skip parsing of compose sequence with invalid keysyms (Neil Shepperd) 0da3cec * Tell Pango about the engine language in the candidate panel (Aaron Muir Hamilton) 3f098dc 79a09f1 * Fix for several error spotted by static analyzer (ntfs.hard) 00adea6 * Remove glib_check_version() in gtk immodule (Changwoo Ryu) 5765bfd * Build the Emoji dictionaries in parallel (Changwoo Ryu) 59d0de4 * Update translation - Drop 0001-Replace-the-Qt-check-for-appindicator-engine-icon-wi.patch, 0001-Replace-the-Qt-check-for-appindicator-engine-icon-wi.patch, ibus-socket-name-compatibility.patch. Merged by upstream OBS-URL: https://build.opensuse.org/request/show/838688 OBS-URL: https://build.opensuse.org/package/show/M17N/ibus?expand=0&rev=240
2020-09-30 09:09:17 +02:00
+
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)
@@ -522,39 +527,11 @@
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", "--daemonize")
-
- 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
Accepting request 838688 from home:hillwood:branches:M17N - Update version to 1.5.23 * Generate simple.xml with denylist 6042974 508527d 37db75b 6879879 59b902a 568d58d 6ed34f3 5959d6f 5d67a28 394d9a8 ed7bc8d e938846 3aa670e 0d90da4 e4dd6d1 * Accept xdigits only for Unicode typing a440942 * Update emoji-parser with CLDR emoji annotation release-31-0-1 9a9f828 * Update ibusunicodegen.h with unicode-ucd 13.0.0 e10fc89 * Delete deprecated ENABLE_APPINDICATOR_ENGINE_ICON check aa3a9f0 * Fix SEGV 02105c4 f591381 * Fix some errors in ibus-desktop-testing-runner 7b0d091 8da0167 * Refactor source files 0b9d936 0ad5e9a * Fix string formats in translatable strings 7caead1 f8c468a ce865f6 * Use WAYLAND_DISPLAY on Wayland sessions to make up IBus socket name (Carlos Garnacho) 8ce2520 * Skip parsing of compose sequence with invalid keysyms (Neil Shepperd) 0da3cec * Tell Pango about the engine language in the candidate panel (Aaron Muir Hamilton) 3f098dc 79a09f1 * Fix for several error spotted by static analyzer (ntfs.hard) 00adea6 * Remove glib_check_version() in gtk immodule (Changwoo Ryu) 5765bfd * Build the Emoji dictionaries in parallel (Changwoo Ryu) 59d0de4 * Update translation - Drop 0001-Replace-the-Qt-check-for-appindicator-engine-icon-wi.patch, 0001-Replace-the-Qt-check-for-appindicator-engine-icon-wi.patch, ibus-socket-name-compatibility.patch. Merged by upstream OBS-URL: https://build.opensuse.org/request/show/838688 OBS-URL: https://build.opensuse.org/package/show/M17N/ibus?expand=0&rev=240
2020-09-30 09:09:17 +02:00
- 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)
+ with open(filename, "w+") as f:
+ cmd = 'export INPUT_METHOD=\"' + method_name + '\"'
+ f.writelines(cmd)
+ sys.exit(0)
def __shortcut_button_clicked_cb(self, button, name, section, _name, entry):
buttons = (_("_Cancel"), Gtk.ResponseType.CANCEL,