wDefaultGetImage splitted
commit76e8a8f963946311ba054f69350fc77c2ed7799b
authorRodolfo García Peñas (kix) <kix@kix.es>
Tue, 3 Jul 2012 10:00:47 +0000 (3 12:00 +0200)
committerCarlos R. Mafra <crmafra@gmail.com>
Wed, 4 Jul 2012 19:13:54 +0000 (4 21:13 +0200)
tree065a6e37826d5774439d899f790f315380173523
parentf5d845cfadeedce4a848189de01a6c4c95cd7db7
wDefaultGetImage splitted

The function wDefaultGetImage() is splitted in two:

1. get_default_icon_filename(): This function returns the full
   path of an icon. The function searches the icon in the database
   using instance and class.
2. get_default_icon_rimage(): This function returns the RImage for
   a given image path (full path). This function validates the icon
   size, so the icon is fully usable.

The function get_default_icon_filename() now adds the .app icons in the
search (using wApplicationExtractDirPackIcon()). To do it, the command
should be included, because this function searches '"command".app' icons.
Setting the command to NULL, this case is not used.

To do it we need the function wApplicationExtractDirPackIcon() defined
at appicon.c, so we need set the function as non-static and provide their
prototype in appicon.h.

This patch also includes an extra pointer check at wDefaultGetStartWorkspace
to make sure that WDWindowAttributes exists.
src/appicon.c
src/appicon.h
src/wdefaults.c