diff options
| author | David Faure <[email protected]> | 2008-01-21 19:44:36 +0000 |
|---|---|---|
| committer | David Faure <[email protected]> | 2008-01-21 19:44:36 +0000 |
| commit | 3c1efcb738e7ee6a00030f521138f81625e84b96 (patch) | |
| tree | 42e6a2b1cbb562150ebf44d075600abc9412a492 /src/dolphinmainwindow.cpp | |
| parent | e3da86af95dd620f62c1acc245b7bf98769a94fd (diff) | |
Make sort/descending available in dolphinpart
svn path=/trunk/KDE/kdebase/apps/; revision=764445
Diffstat (limited to 'src/dolphinmainwindow.cpp')
| -rw-r--r-- | src/dolphinmainwindow.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 8948a53a9..2e376bc68 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -650,11 +650,7 @@ void DolphinMainWindow::sortByTags() void DolphinMainWindow::toggleSortOrder() { - DolphinView* view = m_activeViewContainer->view(); - const Qt::SortOrder order = (view->sortOrder() == Qt::AscendingOrder) ? - Qt::DescendingOrder : - Qt::AscendingOrder; - view->setSortOrder(order); + m_activeViewContainer->view()->toggleSortOrder(); } void DolphinMainWindow::toggleSortCategorization() @@ -1125,8 +1121,7 @@ void DolphinMainWindow::setupActions() //sortGroup->addAction(sortByRating); //sortGroup->addAction(sortByTags); - KToggleAction* sortDescending = actionCollection()->add<KToggleAction>("descending"); - sortDescending->setText(i18nc("@action:inmenu Sort", "Descending")); + KAction* sortDescending = DolphinView::createSortDescendingAction(actionCollection()); connect(sortDescending, SIGNAL(triggered()), this, SLOT(toggleSortOrder())); KToggleAction* showInGroups = actionCollection()->add<KToggleAction>("show_in_groups"); |
