>From 91b0a72c0e743b4941eb3b52e524124563fca156 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?"Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20(kix)"?= <[email protected]>
Date: Sun, 4 Mar 2012 16:37:22 +0100
Subject: [PATCH 7/8] WindowMaker: icon.c goto removed
The goto "make_icons" in icon.c was removed.
---
src/icon.c | 24 +++++++++++-------------
1 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/src/icon.c b/src/icon.c
index 87d6d42..b4491c8 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);
--
1.7.7.3
--
||// //\\// Rodolfo "kix" Garcia
||\\// //\\ http://www.kix.es/
>From 91b0a72c0e743b4941eb3b52e524124563fca156 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?"Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20(kix)"?= <[email protected]>
Date: Sun, 4 Mar 2012 16:37:22 +0100
Subject: [PATCH 7/8] WindowMaker: icon.c goto removed
The goto "make_icons" in icon.c was removed.
---
src/icon.c | 24 +++++++++++-------------
1 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/src/icon.c b/src/icon.c
index 87d6d42..b4491c8 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);
--
1.7.7.3