termio: clean up _update_link()

This commit is contained in:
Boris Faure 2014-10-05 20:59:19 +02:00
parent 564d78ce93
commit 32fb73b733
1 changed files with 75 additions and 76 deletions

View File

@ -1095,6 +1095,11 @@ static void
_update_link(Evas_Object *obj, Termio *sd,
Eina_Bool same_link, Eina_Bool same_geom)
{
Evas_Coord ox, oy, ow, oh;
Evas_Object *o;
Eina_Bool popup_exists;
int y;
EINA_SAFETY_ON_NULL_RETURN(sd);
if (!same_link)
@ -1102,16 +1107,12 @@ _update_link(Evas_Object *obj, Termio *sd,
// check link and re-probe/fetch create popup preview
}
if (!same_geom)
{
Evas_Coord ox, oy, ow, oh;
Evas_Object *o;
// fix up edje objects "underlining" the link
int y;
if (same_geom)
return;
if (sd->link.suspend)
return;
evas_object_geometry_get(obj, &ox, &oy, &ow, &oh);
if (!sd->link.suspend)
{
EINA_LIST_FREE(sd->link.objs, o)
{
if (sd->link.down.dndobj == o)
@ -1122,9 +1123,11 @@ _update_link(Evas_Object *obj, Termio *sd,
else
evas_object_del(o);
}
if (sd->link.string)
{
if ((!main_term_popup_exists(sd->term)) &&
if (!sd->link.string)
return;
popup_exists = main_term_popup_exists(sd->term);
if ((!popup_exists) &&
((sd->link.string[0] == '/') || (link_is_url(sd->link.string))))
{
Evas_Coord _x = ox, _y = oy;
@ -1185,9 +1188,6 @@ _update_link(Evas_Object *obj, Termio *sd,
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_MOVE,
_cb_link_move, obj);
}
}
}
}
}
static void
@ -4032,7 +4032,6 @@ _smart_apply(Evas_Object *obj)
if (ch1 >= 0)
evas_object_textgrid_update_add(sd->grid.obj, ch1, y,
ch2 - ch1 + 1, 1);
//printf("I'm fine thanx\n");
}
termpty_cellcomp_thaw(sd->pty);