]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/views/dolphinviewactionhandler.cpp
Interface cleanups to prepare the return of "grouped sorting"
[dolphin.git] / src / views / dolphinviewactionhandler.cpp
index 87e828dfa8b0851bcf9539f3705a6486f721fb23..f765b4a09edcba0f9dbf696dedf00df787931938 100644 (file)
@@ -57,7 +57,7 @@ void DolphinViewActionHandler::setCurrentView(DolphinView* view)
 
     m_currentView = view;
 
-    connect(view, SIGNAL(modeChanged(DolphinView::Mode, DolphinView::Mode)),
+    connect(view, SIGNAL(modeChanged(DolphinView::Mode,DolphinView::Mode)),
             this, SLOT(updateViewActions()));
     connect(view, SIGNAL(previewsShownChanged(bool)),
             this, SLOT(slotPreviewsShownChanged(bool)));
@@ -70,13 +70,13 @@ void DolphinViewActionHandler::setCurrentView(DolphinView* view)
             this, SLOT(slotAdditionalInfoListChanged(QList<DolphinView::AdditionalInfo>,
                                                      QList<DolphinView::AdditionalInfo>)));
     connect(view, SIGNAL(categorizedSortingChanged(bool)),
-            this, SLOT(slotCategorizedSortingChanged(bool)));
+            this, SLOT(slotGroupedSortingChanged(bool)));
     connect(view, SIGNAL(hiddenFilesShownChanged(bool)),
             this, SLOT(slotHiddenFilesShownChanged(bool)));
     connect(view, SIGNAL(sortingChanged(DolphinView::Sorting)),
             this, SLOT(slotSortingChanged(DolphinView::Sorting)));
-    connect(view, SIGNAL(zoomLevelChanged(int, int)),
-            this, SLOT(slotZoomLevelChanged(int, int)));
+    connect(view, SIGNAL(zoomLevelChanged(int,int)),
+            this, SLOT(slotZoomLevelChanged(int,int)));
 }
 
 DolphinView* DolphinViewActionHandler::currentView()
@@ -106,8 +106,8 @@ void DolphinViewActionHandler::createActions()
     moveToTrash->setText(i18nc("@action:inmenu File", "Move to Trash"));
     moveToTrash->setIcon(KIcon("user-trash"));
     moveToTrash->setShortcut(QKeySequence::Delete);
-    connect(moveToTrash, SIGNAL(triggered(Qt::MouseButtons, Qt::KeyboardModifiers)),
-            this, SLOT(slotTrashActivated(Qt::MouseButtons, Qt::KeyboardModifiers)));
+    connect(moveToTrash, SIGNAL(triggered(Qt::MouseButtons,Qt::KeyboardModifiers)),
+            this, SLOT(slotTrashActivated(Qt::MouseButtons,Qt::KeyboardModifiers)));
 
     KAction* deleteAction = m_actionCollection->addAction("delete");
     deleteAction->setIcon(KIcon("edit-delete"));
@@ -196,7 +196,7 @@ void DolphinViewActionHandler::createActions()
 
     KToggleAction* showInGroups = m_actionCollection->add<KToggleAction>("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<KToggleAction>("show_hidden_files");
     showHiddenFiles->setText(i18nc("@action:inmenu View", "Show Hidden Files"));
@@ -339,7 +339,7 @@ void DolphinViewActionHandler::updateViewActions()
     slotSortOrderChanged(m_currentView->sortOrder());
     slotSortFoldersFirstChanged(m_currentView->sortFoldersFirst());
     slotAdditionalInfoListChanged(m_currentView->additionalInfoList(), QList<DolphinView::AdditionalInfo>());
-    slotCategorizedSortingChanged(m_currentView->categorizedSorting());
+    slotGroupedSortingChanged(m_currentView->groupedSorting());
     slotSortingChanged(m_currentView->sorting());
     slotZoomLevelChanged(m_currentView->zoomLevel(), -1);
 
@@ -428,15 +428,15 @@ void DolphinViewActionHandler::slotAdditionalInfoListChanged(const QList<Dolphin
     }
 }
 
-void DolphinViewActionHandler::toggleSortCategorization(bool categorizedSorting)
+void DolphinViewActionHandler::toggleGroupedSorting(bool grouped)
 {
-    m_currentView->setCategorizedSorting(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 +451,6 @@ void DolphinViewActionHandler::slotHiddenFilesShownChanged(bool shown)
     showHiddenFilesAction->setChecked(shown);
 }
 
-
 KToggleAction* DolphinViewActionHandler::iconsModeAction()
 {
     KToggleAction* iconsView = m_actionCollection->add<KToggleAction>("icons");
@@ -480,7 +479,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;
 }