Update to 1.4.0

- Migration from IBusConfig to GSettings
- Remove patches which are included upstream now
This commit is contained in:
Mike FABIAN 2018-10-23 16:17:44 +02:00
parent 84e3e4768b
commit 6518ef8837
10 changed files with 18 additions and 2218 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@ ibus-m17n-1.3.0.tar.gz
/ibus-m17n-1.3.2.tar.gz /ibus-m17n-1.3.2.tar.gz
/ibus-m17n-1.3.3.tar.gz /ibus-m17n-1.3.3.tar.gz
/ibus-m17n-1.3.4.tar.gz /ibus-m17n-1.3.4.tar.gz
/ibus-m17n-1.4.0.tar.gz

File diff suppressed because it is too large Load Diff

View File

@ -1,97 +0,0 @@
From e995acb046c9e6bd3ee48cb0cf1ccf9d754546e7 Mon Sep 17 00:00:00 2001
From: Daiki Ueno <ueno@unixuser.org>
Date: Thu, 6 Nov 2014 16:05:52 +0900
Subject: [PATCH] engine: Disable key processing on password input
---
src/engine.c | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
Index: ibus-m17n-1.3.4/src/engine.c
===================================================================
--- ibus-m17n-1.3.4.orig/src/engine.c
+++ ibus-m17n-1.3.4/src/engine.c
@@ -24,6 +24,7 @@ struct _IBusM17NEngine {
#endif /* HAVE_SETUP */
IBusPropList *prop_list;
IBusKeymap *us_keymap;
+ gboolean has_focus;
};
struct _IBusM17NEngineClass {
@@ -75,6 +76,10 @@ static void ibus_m17n_engine_property_ac
(IBusEngine *engine,
const gchar *prop_name,
guint prop_state);
+static void ibus_m17n_engine_set_content_type
+ (IBusEngine *engine,
+ IBusInputPurpose purpose,
+ IBusInputHints hints);
static void ibus_m17n_engine_commit_string
(IBusM17NEngine *m17n,
@@ -226,6 +231,8 @@ ibus_m17n_engine_class_init (IBusM17NEng
engine_class->property_activate = ibus_m17n_engine_property_activate;
+ engine_class->set_content_type = ibus_m17n_engine_set_content_type;
+
if (!ibus_m17n_scan_class_name (G_OBJECT_CLASS_NAME (klass),
&lang, &name)) {
g_free (lang);
@@ -667,6 +674,9 @@ ibus_m17n_engine_process_key_event (IBus
(IBusM17NEngineClass *) G_OBJECT_GET_CLASS (m17n);
guint original_keyval = keyval;
+ if (!m17n->has_focus)
+ return FALSE;
+
if (modifiers & IBUS_RELEASE_MASK)
return FALSE;
@@ -704,6 +714,7 @@ ibus_m17n_engine_focus_in (IBusEngine *e
ibus_engine_register_properties (engine, m17n->prop_list);
ibus_m17n_engine_process_key (m17n, Minput_focus_in);
+ m17n->has_focus = TRUE;
parent_class->focus_in (engine);
}
@@ -717,6 +728,7 @@ ibus_m17n_engine_focus_out (IBusEngine *
properly, we just reset the IC instead of passing Mfocus_out to
m17n-lib. */
minput_reset_ic (m17n->context);
+ m17n->has_focus = FALSE;
parent_class->focus_out (engine);
}
@@ -812,6 +824,29 @@ ibus_m17n_engine_property_activate (IBus
}
static void
+ibus_m17n_engine_set_content_type (IBusEngine *engine,
+ IBusInputPurpose purpose,
+ IBusInputHints hints)
+{
+ IBusM17NEngine *m17n = (IBusM17NEngine *) engine;
+
+ /* For password and PIN input, disable key processing by emulating
+ 'focus-out'. */
+ switch (purpose) {
+ case IBUS_INPUT_PURPOSE_PASSWORD:
+ case IBUS_INPUT_PURPOSE_PIN:
+ ibus_m17n_engine_process_key (m17n, Minput_focus_out);
+ m17n->has_focus = FALSE;
+ break;
+
+ default:
+ ibus_m17n_engine_process_key (m17n, Minput_focus_in);
+ m17n->has_focus = TRUE;
+ break;
+ }
+}
+
+static void
ibus_m17n_engine_update_lookup_table (IBusM17NEngine *m17n)
{
ibus_lookup_table_clear (m17n->table);

View File

@ -1,25 +0,0 @@
From b0e03bac1f3b420ac1b7ac76d6008dd4ed942cbf Mon Sep 17 00:00:00 2001
From: Daiki Ueno <ueno@unixuser.org>
Date: Mon, 13 May 2013 15:45:33 +0900
Subject: [PATCH] Fix ibus-m17n-preferences.ui location
---
src/setup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/setup.c b/src/setup.c
index 513fabf..4de8fb1 100644
--- a/src/setup.c
+++ b/src/setup.c
@@ -570,7 +570,7 @@ setup_dialog_new (IBusConfig *config,
error = NULL;
if (gtk_builder_add_from_file (builder,
- PKGDATADIR "setup/ibus-m17n-preferences.ui",
+ PKGDATADIR "/setup/ibus-m17n-preferences.ui",
&error) == 0) {
g_warning ("can't read ibus-m17n-preferences.ui: %s",
error->message);
--
1.8.1.4

View File

@ -1,29 +0,0 @@
From e5c742c56abaadaa5d5a018c0d9004bf2d0a100c Mon Sep 17 00:00:00 2001
From: Mike FABIAN <mfabian@redhat.com>
Date: Mon, 12 Aug 2013 18:51:59 +0200
Subject: [PATCH] engine: fix preedit background colour and underlining
BUG=rhbz#995842
Review URL: https://codereview.appspot.com/12688049
Patch from Mike FABIAN <mfabian@redhat.com>.
---
src/engine.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/engine.c b/src/engine.c
index bcc1a71..ca70464 100644
--- a/src/engine.c
+++ b/src/engine.c
@@ -282,7 +282,7 @@ ibus_m17n_engine_class_init (IBusM17NEngineClass *klass)
"preedit_underline",
G_VARIANT_TYPE_INT32);
if (value != NULL) {
- klass->preedit_background = g_variant_get_int32 (value);
+ klass->preedit_underline = g_variant_get_int32 (value);
g_variant_unref (value);
}
--
1.8.3.1

View File

@ -1,24 +0,0 @@
From 1a497768dfb15c18865154183296087ec07d6a95 Mon Sep 17 00:00:00 2001
From: Daiki Ueno <ueno@unixuser.org>
Date: Tue, 16 Sep 2014 11:28:04 +0900
Subject: [PATCH] setup: Don't use removed "tab_vborder" property
---
src/ibus-m17n-preferences.ui | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/ibus-m17n-preferences.ui b/src/ibus-m17n-preferences.ui
index e85fb15..19d3b47 100644
--- a/src/ibus-m17n-preferences.ui
+++ b/src/ibus-m17n-preferences.ui
@@ -98,7 +98,6 @@
<object class="GtkNotebook" id="pages">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="tab_vborder">3</property>
<child>
<object class="GtkAlignment" id="pageGeneral">
<property name="visible">True</property>
--
1.9.3

View File

@ -1,90 +0,0 @@
From 109acb63611f5fbd994aa56cd0b4a9b1b2eb178e Mon Sep 17 00:00:00 2001
From: Daiki Ueno <ueno@unixuser.org>
Date: Thu, 5 Jun 2014 12:17:36 +0900
Subject: [PATCH] build: Switch from intltool to gettext-0.19
---
configure.ac | 3 +--
po/POTFILES.in | 2 +-
src/Makefile.am | 19 ++++++++++++++-----
src/ibus-setup-m17n.desktop.in.in | 4 ++--
4 files changed, 18 insertions(+), 10 deletions(-)
diff --git a/configure.ac b/configure.ac
index 30d44ff..dab9354 100644
--- a/configure.ac
+++ b/configure.ac
@@ -48,7 +48,6 @@ AM_PROG_CC_C_O
AC_PROG_CXX
AC_ISC_POSIX
AC_HEADER_STDC
-IT_PROG_INTLTOOL([0.35.0])
AM_PROG_LIBTOOL
# check ibus
@@ -104,7 +103,7 @@ AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define to the read-only architecture-independent data directory.])
AM_GNU_GETTEXT([external])
-AM_GNU_GETTEXT_VERSION(0.16.1)
+AM_GNU_GETTEXT_VERSION([0.19])
# OUTPUT files
diff --git a/po/POTFILES.in b/po/POTFILES.in
index bb3bd6e..4f81b75 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,5 +1,5 @@
src/engine.c
src/m17nutil.c
src/main.c
-[type: gettext/glade]src/ibus-m17n-preferences.ui
+src/ibus-m17n-preferences.ui
src/ibus-setup-m17n.desktop.in.in
diff --git a/src/Makefile.am b/src/Makefile.am
index 68ec953..c23e680 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -131,11 +131,20 @@ m17n.xml: m17n.xml.in
desktop_in_in_files = ibus-setup-m17n.desktop.in.in
desktop_in_files = $(desktop_in_in_files:.in.in=.in)
+desktop_files = $(desktop_in_files:.desktop.in=.desktop)
-$(desktop_in_files): %.desktop.in: %.desktop.in.in Makefile
- $(AM_V_GEN) $(edit) $< > $@.tmp && mv $@.tmp $@
+$(desktop_in_files):
+ $(AM_V_GEN) $(MSGFMT) --desktop --template $@.in -o $@-t \
+ -d $(top_srcdir)/po && mv $@-t $@
-desktopdir=$(datadir)/applications
-desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
+$(desktop_files):
+ @rm -f $@
+ $(AM_V_GEN) srcdir=''; \
+ test -f ./$@.in || srcdir=$(srcdir)/; \
+ $(edit) $${srcdir}$@.in >$@-t && mv $@-t $@
-@INTLTOOL_DESKTOP_RULE@
+ibus-setup-m17n.desktop.in: ibus-setup-m17n.desktop.in.in
+ibus-setup-m17n.desktop: ibus-setup-m17n.desktop.in
+
+desktopdir=$(datadir)/applications
+desktop_DATA = $(desktop_files)
diff --git a/src/ibus-setup-m17n.desktop.in.in b/src/ibus-setup-m17n.desktop.in.in
index a380cb3..110fcfb 100644
--- a/src/ibus-setup-m17n.desktop.in.in
+++ b/src/ibus-setup-m17n.desktop.in.in
@@ -1,6 +1,6 @@
[Desktop Entry]
-_Name=IBus M17N Setup
-_Comment=Set up IBus M17N engine
+Name=IBus M17N Setup
+Comment=Set up IBus M17N engine
Exec=@libexecdir@/ibus-setup-m17n
NoDisplay=true
Type=Application
--
1.9.0

View File

@ -9,9 +9,9 @@ Subject: [PATCH 2/4] Hide status from the panel if status == title.
Index: ibus-m17n-1.3.4/src/engine.c Index: ibus-m17n-1.3.4/src/engine.c
=================================================================== ===================================================================
--- ibus-m17n-1.3.4.orig/src/engine.c --- ibus-m17n-1.4.0.orig/src/engine.c 2018-10-23 15:32:43.000000000 +0200
+++ ibus-m17n-1.3.4/src/engine.c +++ ibus-m17n-1.4.0/src/engine.c 2018-10-24 08:35:49.463479480 +0200
@@ -38,6 +38,7 @@ struct _IBusM17NEngineClass { @@ -41,6 +41,7 @@
gint lookup_table_orientation; gint lookup_table_orientation;
gboolean use_us_layout; gboolean use_us_layout;
@ -19,10 +19,10 @@ Index: ibus-m17n-1.3.4/src/engine.c
MInputMethod *im; MInputMethod *im;
}; };
@@ -233,6 +234,10 @@ ibus_m17n_engine_class_init (IBusM17NEng @@ -236,6 +237,10 @@
} "org.freedesktop.ibus.engine.m17n",
engine_name = g_strdup_printf ("m17n:%s:%s", lang, name); g_strdup_printf ("/org/freedesktop/ibus/engine/m17n/%s/%s/",
klass->config_section = g_strdup_printf ("engine/M17N/%s/%s", lang, name); lang, name));
+ MPlist *l = minput_get_title_icon (msymbol (lang), msymbol (name)); + MPlist *l = minput_get_title_icon (msymbol (lang), msymbol (name));
+ if (l && mplist_key (l) == Mtext) { + if (l && mplist_key (l) == Mtext) {
+ klass->title = ibus_m17n_mtext_to_utf8 (mplist_value (l)); + klass->title = ibus_m17n_mtext_to_utf8 (mplist_value (l));
@ -30,7 +30,7 @@ Index: ibus-m17n-1.3.4/src/engine.c
g_free (lang); g_free (lang);
g_free (name); g_free (name);
@@ -924,8 +929,9 @@ ibus_m17n_engine_callback (MInputContext @@ -961,8 +966,9 @@
else if (command == Minput_status_draw) { else if (command == Minput_status_draw) {
gchar *status; gchar *status;
status = ibus_m17n_mtext_to_utf8 (m17n->context->status); status = ibus_m17n_mtext_to_utf8 (m17n->context->status);

View File

@ -1,28 +1,20 @@
%global require_ibus_version 1.4.0 %global require_ibus_version 1.4.0
Name: ibus-m17n Name: ibus-m17n
Version: 1.3.4 Version: 1.4.0
Release: 27%{?dist} Release: 1%{?dist}
Summary: The M17N engine for IBus platform Summary: The M17N engine for IBus platform
License: GPLv2+ License: GPLv2+
URL: https://github.com/ibus/ibus-m17n URL: https://github.com/ibus/ibus-m17n
Source0: https://github.com/ibus/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source0: https://github.com/ibus/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
# Upstreamed patches: # Upstreamed patches:
Patch0: ibus-m17n-HEAD.patch
Patch1: ibus-m17n-fix-data-location.patch
Patch2: ibus-m17n-fix-preedit-color.patch
Patch3: ibus-m17n-fix-preferences-ui.patch
Patch4: ibus-m17n-content-type.patch
# Fedora specific patches: # Fedora specific patches:
# Enable lv3:ralt_switch option for some Indic engines in default.xml. # Enable lv3:ralt_switch option for some Indic engines in default.xml.
Patch100: ibus-m17n-xkb-options.patch Patch100: ibus-m17n-xkb-options.patch
# Don't make the status button clickable (maybe obsolete). # Don't make the status button clickable (maybe obsolete).
Patch101: ibus-m17n-hide-title-status.patch Patch101: ibus-m17n-hide-title-status.patch
# Use gettext-0.19 instead of intltool
Patch102: ibus-m17n-gettext-0.19.patch
# Use ar-kbd as default keymap for Arabic # Use ar-kbd as default keymap for Arabic
# https://bugzilla.redhat.com/show_bug.cgi?id=1076945 # https://bugzilla.redhat.com/show_bug.cgi?id=1076945
Patch103: ibus-m17n-enable-ar-kbd.patch Patch103: ibus-m17n-enable-ar-kbd.patch
@ -48,14 +40,8 @@ the input table maps from m17n-db.
%prep %prep
%setup -q %setup -q
%patch0 -p1 -b .HEAD
%patch1 -p1 -b .fix-data-location
%patch2 -p1 -b .fix-preedit-color
%patch3 -p1 -b .fix-preferences-ui
%patch4 -p1 -b .content-type
%patch100 -p1 -b .xkb-options %patch100 -p1 -b .xkb-options
%patch101 -p1 -b .hide-title-status %patch101 -p1 -b .hide-title-status
%patch102 -p1 -b .gettext-0.19
%patch103 -p1 -b .enable-ar-kbd %patch103 -p1 -b .enable-ar-kbd
NOCONFIGURE=1 ./autogen.sh NOCONFIGURE=1 ./autogen.sh
@ -118,8 +104,14 @@ desktop-file-validate ${RPM_BUILD_ROOT}%{_datadir}/applications/ibus-setup-m17n.
%{_libexecdir}/ibus-setup-m17n %{_libexecdir}/ibus-setup-m17n
%{_datadir}/ibus/component/* %{_datadir}/ibus/component/*
%{_datadir}/applications/ibus-setup-m17n.desktop %{_datadir}/applications/ibus-setup-m17n.desktop
%{_datadir}/glib-2.0/schemas/org.freedesktop.ibus.engine.m17n.gschema.xml
%changelog %changelog
* Tue Oct 23 2018 Mike FABIAN <mfabian@redhat.com> - 1.4.0-1
- Update to 1.4.0
- Migration from IBusConfig to GSettings
- Remove patches which are included upstream now
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.4-27 * Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.4-27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (ibus-m17n-1.3.4.tar.gz) = 9e9bc290b0f0d68558d408f6e69aa3bd9bb767db827a95839b576b58c7a5056dedcbd9b0bf1aab5e26ab21e601acd67a53404a5fd54b436efaf2a706489f25c4 SHA512 (ibus-m17n-1.4.0.tar.gz) = edfd411fe2b5c584bf1ca5b68e5cdc635757e6dd03182202d20b5f112bc272b3f57a94bd087c7b1bd43e124c524af6a8bdb96bd54331e7f8b57c21e10ededc66