|
|
@ -381,14 +381,30 @@ FileListView::contentsMouseMoveEvent(TQMouseEvent *e)
|
|
|
|
FileLVI*
|
|
|
|
FileLVI*
|
|
|
|
FileListView::item(const TQString& filename) const
|
|
|
|
FileListView::item(const TQString& filename) const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
if (filename.isEmpty()) {
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TQStringList pathList = TQStringList::split( '/', filename );
|
|
|
|
|
|
|
|
|
|
|
|
FileLVI * flvi = (FileLVI*) firstChild();
|
|
|
|
FileLVI * flvi = (FileLVI*) firstChild();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// File path iterator
|
|
|
|
|
|
|
|
TQStringList::ConstIterator pathIt = pathList.begin(), pathEnd = pathList.end();
|
|
|
|
|
|
|
|
// Iterate over the current tree level siblings
|
|
|
|
while (flvi)
|
|
|
|
while (flvi)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQString curFilename = flvi->fileName();
|
|
|
|
if (flvi->fileName() == *pathIt || flvi->fileName() == (*pathIt).stripWhiteSpace()) {
|
|
|
|
if (curFilename == filename)
|
|
|
|
++pathIt;
|
|
|
|
return flvi;
|
|
|
|
if (pathIt != pathEnd) {
|
|
|
|
flvi = (FileLVI*) flvi->nextSibling();
|
|
|
|
flvi = (FileLVI*) flvi->firstChild();
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
return flvi;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
flvi = (FileLVI*) flvi->nextSibling();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|