From 1bec2efba007da49ffbdab45d86448e129086666 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20=28kix=29?= Date: Sun, 4 Mar 2012 16:37:22 +0100 Subject: [PATCH] WindowMaker: icon.c goto removed The goto "make_icons" in icon.c was removed. --- src/icon.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/icon.c b/src/icon.c index 30a41e15..40abbfb3 100644 --- a/src/icon.c +++ b/src/icon.c @@ -589,31 +589,29 @@ void wIconUpdate(WIcon * icon) void get_pixmap_icon_from_user_icon(WScreen *scr, WIcon * icon) { + RImage *image = NULL; + char *path; + char *file; + if (icon->file_image) { icon->pixmap = makeIcon(scr, icon->file_image, icon->show_title, icon->shadowed, icon->tile_type, icon->highlighted); } else { /* make default icons */ if (!scr->def_icon_pixmap) { - RImage *image = NULL; - char *path; - char *file; - file = wDefaultGetIconFile(scr, NULL, NULL, False); if (file) { path = FindImage(wPreferences.icon_path, file); - if (!path) { + 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); - goto make_icons; } - - image = RLoadImage(scr->rcontext, path, 0); - if (!image) - wwarning(_("could not load default icon \"%s\":%s"), - file, RMessageForError(RErrorCode)); - wfree(path); } - make_icons: image = wIconValidateIconSize(scr, image, wPreferences.icon_size); scr->def_icon_pixmap = makeIcon(scr, image, False, False, icon->tile_type, icon->highlighted); -- 2.11.4.GIT