From 73a6413bb0ba154ab5e7b2e3eb9fd9fd4898a624 Mon Sep 17 00:00:00 2001 From: sebastid Date: Thu, 20 Jul 2006 11:19:08 +0000 Subject: [PATCH] Delete tmpfile after use. SVN revision: 24065 --- src/bin/e_apps.h | 2 ++ src/bin/e_eap_editor.c | 2 ++ src/bin/e_int_border_menu.c | 1 + src/bin/e_int_gadcon_config.c | 1 - 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bin/e_apps.h b/src/bin/e_apps.h index d042ba124..d78e451b3 100644 --- a/src/bin/e_apps.h +++ b/src/bin/e_apps.h @@ -62,9 +62,11 @@ struct _E_App unsigned char deleted : 1; /* this app's file is deleted from disk */ + /* used for eap edit */ const char *image; /* used when we're saving a image into the eap */ int width; /* used for saving eap's image width in edje */ int height; /* used for saving eap's image height in edje */ + unsigned char tmpfile : 1; }; struct _E_App_Instance diff --git a/src/bin/e_eap_editor.c b/src/bin/e_eap_editor.c index 5f4558d08..7ece84598 100644 --- a/src/bin/e_eap_editor.c +++ b/src/bin/e_eap_editor.c @@ -136,6 +136,8 @@ _e_eap_edit_free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *data) E_FREE(data->wrole); E_FREE(data->iclass); E_FREE(data->image); + if (data->editor->eap->tmpfile) ecore_file_unlink(data->editor->eap->image); + data->editor->eap->tmpfile = 0; if (data->editor->eap->image) evas_stringshare_del(data->editor->eap->image); data->editor->eap->width = 0; data->editor->eap->height = 0; diff --git a/src/bin/e_int_border_menu.c b/src/bin/e_int_border_menu.c index 4b1035706..7a2e1f100 100644 --- a/src/bin/e_int_border_menu.c +++ b/src/bin/e_int_border_menu.c @@ -573,6 +573,7 @@ _e_border_menu_cb_icon_edit(void *data, E_Menu *m, E_Menu_Item *mi) a->image = evas_stringshare_add(path); a->width = bd->client.netwm.icons[0].width; a->height = bd->client.netwm.icons[0].height; + a->tmpfile = 1; } else { diff --git a/src/bin/e_int_gadcon_config.c b/src/bin/e_int_gadcon_config.c index ee30c5d47..459120e1e 100644 --- a/src/bin/e_int_gadcon_config.c +++ b/src/bin/e_int_gadcon_config.c @@ -199,7 +199,6 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf { Evas_Object *o, *of, *ob, *oi; Evas_Coord wmw, wmh; - Evas_List *l, *l2; o = e_widget_list_add(evas, 0, 1);