From 307cd6a9a7685dd55005f21bc6afc2098e87193b Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Mon, 27 Nov 2006 12:54:29 +0000 Subject: [PATCH] Fix up the border_icon_set a little bit. - Make sure we stringshare_del any old border_icons. SVN revision: 27231 --- src/bin/e_dialog.c | 10 +++++++--- src/bin/e_win.c | 9 +++++++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/bin/e_dialog.c b/src/bin/e_dialog.c index 4de3808e7..f8e63852a 100644 --- a/src/bin/e_dialog.c +++ b/src/bin/e_dialog.c @@ -155,12 +155,16 @@ EAPI void e_dialog_border_icon_set(E_Dialog *dia, const char *icon) { E_Border *border; - - if (!icon) return; border = dia->win->border; if (!border) return; - border->internal_icon = evas_stringshare_add(icon); + if (border->internal_icon) + { + evas_stringshare_del(border->internal_icon); + border->internal_icon = NULL; + } + if (icon) + border->internal_icon = evas_stringshare_add(icon); } EAPI void diff --git a/src/bin/e_win.c b/src/bin/e_win.c index e0eb4323f..e9fdf0ffe 100644 --- a/src/bin/e_win.c +++ b/src/bin/e_win.c @@ -370,10 +370,15 @@ e_win_border_icon_set(E_Win *win, const char *icon) { E_Border *border; - if (!icon) return; border = win->border; if (!border) return; - border->internal_icon = evas_stringshare_add(icon); + if (border->internal_icon) + { + evas_stringshare_del(border->internal_icon); + border->internal_icon = NULL; + } + if (icon) + border->internal_icon = evas_stringshare_add(icon); } /* local subsystem functions */