┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinview.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2007-02-17 10:31:52 +0000
committerPeter Penz <[email protected]>2007-02-17 10:31:52 +0000
commit175fe7ff47ccff39b0e77f80491a9701d025375e (patch)
tree6c2cb040129fbd5050549c970d0219de96808314 /src/dolphinview.cpp
parent86110e2778d6ac5eb4454f58de532cabfcd75dbf (diff)
Cleanup of the URL navigator, so that the DolphinMainWindow and the DolphinView are not used anymore. This will make it easier for us later on when moving the URL navigator outside Dolphin to make it accessable for other parts. Currently the bookmarks are still accessed by DolphinSettings, but this will be cleaned up later...
svn path=/trunk/KDE/kdebase/apps/; revision=634432
Diffstat (limited to 'src/dolphinview.cpp')
-rw-r--r--src/dolphinview.cpp28
1 files changed, 22 insertions, 6 deletions
diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp
index 58c33b250..86b864583 100644
--- a/src/dolphinview.cpp
+++ b/src/dolphinview.cpp
@@ -79,9 +79,18 @@ DolphinView::DolphinView(DolphinMainWindow* mainWindow,
m_topLayout->setSpacing(0);
m_topLayout->setMargin(0);
+ connect(m_mainWindow, SIGNAL(activeViewChanged()),
+ this, SLOT(updateActivationState()));
+
m_urlNavigator = new UrlNavigator(url, this);
connect(m_urlNavigator, SIGNAL(urlChanged(const KUrl&)),
this, SLOT(loadDirectory(const KUrl&)));
+ connect(m_urlNavigator, SIGNAL(urlsDropped(const KUrl::List&, const KUrl&)),
+ this, SLOT(dropUrls(const KUrl::List&, const KUrl&)));
+ connect(m_urlNavigator, SIGNAL(activated()),
+ this, SLOT(requestActivation()));
+ connect(this, SIGNAL(contentsMoved(int, int)),
+ m_urlNavigator, SLOT(storeContentsPosition(int, int)));
m_statusBar = new DolphinStatusBar(this);
@@ -165,7 +174,7 @@ const KUrl& DolphinView::url() const
bool DolphinView::isActive() const
{
- return (mainWindow()->activeView() == this);
+ return m_mainWindow->activeView() == this;
}
void DolphinView::setMode(Mode mode)
@@ -554,11 +563,6 @@ void DolphinView::reload()
startDirLister(m_urlNavigator->url(), true);
}
-void DolphinView::declareViewActive()
-{
- mainWindow()->setActiveView( this );
-}
-
void DolphinView::mouseReleaseEvent(QMouseEvent* event)
{
QWidget::mouseReleaseEvent(event);
@@ -886,9 +890,16 @@ void DolphinView::dropUrls(const KUrl::List& urls,
const KUrl& destination = (directory == 0) ? url() :
directory->url();
+ dropUrls(urls, destination);
+}
+
+void DolphinView::dropUrls(const KUrl::List& urls,
+ const KUrl& destination)
+{
m_mainWindow->dropUrls(urls, destination);
}
+
void DolphinView::updateSorting(DolphinView::Sorting sorting)
{
ViewProperties props(url());
@@ -914,6 +925,11 @@ void DolphinView::emitContentsMoved()
emit contentsMoved(contentsX(), contentsY());
}
+void DolphinView::updateActivationState()
+{
+ m_urlNavigator->setActive(isActive());
+}
+
void DolphinView::createView()
{
// delete current view