get_default_icon_filename rewritten
commitc3a1c76b44bbc4dfe2cc13b298a2c4134b5f9a18
authorRodolfo García Peñas (kix) <kix@kix.es>
Sat, 10 Nov 2012 18:25:54 +0000 (10 19:25 +0100)
committerCarlos R. Mafra <crmafra@gmail.com>
Sat, 10 Nov 2012 19:42:24 +0000 (10 19:42 +0000)
treec18338226e2f41bfa4de8cabb6cdc53307372317
parent6bc48464e9dff71ffa74767964e3121b6216735e
get_default_icon_filename rewritten

The function get_default_icon_filename(), now get_icon_filename(),
was working in a bad way. Before this patch, the function always
searched the default icon in the second search:

-     file_name = wDefaultGetIconFile(winstance, wclass, True);
+     file_name = wDefaultGetIconFile(winstance, wclass, False);

For this reason, the argument default_icon didn't work.

This patch change it. Now, if the default_icon is false, the function
can return NULL, then other functions can do the correct work. For
example, now wDefaultGetImage() doesn't need do nothing, because the
default_icon is set to True. get_icon_filename() checks if the
icon exists in the disk before returning it (except for default icon
in get_default_image_path(scr).
src/defaults.h
src/dialog.c
src/icon.c
src/wdefaults.c