From: "Rodolfo García Peñas (kix)" <[email protected]>

The function wIconChangeImageFile() now use set_icon_image_from_image()
then:

1. Don't need call unset_icon_image() because the memory is free in the
   function set_icon_image_from_image().
2. After update the icon info, it must set the file name.
3. The pixmap image could be updated.
---
 src/icon.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/icon.c b/src/icon.c
index eaca466..a2cb835 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -362,12 +362,10 @@ Bool wIconChangeImageFile(WIcon *icon, char *file)
 
        /* New image! */
        if (!error && image) {
-               /* Remove the old one */
-               unset_icon_image(icon);
-
                /* Set the new image */
+               set_icon_image_from_image(icon, image);
                icon->file = wstrdup(path);
-               wIconUpdate(icon, image);
+               update_icon_pixmap(icon);
        } else {
                error = 1;
        }
-- 
1.7.10.4


-- 
To unsubscribe, send mail to [email protected].

Reply via email to