elm_entry: Don't do anything if text is empty 87/110587/1 accepted/tizen/common/20170119.171629 accepted/tizen/ivi/20170118.223354 accepted/tizen/mobile/20170118.223315 accepted/tizen/tv/20170118.223328 accepted/tizen/wearable/20170118.223341 submit/tizen/20170118.061840
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 06:38:26 +0000 (22:38 -0800)
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>
(cherry picked from commit 917a717f057f51dad57445cb24550b5b2431d7ec)

src/lib/elm_entry.c

index dc27f3f..d9d9d09 100644 (file)
@@ -4039,10 +4039,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);