projects
/
framework
/
uifw
/
elementary.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bugfix: entry show blue face image when paste image path
[framework/uifw/elementary.git]
/
src
/
lib
/
elm_cnp_helper.c
diff --git
a/src/lib/elm_cnp_helper.c
b/src/lib/elm_cnp_helper.c
index
dd99db6
..
2b4794b
100644
(file)
--- a/
src/lib/elm_cnp_helper.c
+++ b/
src/lib/elm_cnp_helper.c
@@
-772,7
+772,11
@@
_get_tag_value(const char *tag_str, const char *tag_name)
char *valueEnd = strchr(value, '\0');
int i;
char *valueEnd = strchr(value, '\0');
int i;
- for (i = 0; i < spCnt; i++)
+ int start = 0;
+ if (!strcmp(tag_str, "item") && !strcmp(tag_name, "href"))
+ start = 1;
+
+ for (i = start; i < spCnt; i++)
{
if (spArray[i] && spArray[i] < valueEnd)
valueEnd = spArray[i];
{
if (spArray[i] && spArray[i] < valueEnd)
valueEnd = spArray[i];
@@
-1624,7
+1628,7
@@
notify_handler_uri(Cnp_Selection *sel, Ecore_X_Event_Selection_Notify *notify)
Ecore_X_Selection_Data *data;
Ecore_X_Selection_Data_Files *files;
Paste_Image *pi;
Ecore_X_Selection_Data *data;
Ecore_X_Selection_Data_Files *files;
Paste_Image *pi;
- char *p;
+ char *p
, *stripstr
;
data = notify->data;
cnp_debug("data->format is %d %p %p\n", data->format, notify, data);
data = notify->data;
cnp_debug("data->format is %d %p %p\n", data->format, notify, data);
@@
-1638,11
+1642,11
@@
notify_handler_uri(Cnp_Selection *sel, Ecore_X_Event_Selection_Notify *notify)
cnp_debug("more then one file: Bailing\n");
return 0;
}
cnp_debug("more then one file: Bailing\n");
return 0;
}
-
p = files->files[0]
;
+
stripstr = p = strdup(files->files[0])
;
}
else
{
}
else
{
-
p = (char *)data->data
;
+
stripstr = p = strndup((char *)data->data, data->length)
;
}
if (!p)
}
if (!p)
@@
-1660,12
+1664,17
@@
notify_handler_uri(Cnp_Selection *sel, Ecore_X_Event_Selection_Notify *notify)
ddata.data = p;
ddata.len = data->length;
sel->datacb(sel->udata, sel->widget, &ddata);
ddata.data = p;
ddata.len = data->length;
sel->datacb(sel->udata, sel->widget, &ddata);
+ free(p);
return 0;
}
if (strncmp(p, "file://", 7))
{
/* Try and continue if it looks sane */
return 0;
}
if (strncmp(p, "file://", 7))
{
/* Try and continue if it looks sane */
- if (*p != '/') return 0;
+ if (*p != '/')
+ {
+ free(p);
+ return 0;
+ }
}
else
{
}
else
{
@@
-1684,6
+1693,7
@@
notify_handler_uri(Cnp_Selection *sel, Ecore_X_Event_Selection_Notify *notify)
pasteimage_append(pi, sel->requestwidget);
savedtypes.pi = NULL;
}
pasteimage_append(pi, sel->requestwidget);
savedtypes.pi = NULL;
}
+ free(stripstr);
return 0;
}
return 0;
}