Ecere Software
/
ede
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
af72621
)
libede:FileSystemBox: added FileSystemNode::label
author
Rejean Loyer
<rejean.loyer@gmail.com>
Fri, 16 Sep 2011 11:56:45 +0000
(07:56 -0400)
committer
Rejean Loyer
<rejean.loyer@gmail.com>
Fri, 16 Sep 2011 11:56:45 +0000
(07:56 -0400)
libede/src/FileSystemBox.ec
patch
|
blob
|
history
diff --git
a/libede/src/FileSystemBox.ec
b/libede/src/FileSystemBox.ec
index
aa2d304
..
f21d8a6
100644
(file)
--- a/
libede/src/FileSystemBox.ec
+++ b/
libede/src/FileSystemBox.ec
@@
-600,7
+600,7
@@
private:
if(isRoot)
{
root.type = computer;
if(isRoot)
{
root.type = computer;
- root.
name
= rootName;
+ root.
label
= rootName;
}
list.Sort(nameField, 1);
}
list.Sort(nameField, 1);
@@
-1784,6
+1784,7
@@
public:
int indent;
char * path;
char * name;
int indent;
char * path;
char * name;
+ char * label;
char * extension;
char * info;
DataRow row;
char * extension;
char * info;
DataRow row;
@@
-1800,7
+1801,8
@@
public:
FileSystemNode up;
if(parent)
{
FileSystemNode up;
if(parent)
{
- strcpy(outputPath, name);
+ if(name)
+ strcpy(outputPath, name);
for(up = parent; up; up = up.parent)
{
char temp[MAX_LOCATION];
for(up = parent; up; up = up.parent)
{
char temp[MAX_LOCATION];
@@
-1871,6
+1873,7
@@
public:
}
//if(name)
delete name;
}
//if(name)
delete name;
+ delete label;
delete info;
}
delete info;
}
@@
-1889,7
+1892,7
@@
public:
int len;
int w, h;
//int textOffset;
int len;
int w, h;
//int textOffset;
- char
label
[MAX_FILENAME];
+ char
string
[MAX_FILENAME];
Bitmap icon;
Bitmap icon;
@@
-1904,10
+1907,10
@@
public:
return;
if(info)
return;
if(info)
- sprintf(
label, "%s [%s]",
name, info);
+ sprintf(
string, "%s [%s]", label ? label :
name, info);
else
else
- strcpy(
label,
name);
- len = strlen(
label
);
+ strcpy(
string, label ? label :
name);
+ len = strlen(
string
);
if(!icon)
{
if(!icon)
{
@@
-1919,7
+1922,7
@@
public:
//textOffset = indent * indentSize + (icon ? (icon.width + 4) : 0);
surface.TextOpacity(false);
//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
h = Max(h, 16);
// Draw the current row stipple
@@
-1929,7
+1932,7
@@
public:
surface.Area(xStart - 3, y, xStart + w + 1, y + h - 1);
//surface.WriteTextDots(alignment, x + textOffset, y + 2, width - textOffset, name, strlen(name));
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)
{
if(!guiApp.textMode)
{