WMaker: removed unnecessary case handling in appicon setting

The function wIconChooserDialog already makes sure that it returns
NULL if its result would have been an empty string, so it is not
necessary to re-check this in setIconCallback, this leads to
more complicated code and can't be optimised by the compiler.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
Christophe CURIS authored and Carlos R. Mafra committed 2014-05-20 21:29:57 +01:00
1 parent fab73f47c7
commit 3a68e974b6
1 file changed
-4
-4
View File
@@ -535,10 +535,6 @@ static void setIconCallback(WMenu *menu, WMenuEntry *entry)
result = wIconChooserDialog(scr, &file, icon->wm_instance, icon->wm_class);
if (result && !icon->destroyed) {
if (file && *file == 0) {
wfree(file);
file = NULL;
}
if (!wIconChangeImageFile(icon->icon, file)) {
wMessageDialog(scr, _("Error"),
_("Could not open specified icon file"), _("OK"), NULL, NULL);