1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 20:38:08 +01:00

Display app name in ballon help of GNUstep apps

Make the balloon help of GNUstep apps' appicons show the app name
instead of GNUstep.
This commit is contained in:
Charles Philip Chan
2013-09-10 17:49:37 -04:00
committed by Carlos R. Mafra
parent 278bf5ee7e
commit 267496c54c

View File

@@ -447,13 +447,26 @@ static void appiconBalloon(WObjDescriptor * object)
return;
}
} else if (aicon->command && aicon->wm_class) {
int len = strlen(aicon->command) + strlen(aicon->wm_class) + 8;
int len;
/* Check to see if it is a GNUstep app */
if (strcmp(aicon->wm_class, "GNUstep") == 0)
len = strlen(aicon->command) + strlen(aicon->wm_instance) + 8;
else
len = strlen(aicon->command) + strlen(aicon->wm_class) + 8;
tmp = wmalloc(len);
/* Check to see if it is a GNUstep App */
if (strcmp(aicon->wm_class, "GNUstep") == 0)
snprintf(tmp, len, "%s\n(%s)", aicon->wm_instance, aicon->command);
else
snprintf(tmp, len, "%s\n(%s)", aicon->wm_class, aicon->command);
scr->balloon->text = tmp;
} else if (aicon->command) {
scr->balloon->text = wstrdup(aicon->command);
} else if (aicon->wm_class) {
/* Check to see if it is a GNUstep App */
if (strcmp(aicon->wm_class, "GNUstep") == 0)
scr->balloon->text = wstrdup(aicon->wm_instance);
else
scr->balloon->text = wstrdup(aicon->wm_class);
} else {
wBalloonHide(scr);