I just finished the E (e_entry actually) IM support. Patch attached.
It's quite easy to integrate it with other widgets if needed. If
someone wants to help please let me know
BR
--
Andre Moreira Magalhaes (andrunko)
--------------------------------------------------------
Jabber: [EMAIL PROTECTED]
MSN: [EMAIL PROTECTED]
Skype: andrunko
Blog: http://andrunko.blogspot.com
diff --git a/src/lib/etk_entry.c b/src/lib/etk_entry.c
index 3c9d69e..29cc814 100644
--- a/src/lib/etk_entry.c
+++ b/src/lib/etk_entry.c
@@ -626,7 +626,10 @@ static Etk_Bool _etk_entry_internal_realized_cb(Etk_Object *object, void *data)
if (entry->im_context &&
etk_widget_is_focused(ETK_WIDGET(entry)))
+ {
+ ecore_im_context_reset(entry->im_context);
ecore_im_context_focus_in(entry->im_context);
+ }
return ETK_TRUE;
}
@@ -787,8 +790,11 @@ static Etk_Bool _etk_entry_key_down_cb(Etk_Object *object, Etk_Event_Key_Down *e
_etk_entry_selection_copy(entry, ETK_SELECTION_PRIMARY, ETK_FALSE);
if (entry->im_context)
+ {
+ ecore_im_context_reset(entry->im_context);
ecore_im_context_cursor_position_set(entry->im_context,
etk_editable_cursor_pos_get(editable));
+ }
return (!stop_signal);
}
@@ -871,8 +877,11 @@ static void _etk_entry_editable_mouse_down_cb(void *data, Evas *evas, Evas_Objec
}
if (entry->im_context)
+ {
+ ecore_im_context_reset(entry->im_context);
ecore_im_context_cursor_position_set(entry->im_context,
etk_editable_cursor_pos_get(entry->editable_object));
+ }
}
/* Called when the entry is released by the mouse */
@@ -920,7 +929,10 @@ static void _etk_entry_editable_mouse_move_cb(void *data, Evas *evas, Evas_Objec
{
etk_editable_cursor_pos_set(entry->editable_object, pos);
if (entry->im_context)
+ {
+ ecore_im_context_reset(entry->im_context);
ecore_im_context_cursor_position_set(entry->im_context, pos);
+ }
}
}
}
@@ -1006,7 +1018,10 @@ static Etk_Bool _etk_entry_focused_cb(Etk_Object *object, void *data)
etk_editable_selection_show(entry->editable_object);
etk_widget_theme_signal_emit(entry->internal_entry, "etk,state,focused", ETK_FALSE);
if (entry->im_context)
+ {
+ ecore_im_context_reset(entry->im_context);
ecore_im_context_focus_in(entry->im_context);
+ }
return ETK_TRUE;
}
@@ -1021,14 +1036,20 @@ static Etk_Bool _etk_entry_unfocused_cb(Etk_Object *object, void *data)
etk_editable_cursor_move_to_end(entry->editable_object);
if (entry->im_context)
+ {
+ ecore_im_context_reset(entry->im_context);
ecore_im_context_cursor_position_set(entry->im_context,
etk_editable_cursor_pos_get(entry->editable_object));
+ }
etk_editable_selection_move_to_end(entry->editable_object);
etk_editable_cursor_hide(entry->editable_object);
etk_editable_selection_hide(entry->editable_object);
etk_widget_theme_signal_emit(entry->internal_entry, "etk,state,unfocused", ETK_FALSE);
if (entry->im_context)
+ {
+ ecore_im_context_reset(entry->im_context);
ecore_im_context_focus_out(entry->im_context);
+ }
return ETK_TRUE;
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel