ibus-anthy/ibus-anthy-HEAD.patch

125 lines
4.3 KiB
Diff
Raw Normal View History

From 137f5d7b0eff9a6e631685a567d06b992146e362 Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Thu, 7 Sep 2023 12:57:47 +0900
Subject: [PATCH] engine: Fix to commit selected candidate with OSK
Updating preedit after clicking a candidate on IBus candidate window
has an idle time so committing the preedit has to wait for the idle time.
BUG=rhbz#2237374
---
engine/python2/engine.py | 9 ++++++++-
engine/python3/engine.py | 9 ++++++++-
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/engine/python2/engine.py b/engine/python2/engine.py
index 80cfa86..42d4dc1 100644
--- a/engine/python2/engine.py
+++ b/engine/python2/engine.py
@@ -154,6 +154,7 @@ class Engine(IBus.EngineSimple):
# IBus lookup window prior to the preedit and selecting a candidate
# causes the commmit instead of the selection.
self.__osk_mode = False
+ self.__selected_preedit_commit = False
if hasattr(IBus, 'InputPurpose'):
self.__has_input_purpose = True
try:
@@ -812,7 +813,10 @@ class Engine(IBus.EngineSimple):
prev_cursor_pos = self.__cursor_pos
self.__on_key_number(keyval)
if self.__osk_mode and prev_cursor_pos == self.__cursor_pos:
- self.__on_key_return()
+ if self.__idle_id != 0:
+ self.__selected_preedit_commit = True
+ else:
+ self.__on_key_return()
def __commit_string(self, text):
self.__reset()
@@ -1328,6 +1332,9 @@ class Engine(IBus.EngineSimple):
else:
self.__update_convert_chars()
self.__idle_id = 0
+ if self.__osk_mode and self.__selected_preedit_commit:
+ self.__on_key_return()
+ self.__selected_preedit_commit = False
def __on_key_return(self):
if self.__preedit_ja_string.is_empty():
diff --git a/engine/python3/engine.py b/engine/python3/engine.py
index 7c0d283..4b50a01 100644
--- a/engine/python3/engine.py
+++ b/engine/python3/engine.py
@@ -155,6 +155,7 @@ class Engine(IBus.EngineSimple):
# IBus lookup window prior to the preedit and selecting a candidate
# causes the commmit instead of the selection.
self.__osk_mode = False
+ self.__selected_preedit_commit = False
if hasattr(IBus, 'InputPurpose'):
self.__has_input_purpose = True
try:
@@ -807,7 +808,10 @@ class Engine(IBus.EngineSimple):
prev_cursor_pos = self.__cursor_pos
self.__on_key_number(keyval)
if self.__osk_mode and prev_cursor_pos == self.__cursor_pos:
- self.__on_key_return()
+ if self.__idle_id != 0:
+ self.__selected_preedit_commit = True
+ else:
+ self.__on_key_return()
def __commit_string(self, text):
self.__reset()
@@ -1323,6 +1327,9 @@ class Engine(IBus.EngineSimple):
else:
self.__update_convert_chars()
self.__idle_id = 0
+ if self.__osk_mode and self.__selected_preedit_commit:
+ self.__on_key_return()
+ self.__selected_preedit_commit = False
def __on_key_return(self):
if self.__preedit_ja_string.is_empty():
--
2.41.0
From 0cb7776994fadb4a4edf3259133bb40e7db31936 Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Tue, 30 Jan 2024 11:47:51 +0900
Subject: [PATCH] data: Update era.t with 2024
---
data/era.t | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/data/era.t b/data/era.t
index 7f7bd1b..8750bc5 100644
--- a/data/era.t
+++ b/data/era.t
@@ -2,7 +2,7 @@
#
# ibus-anthy - The Anthy engine for IBus
#
-# Copyright (c) 2010-2023 Takao Fujiwara <takao.fujiwara1@gmail.com>
+# Copyright (c) 2010-2024 Takao Fujiwara <takao.fujiwara1@gmail.com>
# Copyright (c) 2010-2013 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -342,6 +342,8 @@
れいわ4 #T35*500 2022
れいわ5 #T35*500 令和5
れいわ5 #T35*500 2023
+れいわ6 #T35*500 令和6
+れいわ6 #T35*500 2024
#T35*500 明治1
#T35*500 明治2
#T35*500 明治3
@@ -502,3 +504,4 @@
#T35*500 令和3
#T35*500 令和4
#T35*500 令和5
+ #T35*500 令和6
--
2.43.0