ctxpopup: don't display image preview if image string is in comments.

if image string is in comments, image shouldn't be appeared.
but edc parser didn't compares texts elaborately and it came out error.

now fixed it.

@fix T3740
This commit is contained in:
Hermet Park 2016-06-02 00:41:08 +09:00
parent 925eb77c79
commit e5ffff6872
2 changed files with 10 additions and 3 deletions

View File

@ -736,9 +736,11 @@ edit_cursor_double_clicked_cb(void *data, Evas_Object *obj,
* Because right now any text inside quotes that placed after selection is
* recognized as name.
*/
if ((!strncmp(selected, "image", 5)) || //5: sizeof("image")
(!strcmp(selected, "normal")) ||
(!strcmp(selected, "tween")))
if ((!strcmp(selected, "image") && (strlen(selected) == 5)) ||
(!strcmp(selected, "normal") && (strlen(selected) == 6)) ||
(!strcmp(selected, "tween") && (strlen(selected) == 5)) ||
(!strcmp(selected, "image.normal") && (strlen(selected) == 12)) ||
(!strcmp(selected, "image.tween") && (strlen(selected) == 11)))
{
int x, y;
evas_pointer_output_xy_get(evas_object_evas_get(ed->en_edit), &x, &y);

View File

@ -1525,6 +1525,11 @@ parser_name_get(parser_data *pd EINA_UNUSED, const char *cur)
p++;
end = strstr(p, "\"");
if (!end) return NULL;
//Don't find if the name is in the next lines.
char *eol = strstr(cur, "\n");
if (eol < p) return NULL;
return strndup(p, (end - p));
}