From: "Rodolfo García Peñas (kix)" <k...@kix.es>

This patch removes the code dup at get_default_image. Now,
this function calls get_rimage_from_file()
---
 src/icon.c |   16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/src/icon.c b/src/icon.c
index b4ccfc5..da93679 100644
--- a/src/icon.c
+++ b/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 {
+               image = get_rimage_from_file(scr, path, wPreferences.icon_size);
+
+               if (!image)
                        wwarning(_("could not find default icon \"%s\""), file);
-               }
-       }
 
-       /* Validate the icon size */
-       image = wIconValidateIconSize(image, wPreferences.icon_size);
+               wfree(file);
+       }
 
        return image;
 }
-- 
1.7.10.4


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Reply via email to