1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-23 22:52:34 +01:00

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()
This commit is contained in:
Rodolfo García Peñas (kix)
2012-10-31 22:44:16 +01:00
committed by Carlos R. Mafra
parent c3024542ad
commit 280e1e099d

View File

@@ -649,19 +649,13 @@ static RImage *get_default_image(WScreen *scr)
file = wDefaultGetIconFile(NULL, NULL, True); file = wDefaultGetIconFile(NULL, NULL, True);
if (file) { if (file) {
path = FindImage(wPreferences.icon_path, file); path = FindImage(wPreferences.icon_path, file);
if (path) { image = get_rimage_from_file(scr, path, wPreferences.icon_size);
image = RLoadImage(scr->rcontext, path, 0);
if (!image)
wwarning(_("could not load default icon \"%s\":%s"),
file, RMessageForError(RErrorCode));
wfree(path);
} else {
wwarning(_("could not find default icon \"%s\""), file);
}
}
/* Validate the icon size */ if (!image)
image = wIconValidateIconSize(image, wPreferences.icon_size); wwarning(_("could not find default icon \"%s\""), file);
wfree(file);
}
return image; return image;
} }