diff --git a/krusader/GUI/terminaldock.cpp b/krusader/GUI/terminaldock.cpp --- a/krusader/GUI/terminaldock.cpp +++ b/krusader/GUI/terminaldock.cpp @@ -187,7 +187,7 @@ return true; } if (ke->modifiers() & Qt::ShiftModifier) { - QString path = FileSystem::ensureTrailingSlash(ACTIVE_FUNC->files()->currentDirectory()).toDisplayString(QUrl::PreferLocalFile); + QString path = FileSystem::ensureTrailingSlash(ACTIVE_PANEL->virtualPath()).toDisplayString(QUrl::PreferLocalFile); filename = path + filename; } diff --git a/krusader/KViewer/diskusageviewer.cpp b/krusader/KViewer/diskusageviewer.cpp --- a/krusader/KViewer/diskusageviewer.cpp +++ b/krusader/KViewer/diskusageviewer.cpp @@ -125,6 +125,6 @@ void DiskUsageViewer::slotNewSearch() { - diskUsage->load(ACTIVE_PANEL->func->files()->currentDirectory()); + diskUsage->load(ACTIVE_PANEL->virtualPath()); } diff --git a/krusader/Panel/krpanel.h b/krusader/Panel/krpanel.h --- a/krusader/Panel/krpanel.h +++ b/krusader/Panel/krpanel.h @@ -47,7 +47,7 @@ KrPanel(AbstractPanelManager *manager) : gui(0), func(0), view(0), _manager(manager) {} virtual ~KrPanel() {} - QUrl virtualPath() const; // the current directory path of this panels view + QUrl virtualPath() const; // the current directory path of this panel AbstractPanelManager *manager() { return _manager; } diff --git a/krusader/Panel/listpanel.cpp b/krusader/Panel/listpanel.cpp --- a/krusader/Panel/listpanel.cpp +++ b/krusader/Panel/listpanel.cpp @@ -733,7 +733,7 @@ slotFocusOnMe(); } - if (func->files()->isLocal()) + if (currentUrl.isLocalFile()) _realPath = currentUrl; urlNavigator->setLocationUrl(currentUrl); @@ -891,7 +891,7 @@ KrViewItem *it = view->getCurrentKrViewItem(); if (it->name() == "..") { - newPath = KIO::upUrl(func->files()->currentDirectory()); + newPath = KIO::upUrl(virtualPath()); } else { FileItem *v = func->getFileItem(it); // If it's a directory different from ".." @@ -902,13 +902,13 @@ if (v && KRarcHandler::arcSupported(v->getMime())) { newPath = func->browsableArchivePath(v->getUrl().fileName()); } else { - newPath = func->files()->currentDirectory(); + newPath = virtualPath(); } } } otherPanel()->func->openUrl(newPath); } else { - func->openUrl(otherPanel()->func->files()->currentDirectory()); + func->openUrl(otherPanel()->virtualPath()); } return ; } else diff --git a/krusader/Panel/panelpopup.cpp b/krusader/Panel/panelpopup.cpp --- a/krusader/Panel/panelpopup.cpp +++ b/krusader/Panel/panelpopup.cpp @@ -232,7 +232,7 @@ if (!isHidden()) tree->setFocus(); if (ACTIVE_PANEL) - tree->setCurrentUrl(ACTIVE_PANEL->func->files()->currentDirectory()); + tree->setCurrentUrl(ACTIVE_PANEL->virtualPath()); break; case Preview: stack->setCurrentWidget(viewer); diff --git a/krusader/krslots.cpp b/krusader/krslots.cpp --- a/krusader/krslots.cpp +++ b/krusader/krslots.cpp @@ -279,7 +279,8 @@ } if (full_path) { - QString path = FileSystem::ensureTrailingSlash(ACTIVE_FUNC->files()->currentDirectory()).toDisplayString(QUrl::PreferLocalFile); + const QString path = FileSystem::ensureTrailingSlash(ACTIVE_PANEL->virtualPath()) + .toDisplayString(QUrl::PreferLocalFile); filename = path + filename; } @@ -358,8 +359,8 @@ void KRslots::swapPanels() { - QUrl leftURL = LEFT_PANEL->func->files()->currentDirectory(); - QUrl rightURL = RIGHT_PANEL->func->files()->currentDirectory(); + QUrl leftURL = LEFT_PANEL->virtualPath(); + QUrl rightURL = RIGHT_PANEL->virtualPath(); LEFT_PANEL->func->openUrl(rightURL); RIGHT_PANEL->func->openUrl(leftURL); @@ -475,8 +476,8 @@ KProcess proc; proc << KrServices::fullPathName("kdesu") << "-c" << KrServices::fullPathName("krusader") - + " --left=" + KrServices::quote(LEFT_PANEL->func->files()->currentDirectory().toDisplayString(QUrl::PreferLocalFile)) - + " --right=" + KrServices::quote(RIGHT_PANEL->func->files()->currentDirectory().toDisplayString(QUrl::PreferLocalFile)); + + " --left=" + KrServices::quote(LEFT_PANEL->virtualPath().toDisplayString(QUrl::PreferLocalFile)) + + " --right=" + KrServices::quote(RIGHT_PANEL->virtualPath().toDisplayString(QUrl::PreferLocalFile)); if (!proc.startDetached()) KMessageBox::error(0, i18n("Error executing %1.", proc.program()[0])); @@ -505,7 +506,7 @@ return ; } - QUrl destDir = ACTIVE_PANEL->otherPanel()->func->files()->currentDirectory(); + const QUrl destDir = ACTIVE_PANEL->otherPanel()->virtualPath(); SplitterGUI splitterGUI(MAIN_VIEW, fileURL, destDir); @@ -599,7 +600,7 @@ break; else { commonName = shorter; - baseURL = ACTIVE_FUNC->files()->currentDirectory().adjusted(QUrl::StripTrailingSlash); + baseURL = ACTIVE_PANEL->virtualPath().adjusted(QUrl::StripTrailingSlash); baseURL.setPath(baseURL.path() + '/' + (testFile)); } } @@ -639,8 +640,7 @@ #ifdef SYNCHRONIZER_ENABLED void KRslots::slotSynchronizeDirs(QStringList selected) { - new SynchronizerGUI(0, LEFT_PANEL->func->files()->currentDirectory(), - RIGHT_PANEL->func->files()->currentDirectory(), selected); + new SynchronizerGUI(0, LEFT_PANEL->virtualPath(), RIGHT_PANEL->virtualPath(), selected); } #endif @@ -671,7 +671,7 @@ void KRslots::slotDiskUsage() { - DiskUsageGUI du(ACTIVE_FUNC->files()->currentDirectory(), MAIN_VIEW); + DiskUsageGUI du(ACTIVE_PANEL->virtualPath(), MAIN_VIEW); } void KRslots::applicationStateChanged()