[entry] changed default copy paste select operation
authorMyungjae Lee <mjae.lee@samsung.com>
Thu, 21 Oct 2010 08:03:14 +0000 (17:03 +0900)
committerMyungjae Lee <mjae.lee@samsung.com>
Thu, 21 Oct 2010 08:03:14 +0000 (17:03 +0900)
src/lib/edje_entry.c

index 5978006..652136b 100644 (file)
@@ -1753,16 +1753,12 @@ _get_char_type(const char* str)
 }
 
 static void
-_edje_entry_mouse_double_clicked(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
+_edje_entry_select_word(Edje_Real_Part *rp)
 {
-   Edje_Real_Part *rp = data;
    Entry *en;
    if (!rp) return;
    en = rp->entry_data;
 
-   if (!en) return;
-   en->double_clicked = EINA_TRUE;
-
    const char *ct = NULL;
    int block_type;
    Eina_Strbuf *str;
@@ -1806,8 +1802,7 @@ _edje_entry_mouse_double_clicked(void *data, Evas_Object *obj __UNUSED__, const
    _edje_entry_select_extend(rp);
 
    en->select_allow = EINA_TRUE;
-   //en->select_mod_end = EINA_TRUE;
-   //en->had_sel = EINA_TRUE;
+   en->had_sel = EINA_TRUE;
    en->selecting = EINA_FALSE;
  
    //printf("string : %s \n", eina_strbuf_string_get(str));
@@ -1815,6 +1810,20 @@ _edje_entry_mouse_double_clicked(void *data, Evas_Object *obj __UNUSED__, const
 }
 
 static void
+_edje_entry_mouse_double_clicked(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
+{
+   Edje_Real_Part *rp = data;
+   Entry *en;
+   if (!rp) return;
+   en = rp->entry_data;
+
+   if (!en) return;
+   en->double_clicked = EINA_TRUE;
+
+   _edje_entry_select_word(rp);
+}
+
+static void
 _edje_part_mouse_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
 {
    Edje_Real_Part *rp = data;
@@ -2920,7 +2929,7 @@ _edje_entry_select_allow_set(Edje_Real_Part *rp, Eina_Bool allow)
    
    if ((allow) && (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE))
    {
-               _edje_entry_mouse_double_clicked(rp, NULL, NULL, NULL);
+               _edje_entry_select_word(rp);
    }
 }