entry: Enable context menu with mosue down even if the entry is not editable in some...
authorYoungbok Shin <youngb.shin@samsung.com>
Wed, 14 May 2014 12:26:33 +0000 (13:26 +0100)
committerTom Hacohen <tom@stosb.com>
Wed, 14 May 2014 12:26:48 +0000 (13:26 +0100)
Summary:
Even if a entry is not editable, user can select text in the entry.
When the entry has selection, we have to support "copy" option.
@fix

Test Plan:
Precondition: Apply D852 patch for fixing a bug in elementary_test
1. elementary_test -to entry7
2. Select some text in the non-editable entry.
3. Press mouse right button.

Note: You can test it in Desktop profile.

Reviewers: tasn, woohyun, seoz

Differential Revision: https://phab.enlightenment.org/D848

src/lib/elm_entry.c

index 53c334ed023a21da3ececb52f2f009f59e656b81..dc97a24e2f50062ea39190089b5a119667abb53a 100644 (file)
@@ -1421,7 +1421,8 @@ _menu_call(Evas_Object *obj)
           {
              /* prevent stupid blank hoversel */
              if (sd->have_selection && sd->password) return;
-             if (_elm_config->desktop_entry && ((!sd->editable) || (!ownersel))) return;
+             if (_elm_config->desktop_entry && (!sd->have_selection) && ((!sd->editable) || (!ownersel)))
+               return;
           }
         if (sd->hoversel) evas_object_del(sd->hoversel);
         else elm_widget_scroll_freeze_push(obj);