fix segv happiness in term tab sel.

devs/lucas/wip
Carsten Haitzler 10 years ago
parent 28071e731e
commit 72e813bf2a
  1. 2
      TODO
  2. 28
      src/bin/sel.c

@ -3,7 +3,7 @@ make it a first-class terminal:
[ ] splits need to size only by steps in font size (elm feature)
[ ] split handles need to become invisible (elm theme)
[ ] new term/split/cose buttons need proper icons
[ ] new term/split/close buttons need proper icons
[ ] better info in tyls -m
[ ] tyls -b needs doing
[ ] blink and blink2 attributes need to be supported

@ -356,13 +356,26 @@ _media_del_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void
en->media = NULL;
}
static void
_entry_termio_del_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *info __UNUSED__)
{
Entry *en = data;
if (en->termio) evas_object_event_callback_add
(en->termio, EVAS_CALLBACK_DEL, _entry_termio_del_cb, en);
en->termio = NULL;
}
static void
_entry_del_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *info __UNUSED__)
{
Entry *en = data;
if (en->obj) evas_object_event_callback_del_full
(en->obj, EVAS_CALLBACK_DEL, _entry_del_cb, en);
en->obj = NULL;
if (en->termio)
{
evas_object_event_callback_del_full(en->termio, EVAS_CALLBACK_DEL,
_entry_termio_del_cb, en);
evas_object_smart_callback_del_full(en->termio, "title,change",
_title_cb, en);
evas_object_smart_callback_del_full(en->termio, "icon,change",
@ -373,13 +386,6 @@ _entry_del_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void
}
}
static void
_entry_termio_del_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *info __UNUSED__)
{
Entry *en = data;
en->termio = NULL;
}
static void
_smart_add(Evas_Object *obj)
{
@ -412,6 +418,8 @@ _smart_del(Evas_Object *obj)
{
if (en->termio)
{
evas_object_event_callback_del_full(en->termio, EVAS_CALLBACK_DEL,
_entry_termio_del_cb, en);
evas_object_smart_callback_del_full(en->termio, "title,change",
_title_cb, en);
evas_object_smart_callback_del_full(en->termio, "icon,change",
@ -419,6 +427,8 @@ _smart_del(Evas_Object *obj)
evas_object_smart_callback_del_full(en->termio, "bell",
_bell_cb, en);
}
if (en->obj) evas_object_event_callback_del_full
(en->obj, EVAS_CALLBACK_DEL, _entry_del_cb, en);
if (en->obj) evas_object_del(en->obj);
if (en->media) evas_object_del(en->media);
evas_object_del(en->bg);
@ -616,7 +626,7 @@ sel_entry_selected_set(Evas_Object *obj, Evas_Object *entry, Eina_Bool keep_befo
}
if (!keep_before) en->selected_before = EINA_FALSE;
}
_transit(obj, 0.3);
_transit(obj, 0.5);
}
void
@ -625,7 +635,7 @@ sel_zoom(Evas_Object *obj, double zoom)
Sel *sd = evas_object_smart_data_get(obj);
if (!sd) return;
sd->zoom1 = zoom;
_transit(obj, 0.3);
_transit(obj, 0.5);
}
void

Loading…
Cancel
Save