back to polygonf
git-svn-id: svn://db.shs.com.ru/pip@105 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -15,6 +15,7 @@ FileManager::TileDir::TileDir(): TileList() {
|
||||
|
||||
PIStringList FileManager::TileDir::selectedNames() const {
|
||||
PIStringList ret;
|
||||
PIMutexLocker ml(e_mutex);
|
||||
PIVector<int> sind = selected.toVector();
|
||||
piForeachC (int i, sind)
|
||||
ret << entries[i].name();
|
||||
@@ -67,6 +68,9 @@ bool FileManager::TileDir::keyEvent(PIKbdListener::KeyEvent key) {
|
||||
pass = true;
|
||||
break;
|
||||
case PIKbdListener::Return:
|
||||
{
|
||||
e_mutex.lock();
|
||||
bool ud = false;
|
||||
if (cur < entries.size_s() && cur >= 0) {
|
||||
if (!remote) {
|
||||
//piCout << entries[cur];
|
||||
@@ -77,11 +81,14 @@ bool FileManager::TileDir::keyEvent(PIKbdListener::KeyEvent key) {
|
||||
cur = cp.first;
|
||||
offset = cp.second;
|
||||
selected.clear();
|
||||
updateDir();
|
||||
ud = true;
|
||||
}
|
||||
}
|
||||
pass = true;
|
||||
}
|
||||
e_mutex.unlock();
|
||||
if (ud) updateDir();
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (remote && pass) {
|
||||
@@ -103,6 +110,7 @@ void FileManager::TileDir::unlock() {
|
||||
|
||||
|
||||
void FileManager::TileDir::showReading() {
|
||||
PIMutexLocker ml(e_mutex);
|
||||
cur = -1;
|
||||
offset = 0;
|
||||
entries.clear();
|
||||
@@ -112,6 +120,7 @@ void FileManager::TileDir::showReading() {
|
||||
|
||||
|
||||
void FileManager::TileDir::setContent(const PIVector<PIFile::FileInfo> & l) {
|
||||
PIMutexLocker ml(e_mutex);
|
||||
PIVector<PIFile::FileInfo> el = dir.entries(), fl, dl;
|
||||
entries.clear();
|
||||
if (l.isEmpty()) {
|
||||
@@ -155,6 +164,7 @@ void FileManager::TileDir::updateDir() {
|
||||
void FileManager::TileDir::buildNames() {
|
||||
//if (!enabled) return;
|
||||
lock();
|
||||
PIMutexLocker ml(e_mutex);
|
||||
content.clear();
|
||||
PIChar t;
|
||||
CharFlags cf = 0;
|
||||
|
||||
Reference in New Issue
Block a user