]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphincolumnview.cpp
Use Xesam ontology instead of NIE. Since Strigi uses Xesam and we have no mapping...
[dolphin.git] / src / dolphincolumnview.cpp
index 7f6b37830ade1f8a3a1de3b58ede98b222b5f8cf..231d86d92f8da006511ed64b3d47102779671b82 100644 (file)
@@ -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)));
 
@@ -176,6 +178,7 @@ void DolphinColumnView::showColumn(const KUrl& url)
         if (column->url() == url) {
             // the column represents already the requested URL, hence activate it
             requestActivation(column);
+            layoutColumns();
             return;
         } else if (!column->url().isParentOf(url)) {
             // the column is no parent of the requested URL, hence
@@ -339,6 +342,7 @@ void DolphinColumnView::resizeEvent(QResizeEvent* event)
     QAbstractItemView::resizeEvent(event);
     layoutColumns();
     updateScrollBar();
+    assureVisibleActiveColumn();
 }
 
 void DolphinColumnView::zoomIn()
@@ -417,8 +421,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);
     }