Changeset View
Changeset View
Standalone View
Standalone View
src/dolphinpart.cpp
Show First 20 Lines • Show All 527 Lines • ▼ Show 20 Line(s) | 527 | { | |||
---|---|---|---|---|---|
528 | // This is the "/home/dfaure/*.diff" kind of name filter (KDirLister::setNameFilter) | 528 | // This is the "/home/dfaure/*.diff" kind of name filter (KDirLister::setNameFilter) | ||
529 | // which is unrelated to DolphinView::setNameFilter which is substring filtering in a proxy. | 529 | // which is unrelated to DolphinView::setNameFilter which is substring filtering in a proxy. | ||
530 | m_nameFilter = nameFilter; | 530 | m_nameFilter = nameFilter; | ||
531 | // TODO save/restore name filter in saveState/restoreState like KonqDirPart did in kde3? | 531 | // TODO save/restore name filter in saveState/restoreState like KonqDirPart did in kde3? | ||
532 | } | 532 | } | ||
533 | 533 | | |||
534 | void DolphinPart::slotOpenTerminal() | 534 | void DolphinPart::slotOpenTerminal() | ||
535 | { | 535 | { | ||
536 | QString dir(QDir::homePath()); | 536 | KToolInvocation::invokeTerminal(QString(), KParts::ReadOnlyPart::localFilePath()); | ||
537 | | ||||
538 | QUrl u(url()); | | |||
539 | | ||||
540 | // If the given directory is not local, it can still be the URL of an | | |||
541 | // ioslave using UDS_LOCAL_PATH which to be converted first. | | |||
542 | KIO::StatJob* statJob = KIO::mostLocalUrl(u); | | |||
543 | KJobWidgets::setWindow(statJob, widget()); | | |||
544 | statJob->exec(); | | |||
545 | u = statJob->mostLocalUrl(); | | |||
546 | | ||||
547 | //If the URL is local after the above conversion, set the directory. | | |||
548 | if (u.isLocalFile()) { | | |||
549 | dir = u.toLocalFile(); | | |||
550 | } | | |||
551 | | ||||
552 | KToolInvocation::invokeTerminal(QString(), dir); | | |||
553 | } | 537 | } | ||
554 | 538 | | |||
555 | void DolphinPart::slotFindFile() | 539 | void DolphinPart::slotFindFile() | ||
556 | { | 540 | { | ||
557 | QMenu searchTools; | 541 | QMenu searchTools; | ||
558 | KMoreToolsMenuFactory("dolphin/search-tools").fillMenuFromGroupingNames( | 542 | KMoreToolsMenuFactory("dolphin/search-tools").fillMenuFromGroupingNames( | ||
559 | &searchTools, { "files-find" }, QUrl::fromLocalFile(KParts::ReadOnlyPart::localFilePath()) | 543 | &searchTools, { "files-find" }, QUrl::fromLocalFile(KParts::ReadOnlyPart::localFilePath()) | ||
560 | ); | 544 | ); | ||
▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines |