>From 15e489a787090cbde59cc091177cdd7f7140342f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?"Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20(kix)"?= <[email protected]>
Date: Thu, 15 Nov 2012 00:56:26 +0100
Subject: [PATCH 4/6] wIconChangeImageFile set the file image
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 | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/icon.c b/src/icon.c
index de766ad..bc466f9 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -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;
}
--
1.7.10.4
>From 15e489a787090cbde59cc091177cdd7f7140342f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?"Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20(kix)"?= <[email protected]>
Date: Thu, 15 Nov 2012 00:56:26 +0100
Subject: [PATCH 4/6] wIconChangeImageFile set the file image
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 | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/icon.c b/src/icon.c
index de766ad..bc466f9 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -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;
}
--
1.7.10.4