Tweak the E_App object reference counting. I think this is correct, but

I suspect the dir scanning in e_apps.c still needs an unref.


SVN revision: 25900
This commit is contained in:
David Walter Seikel 2006-09-17 00:13:52 +00:00
parent 326815ab80
commit 6bace96662
4 changed files with 17 additions and 5 deletions

View File

@ -220,7 +220,7 @@ e_app_new(const char *path, int scan_subdirs)
{
if(st.st_mtime > a->mtime)
{
e_object_del(E_OBJECT(a));
e_object_free(E_OBJECT(a));
a = NULL;
stated = 1;
}
@ -278,6 +278,9 @@ e_app_new(const char *path, int scan_subdirs)
_e_apps_list = evas_list_prepend(_e_apps_list, a);
#endif
}
else
e_object_ref(E_OBJECT(a));
return a;
error:

View File

@ -2552,7 +2552,7 @@ e_border_icon_add(E_Border *bd, Evas *evas)
if (o) evas_object_del(o);
o = e_app_icon_add(evas, a);
bd->app = a;
e_object_ref(E_OBJECT(bd->app));
// e_object_ref(E_OBJECT(bd->app));
}
else
{

View File

@ -1611,7 +1611,10 @@ _e_fm2_icon_icon_set(E_Fm2_Icon *ic)
app = e_app_new(buf, 0);
if (app)
{
ic->obj_icon = e_app_icon_add(evas_object_evas_get(ic->sd->obj), app);
/* FIXME: Actually, I think it's the icon searching that is slowing things down a lot.
* That will be fixed by moving it to thumbnailing as planned. Commented out for now.
*/
// ic->obj_icon = e_app_icon_add(evas_object_evas_get(ic->sd->obj), app);
e_object_unref(E_OBJECT(app));
}
}
@ -1698,7 +1701,10 @@ _e_fm2_icon_icon_set(E_Fm2_Icon *ic)
app = e_app_new(buf, 0);
if (app)
{
ic->obj_icon = e_app_icon_add(evas_object_evas_get(ic->sd->obj), app);
/* FIXME: Actually, I think it's the icon searching that is slowing things down a lot.
* That will be fixed by moving it to thumbnailing as planned. Commented out for now.
*/
// ic->obj_icon = e_app_icon_add(evas_object_evas_get(ic->sd->obj), app);
e_object_unref(E_OBJECT(app));
}
edje_object_part_swallow(ic->obj, "e.swallow.icon", ic->obj_icon);

View File

@ -842,7 +842,10 @@ _ibar_cb_menu_add_application_cb(void *data, const char *path)
b = data;
a = e_app_new(path, 0);
if (a)
e_app_list_append(a, b->apps);
{
e_app_list_append(a, b->apps);
e_object_unref(E_OBJECT(a));
}
_ibar_empty_handle(b);
_ibar_resize_handle(b);
_gc_orient(b->inst->gcc);