[elm_entry]: maxbyte,reached signal not coming issue resolved in entry.
authorshilpa singh <shilpa.singh@samsung.com>
Wed, 8 Sep 2010 18:44:40 +0000 (03:44 +0900)
committershilpa singh <shilpa.singh@samsung.com>
Wed, 8 Sep 2010 18:44:40 +0000 (03:44 +0900)
src/lib/elc_scrolled_entry.c
src/lib/elm_entry.c

index 876d7b1..980d955 100644 (file)
@@ -233,6 +233,12 @@ _entry_unfocused(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNU
    evas_object_smart_callback_call(data, SIG_UNFOCUSED, NULL);
 }
 
+static void
+_entry_maxlength_reached(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+{
+   evas_object_smart_callback_call(data, "maxlength,reached", NULL);
+}
+
 
 /**
  * This adds a scrolled entry to @p parent object.
@@ -289,6 +295,7 @@ elm_scrolled_entry_add(Evas_Object *parent)
    evas_object_smart_callback_add(wd->entry, "longpressed", _entry_longpressed, obj);
    evas_object_smart_callback_add(wd->entry, "focused", _entry_focused, obj);
    evas_object_smart_callback_add(wd->entry, "unfocused", _entry_unfocused, obj);
+   evas_object_smart_callback_add(wd->entry, "maxlength,reached", _entry_maxlength_reached, obj);
 
    _sizing_eval(obj);
 
index 95889bc..bae0f61 100644 (file)
@@ -1738,7 +1738,8 @@ _ellipsis_entry_to_width(Evas_Object *obj)
 static int _textinput_control_function(void *data,void *input_data)
 {
    /*calculate character count*/
-   Widget_Data *wd = elm_widget_data_get(data);
+   Evas_Object *entry = (Evas_Object *)data;
+   Widget_Data *wd = elm_widget_data_get((Evas_Object *)data);
    char buf[10]="\0";
    size_t byte_len;
    size_t insert_text_len=0;
@@ -1757,12 +1758,12 @@ static int _textinput_control_function(void *data,void *input_data)
            insert_text_len = strlen(insert_text);
            if(remain_bytes<insert_text_len)
              {
-               evas_object_smart_callback_call(input_data, "maxlength,reached", NULL);
+               evas_object_smart_callback_call(entry, "maxlength,reached", NULL);
                return EINA_TRUE;
              }
            if(byte_len>=wd->max_no_of_bytes)
              {
-               evas_object_smart_callback_call(input_data, "maxlength,reached", NULL);
+               evas_object_smart_callback_call(entry, "maxlength,reached", NULL);
                return EINA_TRUE;
              }
          }