Entry: Fix to work edje_object_part_text_input_panel_enabled_set/get well even though...
authorjihoon <jihoon>
Fri, 3 Feb 2012 04:50:23 +0000 (04:50 +0000)
committerjihoon <jihoon@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 3 Feb 2012 04:50:23 +0000 (04:50 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@67690 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

ChangeLog
src/lib/edje_entry.c

index 1d11974..6b3eeaa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 2012-01-26  Cedric Bail
 
        * Add min: SOURCE, max: SOURCE.
+
+2012-02-03  Jihoon Kim
+
+       * Entry: Fix to work edje_object_part_text_input_panel_enabled_set/get well
+             even though ecore_imf doesn't exist or immodule isn't used.
index 563497d..420ce5b 100644 (file)
@@ -35,6 +35,7 @@ struct _Entry
    Eina_Bool select_mod_start : 1;
    Eina_Bool select_mod_end : 1;
    Eina_Bool had_sel : 1;
+   Eina_Bool input_panel_enable : 1;
 
 #ifdef HAVE_ECORE_IMF
    Eina_Bool have_preedit : 1;
@@ -2035,6 +2036,8 @@ _edje_entry_real_part_init(Edje_Real_Part *rp)
      {
         evas_object_show(en->cursor_bg);
         evas_object_show(en->cursor_fg);
+        en->input_panel_enable = EINA_TRUE;
+
 #ifdef HAVE_ECORE_IMF
         ecore_imf_init();
 
@@ -2504,11 +2507,10 @@ _edje_entry_input_panel_enabled_set(Edje_Real_Part *rp, Eina_Bool enabled)
    Entry *en = rp->entry_data;
 
    if (!en) return;
+   en->input_panel_enable = enabled;
 #ifdef HAVE_ECORE_IMF
    if (en->imf_context)
      ecore_imf_context_input_panel_enabled_set(en->imf_context, enabled);
-#else
-   (void) enabled;
 #endif
 }
 
@@ -2517,12 +2519,8 @@ _edje_entry_input_panel_enabled_get(Edje_Real_Part *rp)
 {
    Entry *en = rp->entry_data;
    if (!en) return EINA_FALSE;
-#ifdef HAVE_ECORE_IMF
-   if (en->imf_context)
-     return ecore_imf_context_input_panel_enabled_get(en->imf_context);
-#endif
 
-   return EINA_FALSE;
+   return en->input_panel_enable;
 }
 
 static Evas_Textblock_Cursor *