TimerPool fixoutManipulator
git-svn-id: svn://db.shs.com.ru/pip@78 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -9,7 +9,16 @@ FileManager::TileDir::TileDir(): TileList() {
|
||||
label_path = 0;
|
||||
selection_mode = TileList::MultiSelection;
|
||||
dir = PIDir::current();
|
||||
resized = remote = false;
|
||||
resized = remote = remote_mode = false;
|
||||
}
|
||||
|
||||
|
||||
PIStringList FileManager::TileDir::selectedNames() const {
|
||||
PIStringList ret;
|
||||
PIVector<int> sind = selected.toVector();
|
||||
piForeachC (int i, sind)
|
||||
ret << entries[i].name();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,11 +27,22 @@ bool FileManager::TileDir::keyEvent(PIKbdListener::KeyEvent key) {
|
||||
PIString nd;
|
||||
switch (key.key) {
|
||||
case 'R': if (!remote) updateDir(); pass = true; break;
|
||||
case PIKbdListener::F5:
|
||||
if (remote_mode) {
|
||||
if (selected.isEmpty())
|
||||
selected << cur;
|
||||
if (!askQuestion("Copy selected files?")) return true;
|
||||
setFocus();
|
||||
actionRequest(remote, Copy, selectedNames());
|
||||
}
|
||||
break;
|
||||
case PIKbdListener::F7:
|
||||
nd = askNewDir();
|
||||
setFocus();
|
||||
if (nd.isEmpty()) return true;
|
||||
if (!remote) {
|
||||
if (remote)
|
||||
actionRequest(remote, MkDir, nd);
|
||||
else {
|
||||
PIDir::make(dir.absolutePath() + PIDir::separator + nd);
|
||||
updateDir();
|
||||
}
|
||||
@@ -37,11 +57,7 @@ bool FileManager::TileDir::keyEvent(PIKbdListener::KeyEvent key) {
|
||||
}
|
||||
setFocus();
|
||||
if (!remote) {
|
||||
PIStringList sl;
|
||||
PIVector<int> sind = selected.toVector();
|
||||
piForeachC (int i, sind)
|
||||
sl << entries[i].name();
|
||||
removeFiles(dir, sl);
|
||||
removeFiles(dir, selectedNames());
|
||||
selected.clear();
|
||||
updateDir();
|
||||
}
|
||||
@@ -210,6 +226,7 @@ FileManager::FileManager(Daemon * d) {
|
||||
panels[i]->key_func = (void*)tileKey_s;
|
||||
panels[i]->setName("file panel " + PIString(i));
|
||||
panels[i]->label_path = plabel;
|
||||
CONNECTU(panels[i], actionRequest, this, actionRequest)
|
||||
panel->addTile(plabel);
|
||||
panel->addTile(panels[i]);
|
||||
panels[i]->updateDir();
|
||||
|
||||
Reference in New Issue
Block a user