| 653 | } |
| 654 | |
| 655 | void FileSelector::updateNavigationButtons() |
| 656 | { |
| 657 | // Update the state of the go back button: if the navigation-history |
| 658 | // has two elements and the navigation-position isn't the first one. |
| 659 | goBackButton()->setEnabled(navigation_history->size() > 1 && |
| 660 | (navigation_position.isNull() || |
| 661 | navigation_position.getIterator() != navigation_history->begin())); |
| 662 | |
| 663 | // Update the state of the go forward button: if the |
| 664 | // navigation-history has two elements and the navigation-position |
| 665 | // isn't the last one. |
| 666 | goForwardButton()->setEnabled(navigation_history->size() > 1 && |
| 667 | (navigation_position.isNull() || |
| 668 | navigation_position.getIterator() != navigation_history->end()-1)); |
| 669 | |
| 670 | // Update the state of the go up button: if the current-folder isn't |
| 671 | // the root-item. |
| 672 | IFileItem* currentFolder = m_fileList->getCurrentFolder(); |
| 673 | goUpButton()->setEnabled(currentFolder != FileSystemModule::instance()->getRootFileItem()); |
| 674 | } |
| 675 | |
| 676 | void FileSelector::addInNavigationHistory(IFileItem* folder) |
| 677 | { |
nothing calls this directly
no test coverage detected