Remove dup code in wAppIconCreateForDock
authorRodolfo García Peñas (kix) <kix@kix.es>
Tue, 17 Jul 2012 21:28:45 +0000 (17 23:28 +0200)
committerCarlos R. Mafra <crmafra@gmail.com>
Wed, 18 Jul 2012 10:15:31 +0000 (18 11:15 +0100)
Some code in wAppIconCreateForDock() is duplicated with the function
get_default_icon_filename(). It can be removed.

src/appicon.c

index e3672ff..a899d7c 100644 (file)
@@ -128,15 +128,7 @@ WAppIcon *wAppIconCreateForDock(WScreen * scr, char *command, char *wm_instance,
                dicon->wm_instance = wstrdup(wm_instance);
 
        /* Search the icon using instance and class, without default icon */
-       path = wDefaultGetIconFile(wm_instance, wm_class, False);
-       if (!path && command) {
-               wApplicationExtractDirPackIcon(scr, command, wm_instance, wm_class);
-               /* Search again, now with default icon */
-               path = wDefaultGetIconFile(wm_instance, wm_class, True);
-       }
-
-       if (path)
-               path = FindImage(wPreferences.icon_path, path);
+       path = get_default_icon_filename(scr, wm_instance, wm_class, command, False);
 
        dicon->icon = wIconCreateWithIconFile(scr, path, tile);
        if (path)