From: Rodolfo García Peñas (kix) Date: Wed, 31 Oct 2012 21:44:16 +0000 (+0100) Subject: Removed dup code at get_default_image X-Git-Tag: wmaker-0.95.4~78 X-Git-Url: https://repo.or.cz/w/wmaker-crm.git/commitdiff_plain/280e1e099d1e5998e76251b0d4bfb6fa657968de Removed dup code at get_default_image This patch removes the code dup at get_default_image. Now, this function calls get_rimage_from_file() --- diff --git a/src/icon.c b/src/icon.c index b4ccfc5b..da93679c 100644 --- a/src/icon.c +++ b/src/icon.c @@ -649,19 +649,13 @@ static RImage *get_default_image(WScreen *scr) file = wDefaultGetIconFile(NULL, NULL, True); if (file) { path = FindImage(wPreferences.icon_path, file); - if (path) { - image = RLoadImage(scr->rcontext, path, 0); - if (!image) - wwarning(_("could not load default icon \"%s\":%s"), - file, RMessageForError(RErrorCode)); - wfree(path); - } else { + image = get_rimage_from_file(scr, path, wPreferences.icon_size); + + if (!image) wwarning(_("could not find default icon \"%s\""), file); - } - } - /* Validate the icon size */ - image = wIconValidateIconSize(image, wPreferences.icon_size); + wfree(file); + } return image; }