]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinmainwindow.cpp
* move the "[ ] Show in Groups" checkbox from "View->Sort By" directly to "View"
[dolphin.git] / src / dolphinmainwindow.cpp
index 35c50e88d783c4e776d8ee6af89a363716c3c84b..0accdfcaaecc9c6fe012813a5e848e7ee58a2644 100644 (file)
@@ -98,6 +98,8 @@ DolphinMainWindow::DolphinMainWindow(int id) :
             this, SLOT(slotUndoAvailable(bool)));
     connect(undoManager, SIGNAL(undoTextChanged(const QString&)),
             this, SLOT(slotUndoTextChanged(const QString&)));
+    connect(DolphinSettings::instance().placesModel(), SIGNAL(errorMessage(const QString&)),
+            this, SLOT(slotHandlePlacesError(const QString&)));
 }
 
 DolphinMainWindow::~DolphinMainWindow()
@@ -259,11 +261,11 @@ void DolphinMainWindow::slotShowHiddenFilesChanged()
 
 void DolphinMainWindow::slotCategorizedSortingChanged()
 {
-    KToggleAction* categorizedSortingAction =
-        static_cast<KToggleAction*>(actionCollection()->action("categorized"));
+    KToggleAction* showInGroupsAction =
+        static_cast<KToggleAction*>(actionCollection()->action("show_in_groups"));
     const DolphinView* view = m_activeViewContainer->view();
-    categorizedSortingAction->setChecked(view->categorizedSorting());
-    categorizedSortingAction->setEnabled(view->supportsCategorizedSorting());
+    showInGroupsAction->setChecked(view->categorizedSorting());
+    showInGroupsAction->setEnabled(view->supportsCategorizedSorting());
 }
 
 void DolphinMainWindow::slotSortingChanged(DolphinView::Sorting sorting)
@@ -480,6 +482,14 @@ void DolphinMainWindow::quit()
     close();
 }
 
+void DolphinMainWindow::slotHandlePlacesError(const QString &message)
+{
+    if (!message.isEmpty()) {
+        DolphinStatusBar* statusBar = m_activeViewContainer->statusBar();
+        statusBar->setMessage(message, DolphinStatusBar::Error);
+    }
+}
+
 void DolphinMainWindow::slotHandleJobError(KJob* job)
 {
     if (job->error() != 0) {
@@ -1166,9 +1176,9 @@ void DolphinMainWindow::setupActions()
     sortDescending->setText(i18n("Descending"));
     connect(sortDescending, SIGNAL(triggered()), this, SLOT(toggleSortOrder()));
 
-    KToggleAction* sortCategorized = actionCollection()->add<KToggleAction>("categorized");
-    sortCategorized->setText(i18n("Show in Groups"));
-    connect(sortCategorized, SIGNAL(triggered()), this, SLOT(toggleSortCategorization()));
+    KToggleAction* showInGroups = actionCollection()->add<KToggleAction>("show_in_groups");
+    showInGroups->setText(i18n("Show in Groups"));
+    connect(showInGroups, SIGNAL(triggered()), this, SLOT(toggleSortCategorization()));
 
     KToggleAction* clearInfo = actionCollection()->add<KToggleAction>("clear_info");
     clearInfo->setText(i18n("No Information"));