mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-22 22:28:02 +01:00
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).
This commit is contained in:
committed by
Carlos R. Mafra
parent
6bc48464e9
commit
c3a1c76b44
@@ -50,7 +50,7 @@ RImage * wDefaultGetImage(WScreen *scr, char *winstance, char *wclass, int max_s
|
||||
int wDefaultGetStartWorkspace(WScreen *scr, char *instance, char *class);
|
||||
void wDefaultChangeIcon(WScreen *scr, char *instance, char* class, char *file);
|
||||
RImage *get_default_image(WScreen *scr);
|
||||
char *get_default_icon_filename(WScreen *scr, char *winstance, char *wclass, char *command,
|
||||
Bool default_icon);
|
||||
char *get_icon_filename(WScreen *scr, char *winstance, char *wclass, char *command,
|
||||
Bool default_icon);
|
||||
RImage *get_rimage_from_file(WScreen *scr, char *file_name, int max_size);
|
||||
#endif /* WMDEFAULTS_H_ */
|
||||
|
||||
Reference in New Issue
Block a user