On Tue,  2 Oct 2012 at 23:47:59 +0200, Rodolfo García Peñas wrote:

> Subject: [PATCH 4/9] Removed dup code in wIconCreateWithIconFile
> 
> Code in the function wIconCreateWithIconFile is dup with the code at
> get_default_icon_rimage, therefore can be removed.

This description is wrong. You are not _removing_ anything. You
are replacing some lines of code by a call to a helper function
which does the same thing.

It's a completely different thing.

But nice patch.

> diff --git a/src/icon.c b/src/icon.c
> index d929a8c..a940123 100644
> --- a/src/icon.c
> +++ b/src/icon.c
> @@ -156,14 +156,8 @@ WIcon *wIconCreateWithIconFile(WScreen *scr, char 
> *iconfile, int tile)
>  
>       icon = wIconCreateCore(scr, 0, 0);
>  
> -     if (iconfile) {
> -             icon->file_image = RLoadImage(scr->rcontext, iconfile, 0);
> -             if (!icon->file_image)
> -                     wwarning(_("error loading image file \"%s\": %s"), 
> iconfile, RMessageForError(RErrorCode));
> -
> -             icon->file_image = wIconValidateIconSize(icon->file_image, 
> wPreferences.icon_size);
> -             icon->file = wstrdup(iconfile);
> -     }
> +     icon->file_image = get_default_icon_rimage(scr, iconfile, 
> wPreferences.icon_size);
> +     icon->file = wstrdup(iconfile);
>  
>       icon->tile_type = tile;
>  
> -- 
> 1.7.10.4
> 


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

Reply via email to