mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-23 22:52:34 +01:00
WindowMaker: icon.c goto removed
The goto "make_icons" in icon.c was removed.
This commit is contained in:
committed by
Carlos R. Mafra
parent
72f359be44
commit
1bec2efba0
24
src/icon.c
24
src/icon.c
@@ -589,31 +589,29 @@ void wIconUpdate(WIcon * icon)
|
|||||||
|
|
||||||
void get_pixmap_icon_from_user_icon(WScreen *scr, WIcon * icon)
|
void get_pixmap_icon_from_user_icon(WScreen *scr, WIcon * icon)
|
||||||
{
|
{
|
||||||
|
RImage *image = NULL;
|
||||||
|
char *path;
|
||||||
|
char *file;
|
||||||
|
|
||||||
if (icon->file_image) {
|
if (icon->file_image) {
|
||||||
icon->pixmap = makeIcon(scr, icon->file_image, icon->show_title,
|
icon->pixmap = makeIcon(scr, icon->file_image, icon->show_title,
|
||||||
icon->shadowed, icon->tile_type, icon->highlighted);
|
icon->shadowed, icon->tile_type, icon->highlighted);
|
||||||
} else {
|
} else {
|
||||||
/* make default icons */
|
/* make default icons */
|
||||||
if (!scr->def_icon_pixmap) {
|
if (!scr->def_icon_pixmap) {
|
||||||
RImage *image = NULL;
|
|
||||||
char *path;
|
|
||||||
char *file;
|
|
||||||
|
|
||||||
file = wDefaultGetIconFile(scr, NULL, NULL, False);
|
file = wDefaultGetIconFile(scr, NULL, NULL, False);
|
||||||
if (file) {
|
if (file) {
|
||||||
path = FindImage(wPreferences.icon_path, 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);
|
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);
|
image = wIconValidateIconSize(scr, image, wPreferences.icon_size);
|
||||||
scr->def_icon_pixmap = makeIcon(scr, image, False, False, icon->tile_type, icon->highlighted);
|
scr->def_icon_pixmap = makeIcon(scr, image, False, False, icon->tile_type, icon->highlighted);
|
||||||
|
|||||||
Reference in New Issue
Block a user