if(isRoot)
{
root.type = computer;
- root.name = rootName;
+ root.label = rootName;
}
list.Sort(nameField, 1);
int indent;
char * path;
char * name;
+ char * label;
char * extension;
char * info;
DataRow row;
FileSystemNode up;
if(parent)
{
- strcpy(outputPath, name);
+ if(name)
+ strcpy(outputPath, name);
for(up = parent; up; up = up.parent)
{
char temp[MAX_LOCATION];
}
//if(name)
delete name;
+ delete label;
delete info;
}
int len;
int w, h;
//int textOffset;
- char label[MAX_FILENAME];
+ char string[MAX_FILENAME];
Bitmap icon;
return;
if(info)
- sprintf(label, "%s [%s]", name, info);
+ sprintf(string, "%s [%s]", label ? label : name, info);
else
- strcpy(label, name);
- len = strlen(label);
+ strcpy(string, label ? label : name);
+ len = strlen(string);
if(!icon)
{
//textOffset = indent * indentSize + (icon ? (icon.width + 4) : 0);
surface.TextOpacity(false);
- surface.TextExtent(label, len, &w, &h);
+ surface.TextExtent(string, len, &w, &h);
h = Max(h, 16);
// Draw the current row stipple
surface.Area(xStart - 3, y, xStart + w + 1, y + h - 1);
//surface.WriteTextDots(alignment, x + textOffset, y + 2, width - textOffset, name, strlen(name));
- surface.WriteTextDots(alignment, xStart, y + 2, width, label, len);
+ surface.WriteTextDots(alignment, xStart, y + 2, width, string, len);
if(!guiApp.textMode)
{