From b88efafad097137ef096d1a618c47107138ce9e7 Mon Sep 17 00:00:00 2001 From: Li Zhang Date: Fri, 22 Jul 2016 15:15:11 +0800 Subject: [PATCH] Sunpinyin engine should work on any layout, remove layout checking code. Change-Id: Ieb534dffe042895f802e4eb02b3603b325a21d55 --- configure.ac | 1 - packaging/ise-engine-sunpinyin.spec | 1 - wrapper/scim/src/Makefile.am | 2 +- wrapper/scim/src/sunpinyin_imengine.cpp | 21 ++------------------- 4 files changed, 3 insertions(+), 22 deletions(-) diff --git a/configure.ac b/configure.ac index 286529f..924d855 100755 --- a/configure.ac +++ b/configure.ac @@ -47,7 +47,6 @@ ISF_VERSION=1.0.0 PKG_CHECK_MODULES(ISF,[isf >= $ISF_VERSION]) PKG_CHECK_MODULES(SQLITE, [sqlite3 >= 0.0]) PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.0]) -PKG_CHECK_MODULES(ECORE_IMF, [ecore-imf >= 0.0]) # Check if we should build setup module PKG_CHECK_MODULES(ISF_GTKUTILS,[isf-gtkutils >= $ISF_VERSION], diff --git a/packaging/ise-engine-sunpinyin.spec b/packaging/ise-engine-sunpinyin.spec index ca6c425..a5e2d2e 100755 --- a/packaging/ise-engine-sunpinyin.spec +++ b/packaging/ise-engine-sunpinyin.spec @@ -9,7 +9,6 @@ BuildRequires: prelink BuildRequires: pkgconfig(isf) BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(sqlite3) -BuildRequires: pkgconfig(ecore-imf) Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig diff --git a/wrapper/scim/src/Makefile.am b/wrapper/scim/src/Makefile.am index 012f7d3..46858b5 100755 --- a/wrapper/scim/src/Makefile.am +++ b/wrapper/scim/src/Makefile.am @@ -38,7 +38,7 @@ ise_engine_sunpinyin_la_SOURCES =imi_scimwin.cpp\ sunpinyin_lookup_table.cpp\ sunpinyin_utils.cpp -ise_engine_sunpinyin_la_CXXFLAGS = @ISF_CFLAGS@ @ECORE_IMF_CFLAGS@ ${ise_engine_sunpinyin_DEFINES} +ise_engine_sunpinyin_la_CXXFLAGS = @ISF_CFLAGS@ ${ise_engine_sunpinyin_DEFINES} ise_engine_sunpinyin_la_LDFLAGS = -avoid-version \ -module \ diff --git a/wrapper/scim/src/sunpinyin_imengine.cpp b/wrapper/scim/src/sunpinyin_imengine.cpp index f6278c1..8b9e371 100644 --- a/wrapper/scim/src/sunpinyin_imengine.cpp +++ b/wrapper/scim/src/sunpinyin_imengine.cpp @@ -61,8 +61,6 @@ #include #include -#include - #include #include #include @@ -459,23 +457,8 @@ SunPyInstance::trigger_property (const String &property) void SunPyInstance::set_layout (unsigned int layout) { - switch (layout) - { - case ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL: - case ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBER: - case ECORE_IMF_INPUT_PANEL_LAYOUT_EMAIL: - case ECORE_IMF_INPUT_PANEL_LAYOUT_URL: - show_lookup_table (); - m_lookup_table_always_on = true; - break; - case ECORE_IMF_INPUT_PANEL_LAYOUT_PHONENUMBER: - case ECORE_IMF_INPUT_PANEL_LAYOUT_IP: - case ECORE_IMF_INPUT_PANEL_LAYOUT_MONTH: - case ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBERONLY: - hide_lookup_table (); - m_lookup_table_always_on = false; - break; - } + show_lookup_table (); + m_lookup_table_always_on = true; } void -- 2.7.4