From: "Rodolfo García Peñas (kix)" <[email protected]>
The function wIconChangeTitle() function calls wIconUpdate() or
wIconPaint() depending of changed. In both cases the icon->file_image
doesn't change, only the icon title, so we can use the same image
and we don't need update it. Because the variable changed is removed,
we can use wIconPaint() here.
Then the variable changed is not used, and these lines can be removed.
---
src/icon.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/src/icon.c b/src/icon.c
index e9e9c89..c6d744c 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -303,20 +303,11 @@ static void icon_update_pixmap(WIcon *icon, RImage *image)
void wIconChangeTitle(WIcon *icon, char *new_title)
{
- int changed;
-
- changed = (new_title == NULL && icon->icon_name != NULL) ||
- (new_title != NULL && icon->icon_name == NULL);
-
if (icon->icon_name != NULL)
XFree(icon->icon_name);
icon->icon_name = new_title;
-
- if (changed)
- wIconUpdate(icon);
- else
- wIconPaint(icon);
+ wIconPaint(icon);
}
RImage *wIconValidateIconSize(RImage *icon, int max_size)
--
1.7.10.4
--
To unsubscribe, send mail to [email protected].