clean NCurse::List class a bit and remove a few redundant functions

This commit is contained in:
Andrzej Rybczak
2009-09-19 01:18:41 +02:00
parent 2f971147b1
commit 3bdb798852
9 changed files with 62 additions and 107 deletions

View File

@@ -125,14 +125,17 @@ void Browser::EnterPressed()
void Browser::SpacePressed()
{
if (w->Empty())
return;
if (Config.space_selects && w->Choice() >= (itsBrowsedDir != "/" ? 1 : 0))
{
w->SelectCurrent();
w->Select(w->Choice(), !w->isSelected());
w->Scroll(wDown);
return;
}
if (w->Empty() || (itsBrowsedDir != "/" && w->Choice() == 0 /* parent dir */))
if (itsBrowsedDir != "/" && w->Choice() == 0 /* parent dir */)
return;
const Item &item = w->Current();