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:
committed by
Carlos R. Mafra
parent
c3024542ad
commit
280e1e099d
18
src/icon.c
18
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 {
|
||||
wwarning(_("could not find default icon \"%s\""), file);
|
||||
}
|
||||
}
|
||||
image = get_rimage_from_file(scr, path, wPreferences.icon_size);
|
||||
|
||||
/* Validate the icon size */
|
||||
image = wIconValidateIconSize(image, wPreferences.icon_size);
|
||||
if (!image)
|
||||
wwarning(_("could not find default icon \"%s\""), file);
|
||||
|
||||
wfree(file);
|
||||
}
|
||||
|
||||
return image;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user