]> cloud.milkyroute.net Git - dolphin.git/commitdiff
- fix focus issue in column-view
authorPeter Penz <peter.penz19@gmail.com>
Sat, 29 Aug 2009 19:35:59 +0000 (19:35 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Sat, 29 Aug 2009 19:35:59 +0000 (19:35 +0000)
- minor interface corrections

svn path=/trunk/KDE/kdebase/apps/; revision=1017162

src/dolphincolumnview.h
src/dolphincolumnviewcontainer.cpp
src/dolphincolumnviewcontainer.h
src/dolphinview.cpp

index d2354a9ad5cb8e85834358d9e6bcdadc7ca50a74..c742b46cf65eadccd4a9791e8817a36fe4851af5 100644 (file)
@@ -65,13 +65,13 @@ public:
      * of the shown directory, it does not trigger a loading of the model.
      */
     void setChildUrl(const KUrl& url);
-    const KUrl& childUrl() const;
+    KUrl childUrl() const;
 
     /** Sets the directory URL that is shown inside the column widget. */
     void setUrl(const KUrl& url);
 
     /** Returns the directory URL that is shown inside the column widget. */
-    const KUrl& url() const;
+    KUrl url() const;
 
     /**
      * Updates the background color dependent from the activation state
@@ -149,7 +149,7 @@ inline void DolphinColumnView::setChildUrl(const KUrl& url)
     m_childUrl = url;
 }
 
-inline const KUrl& DolphinColumnView::childUrl() const
+inline KUrl DolphinColumnView::childUrl() const
 {
     return m_childUrl;
 }
@@ -162,7 +162,7 @@ inline void DolphinColumnView::setUrl(const KUrl& url)
     }
 }
 
-inline const KUrl& DolphinColumnView::url() const
+inline KUrl DolphinColumnView::url() const
 {
     return m_url;
 }
index 08de897ab91ed355b2a39b52bb3998c38aec7db6..fb8e5444cf0867abdb3e664d9e1dc2f6fbb2b5c5 100644 (file)
@@ -48,8 +48,8 @@ DolphinColumnViewContainer::DolphinColumnViewContainer(QWidget* parent,
     setFrameShape(QFrame::NoFrame);
     setLayoutDirection(Qt::LeftToRight);
 
-    connect(this, SIGNAL(viewportEntered()),
-            controller, SLOT(emitViewportEntered()));
+    //connect(this, SIGNAL(viewportEntered()),
+    //        controller, SLOT(emitViewportEntered()));
     connect(controller, SIGNAL(activationChanged(bool)),
             this, SLOT(updateColumnsBackground(bool)));
 
@@ -83,12 +83,12 @@ QAbstractItemView* DolphinColumnViewContainer::activeColumn() const
     return m_columns[m_index];
 }
 
-bool DolphinColumnViewContainer::showColumn(const KUrl& url)
+void DolphinColumnViewContainer::showColumn(const KUrl& url)
 {
     if (!rootUrl().isParentOf(url)) {
         removeAllColumns();
         m_columns[0]->setUrl(url);
-        return false;
+        return;
     }
 
     int columnIndex = 0;
@@ -97,7 +97,7 @@ bool DolphinColumnViewContainer::showColumn(const KUrl& url)
             // the column represents already the requested URL, hence activate it
             requestActivation(column);
             layoutColumns();
-            return false;
+            return;
         } else if (!column->url().isParentOf(url)) {
             // the column is no parent of the requested URL, hence
             // just delete all remaining columns
@@ -168,8 +168,6 @@ bool DolphinColumnViewContainer::showColumn(const KUrl& url)
     m_index = columnIndex;
     m_columns[m_index]->setActive(true);
     assureVisibleActiveColumn();
-
-    return true;
 }
 
 void DolphinColumnViewContainer::mousePressEvent(QMouseEvent* event)
index 0d8c87b16017b732aea2f641ebe722aace010ece..10c2905fa597ec8dc73b924dfb179757e08400e9 100644 (file)
@@ -56,7 +56,7 @@ public:
      * Shows the column which represents the URL \a url. If the column
      * is already shown, it gets activated, otherwise it will be created.
      */
-    bool showColumn(const KUrl& url);
+    void showColumn(const KUrl& url);
 
 signals:
     /**
index bae7c40f9c4177caa59848a5bc96098805d69be6..6db79452c56e150d49d61dd2896e8fce1394fb34 100644 (file)
@@ -1302,7 +1302,7 @@ void DolphinView::createView()
     Q_ASSERT(view != 0);
     view->installEventFilter(this);
     view->viewport()->installEventFilter(this);
-    setFocusProxy(view);
+
 
     /* TODO: enable folder expanding again later
 
@@ -1357,6 +1357,7 @@ void DolphinView::createView()
     connect(view->horizontalScrollBar(), SIGNAL(valueChanged(int)),
             this, SLOT(emitContentsMoved()));
 
+    setFocusProxy(m_viewAccessor.layoutTarget());
     m_topLayout->insertWidget(1, m_viewAccessor.layoutTarget());
 }