svn path=/trunk/KDE/kdebase/apps/; revision=679265
void DolphinMainWindow::sortByRating()
{
void DolphinMainWindow::sortByRating()
{
m_activeViewContainer->view()->setSorting(DolphinView::SortByRating);
m_activeViewContainer->view()->setSorting(DolphinView::SortByRating);
}
void DolphinMainWindow::sortByTags()
{
}
void DolphinMainWindow::sortByTags()
{
m_activeViewContainer->view()->setSorting(DolphinView::SortByTags);
m_activeViewContainer->view()->setSorting(DolphinView::SortByTags);
}
void DolphinMainWindow::toggleSortOrder()
}
void DolphinMainWindow::toggleSortOrder()
// If we are sorting by rating, folders and files are citizens of the same
// class. Same if we are sorting by tags.
// If we are sorting by rating, folders and files are citizens of the same
// class. Same if we are sorting by tags.
if ((sortRole() != DolphinView::SortByRating) &&
(sortRole() != DolphinView::SortByTags))
{
if ((sortRole() != DolphinView::SortByRating) &&
(sortRole() != DolphinView::SortByTags))
{
// On our priority, folders go above regular files.
if (leftFileItem->isDir() && !rightFileItem->isDir()) {
return true;
} else if (!leftFileItem->isDir() && rightFileItem->isDir()) {
return false;
}
// On our priority, folders go above regular files.
if (leftFileItem->isDir() && !rightFileItem->isDir()) {
return true;
} else if (!leftFileItem->isDir() && rightFileItem->isDir()) {
return false;
}
// Hidden elements go before visible ones, if they both are
// folders or files.
// Hidden elements go before visible ones, if they both are
// folders or files.