rem: ERROR_PANEL("Can not delete %s.");
add: showError(scr, panel->win, "Can not delete '%s'.", file);
context: deleteFile(WMButton *bPre, WMFilePanel *panel){    char *file;    char *buffer;    char *err_str;    WMFilePanel *deletePanel;    file = getCurrentFileName(panel);    if (file[strlen(file)-1] == '/') {        ERROR_PANEL("%s is a directory.");        free(err_str);        free(file);        return;    }    buffer = wmalloc(strlen(file)+15);    sprintf(buffer,"Delete file %s ?\x0",file);    if (!WMRunAlertPanel(WMWidgetScreen(panel->win), panel->win,                "Warning", buffer, "OK", "Cancel", NULL)) {        int rem_stat;        if (rem_stat = remove(file)) {            switch (errno) {                case EISDIR:                    ERROR_PANEL("%s is a directory.");                    break;                case ENOENT:                    ERROR_PANEL("%s does not exist.");                    break;                case EACCES:                    ERROR_PANEL("Permission denied.");                    break;                case ENOMEM:                    ERROR_PANEL("Insufficient kernel memory was available.");                    break;                case EROFS:                    ERROR_PANEL("%s refers to a file on a read-only filesystem.");                    break;                default:                    ERROR_PANEL("Can not delete %s.");            }            free(err_str);        }        else {            char *s = strrchr(file,'/');            if (s) s[1] = 0;            WMSetFilePanelDirectory(panel, file);        }    }    free(buffer);    free(file);}