summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@samsung.com>2015-06-23 15:57:02 +0300
committerDaniel Zaoui <daniel.zaoui@samsung.com>2015-06-23 15:57:02 +0300
commit42beb36d041a4b1d3a91f8eff76d5908e2f92d58 (patch)
tree4a242f0e098963678292e436d77de6d075d24a43
parentd4f27b9126675a969833793cd6b28c5c007da797 (diff)
DnD: remove from elm_cnp code specific to elm_entry
The tag insertion has to be done only from elm_entry callback. elm_cnp is not supposed to know what will be done with the data.
-rw-r--r--src/lib/elm_cnp.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c
index 3a3bb531d..f03a0dea1 100644
--- a/src/lib/elm_cnp.c
+++ b/src/lib/elm_cnp.c
@@ -1621,9 +1621,6 @@ found:
1621 savedtypes.imgfile); 1621 savedtypes.imgfile);
1622 if (savedtypes.imgfile) 1622 if (savedtypes.imgfile)
1623 { 1623 {
1624 char *entrytag;
1625 static const char *tagstring =
1626 "<item absize=240x180 href=file://%s></item>";
1627 ddata.x = savedtypes.x; 1624 ddata.x = savedtypes.x;
1628 ddata.y = savedtypes.y; 1625 ddata.y = savedtypes.y;
1629 ddata.action = act; 1626 ddata.action = act;
@@ -1631,25 +1628,12 @@ found:
1631 EINA_INLIST_FOREACH_SAFE(dropable->cbs_list, itr, cbs) 1628 EINA_INLIST_FOREACH_SAFE(dropable->cbs_list, itr, cbs)
1632 { 1629 {
1633 /* If it's markup that also supports images */ 1630 /* If it's markup that also supports images */
1634 if ((cbs->types & ELM_SEL_FORMAT_MARKUP) && 1631 if (cbs->types & ELM_SEL_FORMAT_IMAGE)
1635 (cbs->types & ELM_SEL_FORMAT_IMAGE))
1636 {
1637 int len;
1638 ddata.format = ELM_SEL_FORMAT_MARKUP;
1639
1640 len = strlen(tagstring) + strlen(savedtypes.imgfile);
1641 entrytag = alloca(len + 1);
1642 snprintf(entrytag, len + 1, tagstring, savedtypes.imgfile);
1643 ddata.data = entrytag;
1644 cnp_debug("Insert %s\n", (char *)ddata.data);
1645 if ((cbs->types & dropable->last.format) && cbs->dropcb)
1646 cbs->dropcb(cbs->dropdata, dropable->obj, &ddata);
1647 }
1648 else if (cbs->types & ELM_SEL_FORMAT_IMAGE)
1649 { 1632 {
1650 cnp_debug("Doing image insert (%s)\n", savedtypes.imgfile); 1633 cnp_debug("Doing image insert (%s)\n", savedtypes.imgfile);
1651 ddata.format = ELM_SEL_FORMAT_IMAGE; 1634 ddata.format = ELM_SEL_FORMAT_IMAGE;
1652 ddata.data = (char *)savedtypes.imgfile; 1635 ddata.data = (char *)savedtypes.imgfile;
1636 ddata.len = strlen(ddata.data);
1653 if ((cbs->types & dropable->last.format) && cbs->dropcb) 1637 if ((cbs->types & dropable->last.format) && cbs->dropcb)
1654 cbs->dropcb(cbs->dropdata, dropable->obj, &ddata); 1638 cbs->dropcb(cbs->dropdata, dropable->obj, &ddata);
1655 } 1639 }