Hide candidate in NUMBERONLY layout
authorLi Zhang <li2012.zhang@samsung.com>
Fri, 31 May 2013 12:14:24 +0000 (20:14 +0800)
committerLi Zhang <li2012.zhang@samsung.com>
Fri, 31 May 2013 12:14:24 +0000 (20:14 +0800)
Change-Id: I0866022f99c09d9812bf423c2f66b4b8c9755f54

ChangeLog
configure.ac
packaging/ise-engine-tables.spec
src/scim_table_imengine.cpp
src/scim_table_imengine.h

index c536640..b546719 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-05-31 20:10  li2012.zhang@samsung.com
+
+       * Hide candidate in NUMBERONLY layout
+
 2013-01-28 15:21  li2012.zhang@samsung.com
 
        * Disable AUTO_COMMIT and SELECT_KEYS for ZhuYin-Big
index dca0000..2d67633 100755 (executable)
@@ -1,6 +1,6 @@
 # Process this file with autoconf to produce a configure script.
 #AC_INIT(scim-tables, 0.5.10, suzhe@tsinghua.org.cn) #do not forget to edit skim/configure.in.in to change the version
-AC_INIT(ise-engine-tables-zh, 0.0.0228, li2012.zhang@samsung.com)
+AC_INIT(ise-engine-tables-zh, 0.0.0331, li2012.zhang@samsung.com)
 AC_CONFIG_SRCDIR([src/scim_table_imengine.h])
 
 ISF_VERSION=1.0.0
index 4b54600..b4c3d31 100644 (file)
@@ -1,7 +1,7 @@
 %define nam               ise-engine-tables
-%define ver               0.0.0228
+%define ver               0.0.0331
 %define skim              0
-%define rel               3
+%define rel               1
 %define isf_version       1.0.0
 %define build_scim_setup  0
 %define ENABLE_JA         0
index a93cd12..64c50a1 100755 (executable)
@@ -461,7 +461,6 @@ TableInstance::TableInstance (TableFactory *factory,
       m_single_quotation_state (false),
       m_forward (false),
       m_focused (false),
-      m_lookup_table_always_on (false),
       m_inputing_caret (0),
       m_inputing_key (0),
       m_iconv (encoding)
@@ -788,8 +787,8 @@ TableInstance::reset ()
     m_inputing_key = 0;
 
     m_iconv.set_encoding (get_encoding ());
-    if (m_lookup_table_always_on) {
-        refresh_lookup_table (true, false);
+    if (!m_forward) {
+        refresh_lookup_table (true, true);
     } else {
         hide_lookup_table();
     }
@@ -849,16 +848,13 @@ TableInstance::set_layout (unsigned int layout)
         case ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBER:
         case ECORE_IMF_INPUT_PANEL_LAYOUT_EMAIL:
         case ECORE_IMF_INPUT_PANEL_LAYOUT_URL:
-            refresh_lookup_table (true, false);
-            m_lookup_table_always_on = true;
+            refresh_lookup_table(true,false);
+            show_lookup_table ();
+            m_forward = false;
             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:
+        default:
             hide_lookup_table ();
-            m_lookup_table_always_on = false;
-            break;
+            m_forward = true;
     }
 }
 
@@ -1719,7 +1715,6 @@ TableInstance::refresh_lookup_table (bool show, bool refresh)
             }
         }
     }
-
     if (show) {
         if (m_lookup_table.number_of_candidates () &&
             (m_factory->m_table.is_always_show_lookup () ||
@@ -1727,8 +1722,9 @@ TableInstance::refresh_lookup_table (bool show, bool refresh)
              m_inputing_caret < m_inputted_keys [m_inputing_key].length () ||
              m_converted_strings.size () < m_inputted_keys.size () - 1)) {
             update_lookup_table (m_lookup_table);
-        } else {
-            if(m_inputted_keys.size ())
+        } else {        
+            if (m_inputted_keys.size () &&
+                (m_inputing_caret || m_lookup_table.number_of_candidates ()))
             {
                 m_lookup_table.clear ();
                 update_lookup_table (m_lookup_table);
@@ -1736,7 +1732,6 @@ TableInstance::refresh_lookup_table (bool show, bool refresh)
             else
                 update_lookup_table (m_common_lookup_table);
         }
-        show_lookup_table ();
     }
 }
 
index 8d0fbda..0346234 100755 (executable)
@@ -123,8 +123,6 @@ class TableInstance : public IMEngineInstanceBase
     bool m_forward;
     bool m_focused;
 
-    bool m_lookup_table_always_on;
-
     std::vector<String>     m_inputted_keys;
     std::vector<WideString> m_converted_strings;
     std::vector<uint32>     m_converted_indexes;