forked from enlightenment/enlightenment
e_widget needs to track sub objects so it knwos what to delete on deletion of
the widget. if u delete a sub object prematurely - u need to tell e_widget. u also need to dell it about the new object! SVN revision: 26616
This commit is contained in:
parent
f501859f3d
commit
69d34400a9
|
@ -134,6 +134,11 @@ EAPI void
|
||||||
e_widget_sub_object_add(Evas_Object *obj, Evas_Object *sobj)
|
e_widget_sub_object_add(Evas_Object *obj, Evas_Object *sobj)
|
||||||
{
|
{
|
||||||
API_ENTRY return;
|
API_ENTRY return;
|
||||||
|
if (evas_list_find(sd->subobjs, sobj))
|
||||||
|
{
|
||||||
|
printf("----------EEEEEK! dupe sub obj is a sub obj!\n");
|
||||||
|
abort();
|
||||||
|
}
|
||||||
sd->subobjs = evas_list_append(sd->subobjs, sobj);
|
sd->subobjs = evas_list_append(sd->subobjs, sobj);
|
||||||
if (!sd->child_can_focus)
|
if (!sd->child_can_focus)
|
||||||
{
|
{
|
||||||
|
|
|
@ -578,7 +578,7 @@ _e_wid_fsel_preview_file(E_Widget_Data *wd)
|
||||||
mtime = _e_wid_file_time_get(st.st_mtime);
|
mtime = _e_wid_file_time_get(st.st_mtime);
|
||||||
|
|
||||||
e_widget_preview_thumb_set(wd->o_preview_preview, wd->path,
|
e_widget_preview_thumb_set(wd->o_preview_preview, wd->path,
|
||||||
"background", 128, 128);
|
"e/desktop/background", 128, 128);
|
||||||
|
|
||||||
e_widget_table_object_repack(wd->o_preview_preview_table,
|
e_widget_table_object_repack(wd->o_preview_preview_table,
|
||||||
wd->o_preview_preview,
|
wd->o_preview_preview,
|
||||||
|
|
|
@ -59,8 +59,7 @@ e_widget_preview_file_set(Evas_Object *obj, const char *file, const char *key)
|
||||||
|
|
||||||
wd = e_widget_data_get(obj);
|
wd = e_widget_data_get(obj);
|
||||||
|
|
||||||
if (wd->o_thumb)
|
if (wd->o_thumb) evas_object_del(wd->o_thumb);
|
||||||
evas_object_del(wd->o_thumb);
|
|
||||||
|
|
||||||
wd->o_thumb = e_icon_add(e_livethumb_evas_get(wd->img));
|
wd->o_thumb = e_icon_add(e_livethumb_evas_get(wd->img));
|
||||||
e_icon_file_key_set(wd->o_thumb, file, key);
|
e_icon_file_key_set(wd->o_thumb, file, key);
|
||||||
|
@ -77,9 +76,13 @@ e_widget_preview_thumb_set(Evas_Object *obj, const char *file, const char *key,
|
||||||
wd = e_widget_data_get(obj);
|
wd = e_widget_data_get(obj);
|
||||||
|
|
||||||
if (wd->img)
|
if (wd->img)
|
||||||
|
{
|
||||||
|
e_widget_sub_object_del(obj, wd->img);
|
||||||
evas_object_del(wd->img);
|
evas_object_del(wd->img);
|
||||||
|
}
|
||||||
|
|
||||||
wd->img = e_thumb_icon_add(evas_object_evas_get(obj));
|
wd->img = e_thumb_icon_add(evas_object_evas_get(obj));
|
||||||
|
e_widget_sub_object_add(obj, wd->img);
|
||||||
if (e_util_glob_case_match(file, "*.edj"))
|
if (e_util_glob_case_match(file, "*.edj"))
|
||||||
{
|
{
|
||||||
/* FIXME: There is probably a quicker way of doing this. */
|
/* FIXME: There is probably a quicker way of doing this. */
|
||||||
|
@ -92,9 +95,9 @@ e_widget_preview_thumb_set(Evas_Object *obj, const char *file, const char *key,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
e_thumb_icon_file_set(wd->img, file, NULL);
|
e_thumb_icon_file_set(wd->img, file, NULL);
|
||||||
|
evas_object_smart_callback_add(wd->img, "e_thumb_gen", _e_wid_preview_thumb_gen, wd);
|
||||||
e_thumb_icon_size_set(wd->img, w, h);
|
e_thumb_icon_size_set(wd->img, w, h);
|
||||||
e_thumb_icon_begin(wd->img);
|
e_thumb_icon_begin(wd->img);
|
||||||
evas_object_smart_callback_add(wd->img, "e_thumb_gen", _e_wid_preview_thumb_gen, wd);
|
|
||||||
|
|
||||||
edje_object_part_swallow(wd->o_frame, "e.swallow.content", wd->img);
|
edje_object_part_swallow(wd->o_frame, "e.swallow.content", wd->img);
|
||||||
evas_object_show(wd->img);
|
evas_object_show(wd->img);
|
||||||
|
|
Loading…
Reference in New Issue