wIconChangeImageFile set the file image
authorRodolfo García Peñas (kix) <kix@kix.es>
Wed, 14 Nov 2012 23:56:26 +0000 (15 00:56 +0100)
committerCarlos R. Mafra <crmafra@gmail.com>
Sat, 17 Nov 2012 19:38:50 +0000 (17 20:38 +0100)
The function wIconChangeImageFile set the file_image variable directly,
now the code is faster and the assigned image is used.

Before this patch, the assigned file couldn't be used, because wIconUpdate
serached the icon using different methods.

src/icon.c

index e745619..f1f9c67 100644 (file)
@@ -398,9 +398,8 @@ Bool wIconChangeImageFile(WIcon *icon, char *file)
                unset_icon_image(icon);
 
                /* Set the new image */
-               icon->file_image = image;
                icon->file = wstrdup(path);
-               wIconUpdate(icon, NULL);
+               wIconUpdate(icon, image);
        } else {
                error = 1;
        }