fix a tremendous number of stringshare leaks

SVN revision: 81532
This commit is contained in:
Mike Blumenkrantz 2012-12-21 10:20:05 +00:00
parent 27896bfae3
commit 3bc56a9e5f
9 changed files with 13 additions and 5 deletions

View File

@ -221,7 +221,7 @@ e_bg_zone_update(E_Zone *zone, E_Bg_Transition transition)
const char *pfile = "";
edje_object_file_get(zone->bg_object, &pfile, NULL);
if (!e_util_strcmp(pfile, bgfile)) return;
if (!e_util_strcmp(pfile, bgfile)) goto end;
}
if (transition == E_BG_TRANSITION_NONE)
@ -296,6 +296,8 @@ e_bg_zone_update(E_Zone *zone, E_Bg_Transition transition)
zone->bg_object);
edje_object_signal_emit(zone->transition_object, "e,action,start", "e");
}
end:
eina_stringshare_del(bgfile);
}
EAPI void

View File

@ -898,6 +898,7 @@ _e_border_menu_cb_sendto_icon_pre(void *data, E_Menu *m, E_Menu_Item *mi)
desk->x, desk->y);
o = e_thumb_icon_add(m->evas);
e_thumb_icon_file_set(o, bgfile, "e/desktop/background");
eina_stringshare_del(bgfile);
e_thumb_icon_size_set(o, tw, th);
e_thumb_icon_begin(o);
mi->icon_object = o;

View File

@ -994,6 +994,7 @@ _e_int_menus_virtuals_icon_cb(void *data, E_Menu *m, E_Menu_Item *mi)
bgfile = e_bg_file_get(desk->zone->container->num, desk->zone->num, desk->x, desk->y);
o = e_thumb_icon_add(m->evas);
e_thumb_icon_file_set(o, bgfile, "e/desktop/background");
eina_stringshare_del(bgfile);
e_thumb_icon_size_set(o, tw, th);
e_thumb_icon_begin(o);
mi->icon_object = o;

View File

@ -84,6 +84,7 @@ e_widget_deskpreview_desk_add(Evas_Object *obj, E_Zone *zone, int x, int y, int
dd->thumb = e_icon_add(evas_object_evas_get(obj));
e_icon_fill_inside_set(dd->thumb, EINA_FALSE);
e_icon_file_edje_set(dd->thumb, bgfile, "e/desktop/background");
eina_stringshare_del(bgfile);
evas_object_show(dd->thumb);
edje_object_part_swallow(dd->icon, "e.swallow.content", dd->thumb);
@ -265,6 +266,7 @@ _e_wid_cb_bg_update(void *data, int type, void *event)
bgfile = e_bg_file_get(dd->con, dd->zone, dd->x, dd->y);
e_icon_file_edje_set(dd->thumb, bgfile, "e/desktop/background");
eina_stringshare_del(bgfile);
}
return ECORE_CALLBACK_PASS_ON;

View File

@ -100,6 +100,7 @@ _scale_preview_new(E_Config_Dialog_Data *cfdata, Evas *e, double sc, double *scp
bg = edje_object_add(e_widget_preview_evas_get(ob));
file = e_bg_file_get(0, 0, 0, 0);
edje_object_file_set(bg, file, "e/desktop/background");
eina_stringshare_del(file);
evas_object_move(bg, 0, 0);
evas_object_resize(bg, 640, 480);
evas_object_show(bg);

View File

@ -332,11 +332,8 @@ _fill_data(E_Config_Dialog_Data *cfdata)
cw = cfdata->cfd->data;
if (cw->specific_config)
{
const char *bg;
/* specific config passed in. set for that only */
bg = e_bg_file_get(cw->con_num, cw->zone_num, cw->desk_x, cw->desk_y);
if (bg) cfdata->bg = eina_stringshare_add(bg);
cfdata->bg = e_bg_file_get(cw->con_num, cw->zone_num, cw->desk_x, cw->desk_y);
}
else
{

View File

@ -423,6 +423,7 @@ _il_home_win_new(E_Zone *zone)
hwin->o_bg = edje_object_add(evas);
edje_object_file_set(hwin->o_bg, bgfile, "e/desktop/background");
eina_stringshare_del(bgfile);
evas_object_move(hwin->o_bg, 0, 0);
evas_object_show(hwin->o_bg);
@ -750,6 +751,7 @@ _il_home_cb_bg_change(void *data __UNUSED__, int type, void *event __UNUSED__)
else
bgfile = e_bg_file_get(zone->container->num, zone->num, -1, -1);
edje_object_file_set(hwin->o_bg, bgfile, "e/desktop/background");
eina_stringshare_del(bgfile);
}
return ECORE_CALLBACK_PASS_ON;

View File

@ -403,6 +403,7 @@ _pager_desk_livethumb_setup(Pager_Desk *pd)
bgfile = e_bg_file_get(pd->desk->zone->container->num, pd->desk->zone->num, pd->desk->x, pd->desk->y);
edje_object_file_set(o, bgfile, "e/desktop/background");
e_livethumb_thumb_set(pd->o_bg, o);
eina_stringshare_del(bgfile);
}
static Pager_Desk *

View File

@ -65,6 +65,7 @@ _scale_preview_new(Evas *e, double sc, double *scp)
bg = edje_object_add(e_widget_preview_evas_get(ob));
file = e_bg_file_get(0, 0, 0, 0);
edje_object_file_set(bg, file, "e/desktop/background");
eina_stringshare_del(file);
evas_object_move(bg, 0, 0);
evas_object_resize(bg, 640, 480);
evas_object_show(bg);