diff --git a/src/dolphincolumnview.cpp b/src/dolphincolumnview.cpp index d806ad8b2b..7f6b37830a 100644 --- a/src/dolphincolumnview.cpp +++ b/src/dolphincolumnview.cpp @@ -66,8 +66,8 @@ DolphinColumnView::DolphinColumnView(QWidget* parent, DolphinController* control this, SLOT(zoomIn())); connect(controller, SIGNAL(zoomOut()), this, SLOT(zoomOut())); - connect(controller, SIGNAL(showHiddenFilesChanged(bool)), - this, SLOT(slotShowHiddenFilesChanged(bool))); + connect(controller->dolphinView(), SIGNAL(showHiddenFilesChanged()), + this, SLOT(slotShowHiddenFilesChanged())); connect(controller, SIGNAL(showPreviewChanged(bool)), this, SLOT(slotShowPreviewChanged(bool))); connect(controller, SIGNAL(activationChanged(bool)), @@ -409,8 +409,9 @@ void DolphinColumnView::updateColumnsBackground(bool active) } } -void DolphinColumnView::slotShowHiddenFilesChanged(bool show) +void DolphinColumnView::slotShowHiddenFilesChanged() { + const bool show = m_controller->dolphinView()->showHiddenFiles(); foreach (DolphinColumnWidget* column, m_columns) { column->setShowHiddenFiles(show); } diff --git a/src/dolphincolumnview.h b/src/dolphincolumnview.h index f7107265aa..1c972ad39f 100644 --- a/src/dolphincolumnview.h +++ b/src/dolphincolumnview.h @@ -128,7 +128,7 @@ private slots: */ void updateColumnsBackground(bool active); - void slotShowHiddenFilesChanged(bool show); + void slotShowHiddenFilesChanged(); void slotShowPreviewChanged(bool show); private: diff --git a/src/dolphincolumnwidget.cpp b/src/dolphincolumnwidget.cpp index 62e79537e5..c24ae50c20 100644 --- a/src/dolphincolumnwidget.cpp +++ b/src/dolphincolumnwidget.cpp @@ -111,7 +111,8 @@ DolphinColumnWidget::DolphinColumnWidget(QWidget* parent, m_dirLister->setAutoUpdate(true); m_dirLister->setMainWindow(this); m_dirLister->setDelayedMimeTypes(true); - m_dirLister->setShowingDotFiles(m_view->m_controller->showHiddenFiles()); + const bool showHiddenFiles = m_view->m_controller->dolphinView()->showHiddenFiles(); + m_dirLister->setShowingDotFiles(showHiddenFiles); connect(m_dirLister, SIGNAL(newItems(const KFileItemList&)), this, SLOT(generatePreviews(const KFileItemList&))); diff --git a/src/dolphincontroller.cpp b/src/dolphincontroller.cpp index ebd85e0219..bdb97170b4 100644 --- a/src/dolphincontroller.cpp +++ b/src/dolphincontroller.cpp @@ -23,11 +23,9 @@ DolphinController::DolphinController(DolphinView* dolphinView) : QObject(dolphinView), - m_showHiddenFiles(false), m_showPreview(false), m_zoomInPossible(false), m_zoomOutPossible(false), -//m_additionalInfoCount(0), m_url(), m_dolphinView(dolphinView) { @@ -87,14 +85,6 @@ void DolphinController::indicateAdditionalInfoChange(const KFileItemDelegate::In emit additionalInfoChanged(info); } -void DolphinController::setShowHiddenFiles(bool show) -{ - if (m_showHiddenFiles != show) { - m_showHiddenFiles = show; - emit showHiddenFilesChanged(show); - } -} - void DolphinController::setShowPreview(bool show) { if (m_showPreview != show) { @@ -103,14 +93,6 @@ void DolphinController::setShowPreview(bool show) } } -/*void DolphinController::setAdditionalInfoCount(int count) -{ - if (m_additionalInfoCount != count) { - m_additionalInfoCount = count; - emit additionalInfoCountChanged(count); - } -}*/ - void DolphinController::indicateActivationChange(bool active) { emit activationChanged(active); diff --git a/src/dolphincontroller.h b/src/dolphincontroller.h index 6425816a8b..d1b0799bfd 100644 --- a/src/dolphincontroller.h +++ b/src/dolphincontroller.h @@ -66,7 +66,6 @@ class QWidget; * - setUrl() * - setShowHiddenFiles() * - setShowPreview() - * - setAdditionalInfoCount() * - indicateActivationChange() * - triggerZoomIn() * - triggerZoomOut() @@ -160,14 +159,6 @@ public: */ void indicateAdditionalInfoChange(const KFileItemDelegate::InformationList& info); - /** - * Informs the view implementation about a change of the show hidden files - * state and is invoked by the abstract Dolphin view. - * The signal showHiddenFilesChanged() is emitted. - */ - void setShowHiddenFiles(bool show); - bool showHiddenFiles() const; - /** * Informs the view implementation about a change of the show preview * state and is invoked by the abstract Dolphin view. @@ -176,14 +167,6 @@ public: void setShowPreview(bool show); bool showPreview() const; - /** - * Informs the view implementation about a change of the number of - * additional informations and is invoked by the abstract Dolphin view. - * The signal additionalInfoCountChanged() is emitted. - */ - //void setAdditionalInfoCount(int count); - //bool additionalInfoCount() const; - /** * Informs the view implementation about a change of the activation * state and is invoked by the abstract Dolphin view. The signal @@ -307,14 +290,6 @@ signals: */ void additionalInfoChanged(const KFileItemDelegate::InformationList& info); - /** - * Is emitted if the state for showing hidden files has been - * changed to \a show by the abstract Dolphin view. The view - * implementation might connect to this signal if custom - * updates are required in this case. - */ - void showHiddenFilesChanged(bool show); - /** * Is emitted if the state for showing previews has been * changed to \a show by the abstract Dolphin view. @@ -323,14 +298,6 @@ signals: */ void showPreviewChanged(bool show); - /** - * Is emitted if the number of additional informations has been - * changed to \a count by the abstract Dolphin view. - * The view implementation might connect to this signal if custom - * updates are required in this case. - */ - //void additionalInfoCountChanged(int count); - /** * Is emitted if the activation state has been changed to \a active * by the abstract Dolphin view. @@ -374,11 +341,9 @@ signals: void zoomOut(); private: - bool m_showHiddenFiles; bool m_showPreview; bool m_zoomInPossible; bool m_zoomOutPossible; - //int m_additionalInfoCount; KUrl m_url; DolphinView* m_dolphinView; }; @@ -393,21 +358,11 @@ inline const KUrl& DolphinController::url() const return m_url; } -inline bool DolphinController::showHiddenFiles() const -{ - return m_showHiddenFiles; -} - inline bool DolphinController::showPreview() const { return m_showPreview; } -/*inline bool DolphinController::additionalInfoCount() const -{ - return m_additionalInfoCount; -}*/ - inline void DolphinController::setZoomInPossible(bool possible) { m_zoomInPossible = possible; diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp index 085c791fda..c44afb2199 100644 --- a/src/dolphinview.cpp +++ b/src/dolphinview.cpp @@ -253,7 +253,6 @@ void DolphinView::setShowHiddenFiles(bool show) props.setShowHiddenFiles(show); m_dirLister->setShowingDotFiles(show); - m_controller->setShowHiddenFiles(show); emit showHiddenFilesChanged(); loadDirectory(viewPropsUrl, true); @@ -655,7 +654,6 @@ void DolphinView::applyViewProperties(const KUrl& url) const bool showHiddenFiles = props.showHiddenFiles(); if (showHiddenFiles != m_dirLister->showingDotFiles()) { m_dirLister->setShowingDotFiles(showHiddenFiles); - m_controller->setShowHiddenFiles(showHiddenFiles); emit showHiddenFilesChanged(); }