X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/08d655c2bc107449ee322f8b826710b7e690950b..c8d8556950005dfd96ebdb41d2f43ad90356367c:/src/views/dolphinviewactionhandler.cpp diff --git a/src/views/dolphinviewactionhandler.cpp b/src/views/dolphinviewactionhandler.cpp index fbace9cd1..caa35230a 100644 --- a/src/views/dolphinviewactionhandler.cpp +++ b/src/views/dolphinviewactionhandler.cpp @@ -69,8 +69,8 @@ void DolphinViewActionHandler::setCurrentView(DolphinView* view) QList)), this, SLOT(slotAdditionalInfoListChanged(QList, QList))); - connect(view, SIGNAL(categorizedSortingChanged(bool)), - this, SLOT(slotCategorizedSortingChanged(bool))); + connect(view, SIGNAL(groupedSortingChanged(bool)), + this, SLOT(slotGroupedSortingChanged(bool))); connect(view, SIGNAL(hiddenFilesShownChanged(bool)), this, SLOT(slotHiddenFilesShownChanged(bool))); connect(view, SIGNAL(sortingChanged(DolphinView::Sorting)), @@ -196,7 +196,7 @@ void DolphinViewActionHandler::createActions() KToggleAction* showInGroups = m_actionCollection->add("show_in_groups"); showInGroups->setText(i18nc("@action:inmenu View", "Show in Groups")); - connect(showInGroups, SIGNAL(triggered(bool)), this, SLOT(toggleSortCategorization(bool))); + connect(showInGroups, SIGNAL(triggered(bool)), this, SLOT(toggleGroupedSorting(bool))); KToggleAction* showHiddenFiles = m_actionCollection->add("show_hidden_files"); showHiddenFiles->setText(i18nc("@action:inmenu View", "Show Hidden Files")); @@ -314,6 +314,9 @@ QString DolphinViewActionHandler::currentViewModeActionName() const return "details"; case DolphinView::CompactView: return "compact"; + default: + Q_ASSERT(false); + break; } return QString(); // can't happen } @@ -339,7 +342,7 @@ void DolphinViewActionHandler::updateViewActions() slotSortOrderChanged(m_currentView->sortOrder()); slotSortFoldersFirstChanged(m_currentView->sortFoldersFirst()); slotAdditionalInfoListChanged(m_currentView->additionalInfoList(), QList()); - slotCategorizedSortingChanged(m_currentView->categorizedSorting()); + slotGroupedSortingChanged(m_currentView->groupedSorting()); slotSortingChanged(m_currentView->sorting()); slotZoomLevelChanged(m_currentView->zoomLevel(), -1); @@ -428,15 +431,15 @@ void DolphinViewActionHandler::slotAdditionalInfoListChanged(const QListsetCategorizedSorting(categorizedSorting); + m_currentView->setGroupedSorting(grouped); } -void DolphinViewActionHandler::slotCategorizedSortingChanged(bool sortCategorized) +void DolphinViewActionHandler::slotGroupedSortingChanged(bool groupedSorting) { QAction* showInGroupsAction = m_actionCollection->action("show_in_groups"); - showInGroupsAction->setChecked(sortCategorized); + showInGroupsAction->setChecked(groupedSorting); } void DolphinViewActionHandler::toggleShowHiddenFiles(bool show) @@ -451,7 +454,6 @@ void DolphinViewActionHandler::slotHiddenFilesShownChanged(bool shown) showHiddenFilesAction->setChecked(shown); } - KToggleAction* DolphinViewActionHandler::iconsModeAction() { KToggleAction* iconsView = m_actionCollection->add("icons"); @@ -480,7 +482,7 @@ KToggleAction* DolphinViewActionHandler::detailsModeAction() detailsView->setText(i18nc("@action:inmenu View Mode", "Details")); detailsView->setToolTip(i18nc("@info", "Details view mode")); detailsView->setShortcut(Qt::CTRL | Qt::Key_3); - detailsView->setIcon(KIcon("view-list-text")); + detailsView->setIcon(KIcon("view-list-tree")); detailsView->setData(QVariant::fromValue(DolphinView::DetailsView)); return detailsView; }