mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-21 21:38:00 +01:00
Remove code duplication by calling get_name_for_instance_class()
The code in application.c to create the icon name is included in icon.c (function get_name_for_instance_class).
This commit is contained in:
committed by
Carlos R. Mafra
parent
cedf620543
commit
7f022f1c8f
@@ -114,25 +114,8 @@ void wApplicationSaveIconPathFor(char *iconPath, char *wm_instance, char *wm_cla
|
||||
WMPropList *adict, *key, *iconk;
|
||||
WMPropList *val;
|
||||
char *tmp;
|
||||
int i;
|
||||
|
||||
i = 0;
|
||||
if (wm_instance)
|
||||
i += strlen(wm_instance);
|
||||
if (wm_class)
|
||||
i += strlen(wm_class);
|
||||
|
||||
tmp = wmalloc(i + 8);
|
||||
*tmp = 0;
|
||||
if (wm_class && wm_instance) {
|
||||
sprintf(tmp, "%s.%s", wm_instance, wm_class);
|
||||
} else {
|
||||
if (wm_instance)
|
||||
strcat(tmp, wm_instance);
|
||||
if (wm_class)
|
||||
strcat(tmp, wm_class);
|
||||
}
|
||||
|
||||
tmp = get_name_for_instance_class(wm_instance, wm_class);
|
||||
key = WMCreatePLString(tmp);
|
||||
wfree(tmp);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user