diff options
| author | Peter Penz <[email protected]> | 2007-10-26 19:02:33 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2007-10-26 19:02:33 +0000 |
| commit | bbf9faa05396d66b3dbe101a0c309459e3ffacb1 (patch) | |
| tree | 2d38fabb1f923be80129cfb22d2da314fa759df6 /src/dolphincolumnview.cpp | |
| parent | c1f27bb620337c7f173fce1dd3097fa3e43c2878 (diff) | |
Simplify DolphinController: don't remember the show-preview state in the controller and add an unnecessary additional signal; instead just read the state from the DolphinView
svn path=/trunk/KDE/kdebase/apps/; revision=729726
Diffstat (limited to 'src/dolphincolumnview.cpp')
| -rw-r--r-- | src/dolphincolumnview.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/dolphincolumnview.cpp b/src/dolphincolumnview.cpp index 7f6b37830..f69dc207e 100644 --- a/src/dolphincolumnview.cpp +++ b/src/dolphincolumnview.cpp @@ -66,13 +66,15 @@ DolphinColumnView::DolphinColumnView(QWidget* parent, DolphinController* control this, SLOT(zoomIn())); connect(controller, SIGNAL(zoomOut()), this, SLOT(zoomOut())); - connect(controller->dolphinView(), SIGNAL(showHiddenFilesChanged()), - this, SLOT(slotShowHiddenFilesChanged())); - connect(controller, SIGNAL(showPreviewChanged(bool)), - this, SLOT(slotShowPreviewChanged(bool))); connect(controller, SIGNAL(activationChanged(bool)), this, SLOT(updateColumnsBackground(bool))); + const DolphinView* view = controller->dolphinView(); + connect(view, SIGNAL(showHiddenFilesChanged()), + this, SLOT(slotShowHiddenFilesChanged())); + connect(view, SIGNAL(showPreviewChanged()), + this, SLOT(slotShowPreviewChanged())); + connect(horizontalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(moveContentHorizontally(int))); @@ -417,8 +419,9 @@ void DolphinColumnView::slotShowHiddenFilesChanged() } } -void DolphinColumnView::slotShowPreviewChanged(bool show) +void DolphinColumnView::slotShowPreviewChanged() { + const bool show = m_controller->dolphinView()->showPreview(); foreach (DolphinColumnWidget* column, m_columns) { column->setShowPreview(show); } |
