entry: Show "Paste" option when called ctxpopup with selection
authorRyuan Choi <ryuan.choi@gmail.com>
Sun, 29 Dec 2013 10:34:31 +0000 (19:34 +0900)
committerRyuan Choi <ryuan.choi@gmail.com>
Sun, 29 Dec 2013 12:22:19 +0000 (21:22 +0900)
"Paste" is usefull not only for pasting clipboard but also for replacing
selection to clipboard.

src/lib/elm_entry.c

index 873cfd4c1d52c29c14a33faddb1da3873da92d09..2f07f81e1e93fbf26169828cb9d2c2da95bec0e3 100644 (file)
@@ -1332,9 +1332,15 @@ _menu_call(Evas_Object *obj)
                      (sd->hoversel, E_("Copy"), NULL, ELM_ICON_NONE,
                       _copy_cb, obj);
                   if (sd->editable)
-                    elm_hoversel_item_add
-                       (sd->hoversel, E_("Cut"), NULL, ELM_ICON_NONE,
-                        _cut_cb, obj);
+                    {
+                       elm_hoversel_item_add
+                          (sd->hoversel, E_("Cut"), NULL, ELM_ICON_NONE,
+                           _cut_cb, obj);
+                       if (ownersel)
+                         elm_hoversel_item_add
+                            (sd->hoversel, E_("Paste"), NULL, ELM_ICON_NONE,
+                             _paste_cb, obj);
+                    }
                   elm_hoversel_item_add
                     (sd->hoversel, E_("Cancel"), NULL, ELM_ICON_NONE,
                     _hover_cancel_cb, obj);