elm_entry: Don't do anything if text is empty 40/110440/2 accepted/tizen/3.0/common/20170119.105804 accepted/tizen/3.0/ivi/20170118.230646 accepted/tizen/3.0/mobile/20170118.230526 accepted/tizen/3.0/tv/20170118.230556 accepted/tizen/3.0/wearable/20170118.230621 submit/tizen_3.0/20170118.055340
authorJiwon Kim <jiwon177.kim@samsung.com>
Mon, 16 Jan 2017 11:09:31 +0000 (20:09 +0900)
committerJiwon Kim <jiwon177.kim@samsung.com>
Tue, 17 Jan 2017 05:30:23 +0000 (14:30 +0900)
In the double clicked callback, selection & copy paste UI is not needed.

test plan:
elm_entry_context_menu_disabled_set(entry, EINA_TRUE)
-> double click empty entry
-> cursor is disappeared (This commit fix to be shown)

@tizen_only

Change-Id: Ide70085a3deebc403259b5e3b967a32e23beef91
Signed-off-by: Jiwon Kim <jiwon177.kim@samsung.com>
src/lib/elm_entry.c

index 85e1817e2c0c2a3ef029403c7efa95443da824dd..2de14ada759aa8977ac3770f37df29f861dc4d87 100644 (file)
@@ -4064,10 +4064,14 @@ _entry_mouse_double_signal_cb(void *data,
                               const char *source EINA_UNUSED)
 {
    // TIZEN ONLY (20140205): Support CopyPaste UI
+   const char *text;
    ELM_ENTRY_DATA_GET(data, sd);
    if (sd->disabled) return; //???
 
-   if (!_elm_config->desktop_entry)
+   text = edje_object_part_text_get(sd->entry_edje, "elm.text");
+
+   if ((!_elm_config->desktop_entry) &&
+       (text) && (text[0] != '\0'))
      {
         _cursor_down_pos_set(data);
         _select_word(data, NULL, NULL);