Changeset View
Changeset View
Standalone View
Standalone View
krusader/Panel/panelfunc.cpp
Context not available. | |||||
472 | SLOTS->runTerminal(panel->lastLocalPath()); | 472 | SLOTS->runTerminal(panel->lastLocalPath()); | ||
---|---|---|---|---|---|
473 | } | 473 | } | ||
474 | 474 | | |||
475 | void ListPanelFunc::editFile(const QUrl &newFilePath) | 475 | void ListPanelFunc::editFile(const QUrl &filePath) | ||
476 | { | 476 | { | ||
477 | panel->searchBar->hideBarIfSearching(); | 477 | panel->searchBar->hideBarIfSearching(); | ||
478 | 478 | | |||
479 | QUrl editPath; | 479 | QUrl editPath; | ||
480 | if (!newFilePath.isEmpty()) { | 480 | if (!filePath.isEmpty()) { | ||
481 | editPath = newFilePath; | 481 | editPath = filePath; | ||
482 | } else { | 482 | } else { | ||
483 | const QString name = panel->getCurrentName(); | 483 | const QString name = panel->getCurrentName(); | ||
484 | if (name.isNull()) | 484 | if (name.isNull()) | ||
Context not available. | |||||
486 | editPath = files()->getUrl(name); | 486 | editPath = files()->getUrl(name); | ||
487 | } | 487 | } | ||
488 | 488 | | |||
489 | const KFileItem fileToEdit = KFileItem(newFilePath); | 489 | const KFileItem fileToEdit = KFileItem(filePath); | ||
490 | 490 | | |||
491 | if (fileToEdit.isDir()) { | 491 | if (fileToEdit.isDir()) { | ||
492 | KMessageBox::sorry(krMainWindow, i18n("You cannot edit a folder")); | 492 | KMessageBox::sorry(krMainWindow, i18n("You cannot edit a folder")); | ||
Context not available. | |||||
501 | KrViewer::edit(editPath); | 501 | KrViewer::edit(editPath); | ||
502 | } | 502 | } | ||
503 | 503 | | |||
504 | void ListPanelFunc::editNewFile() | 504 | void ListPanelFunc::askEditFile() | ||
505 | { | 505 | { | ||
506 | // ask the user for the filename to edit | 506 | // ask the user for the filename to edit | ||
507 | const QUrl filePath = KChooseDir::getFile(i18n("Enter the filename to edit:"), | 507 | const QUrl filePath = KChooseDir::getFile(i18n("Enter the filename to edit:"), | ||
Context not available. |