void DolphinPart::slotOpenTerminal()
{
- QString dir(QDir::homePath());
-
- QUrl u(url());
-
- // If the given directory is not local, it can still be the URL of an
- // ioslave using UDS_LOCAL_PATH which to be converted first.
- KIO::StatJob* statJob = KIO::mostLocalUrl(u);
- KJobWidgets::setWindow(statJob, widget());
- statJob->exec();
- u = statJob->mostLocalUrl();
-
- //If the URL is local after the above conversion, set the directory.
- if (u.isLocalFile()) {
- dir = u.toLocalFile();
- }
-
- KToolInvocation::invokeTerminal(QString(), dir);
+ KToolInvocation::invokeTerminal(QString(), KParts::ReadOnlyPart::localFilePath());
}
void DolphinPart::slotFindFile()
m_newFileMenu->checkUpToDate();
m_newFileMenu->setViewShowsHiddenFiles(m_view->hiddenFilesShown());
// And set the files that the menu apply on :
- m_newFileMenu->setPopupFiles(url());
+ m_newFileMenu->setPopupFiles(QList<QUrl>() << url());
}
void DolphinPart::updateStatusBar()
void DolphinPart::createDirectory()
{
m_newFileMenu->setViewShowsHiddenFiles(m_view->hiddenFilesShown());
- m_newFileMenu->setPopupFiles(url());
+ m_newFileMenu->setPopupFiles(QList<QUrl>() << url());
m_newFileMenu->createDirectory();
}