┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dolphiniconsview.cpp7
-rw-r--r--src/dolphiniconsview.h2
-rw-r--r--src/dolphinview.cpp12
3 files changed, 15 insertions, 6 deletions
diff --git a/src/dolphiniconsview.cpp b/src/dolphiniconsview.cpp
index d9bfef8a4..3da04c113 100644
--- a/src/dolphiniconsview.cpp
+++ b/src/dolphiniconsview.cpp
@@ -19,6 +19,7 @@
#include "dolphiniconsview.h"
+#include "dolphincategorydrawer.h"
#include "dolphincontroller.h"
#include "dolphinsettings.h"
@@ -34,6 +35,7 @@
DolphinIconsView::DolphinIconsView(QWidget* parent, DolphinController* controller) :
KCategorizedView(parent),
m_controller(controller),
+ m_categoryDrawer(0),
m_itemSize(),
m_dragging(false),
m_dropRect()
@@ -92,10 +94,15 @@ DolphinIconsView::DolphinIconsView(QWidget* parent, DolphinController* controlle
m_viewOptions.decorationPosition = QStyleOptionViewItem::Left;
m_viewOptions.displayAlignment = Qt::AlignLeft | Qt::AlignVCenter;
}
+
+ m_categoryDrawer = new DolphinCategoryDrawer();
+ setCategoryDrawer(m_categoryDrawer);
}
DolphinIconsView::~DolphinIconsView()
{
+ delete m_categoryDrawer;
+ m_categoryDrawer = 0;
}
QRect DolphinIconsView::visualRect(const QModelIndex& index) const
diff --git a/src/dolphiniconsview.h b/src/dolphiniconsview.h
index 592137e54..69481eb7f 100644
--- a/src/dolphiniconsview.h
+++ b/src/dolphiniconsview.h
@@ -28,6 +28,7 @@
#include <libdolphin_export.h>
class DolphinController;
+class DolphinCategoryDrawer;
/**
* @brief Represents the view, where each item is shown as an icon.
@@ -81,6 +82,7 @@ private:
private:
DolphinController* m_controller;
+ DolphinCategoryDrawer* m_categoryDrawer;
QStyleOptionViewItem m_viewOptions;
QSize m_itemSize;
diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp
index e0a3df51e..73b44e6fb 100644
--- a/src/dolphinview.cpp
+++ b/src/dolphinview.cpp
@@ -51,7 +51,6 @@
#include "viewproperties.h"
#include "dolphinsettings.h"
#include "dolphin_generalsettings.h"
-#include "dolphincategorydrawer.h"
DolphinView::DolphinView(QWidget* parent,
const KUrl& url,
@@ -805,25 +804,26 @@ void DolphinView::createView()
// ... and recreate it representing the current mode
switch (m_mode) {
case IconsView: {
- const KUrl viewPropsUrl = viewPropertiesUrl();
- const ViewProperties props(viewPropsUrl);
-
m_iconsView = new DolphinIconsView(this, m_controller);
- m_iconsView->setCategoryDrawer(new DolphinCategoryDrawer());
view = m_iconsView;
- setCategorizedSorting(props.categorizedSorting());
break;
}
case DetailsView:
m_detailsView = new DolphinDetailsView(this, m_controller);
view = m_detailsView;
+
+ // categorized sorting is not supported yet for the details
+ // view, even if the view properties indicate this
setCategorizedSorting(false);
break;
case ColumnView:
m_columnView = new DolphinColumnView(this, m_controller);
view = m_columnView;
+
+ // categorized sorting is not supported yet for the column
+ // view, even if the view properties indicate this
setCategorizedSorting(false);
break;
}