Changeset View
Changeset View
Standalone View
Standalone View
krusader/Panel/panelfunc.cpp
Show First 20 Lines • Show All 450 Lines • ▼ Show 20 Line(s) | 438 | { | |||
---|---|---|---|---|---|
451 | // call KViewer. | 451 | // call KViewer. | ||
452 | KrViewer::view(files()->getUrl(fileName)); | 452 | KrViewer::view(files()->getUrl(fileName)); | ||
453 | // nothing more to it! | 453 | // nothing more to it! | ||
454 | } | 454 | } | ||
455 | 455 | | |||
456 | void ListPanelFunc::viewDlg() | 456 | void ListPanelFunc::viewDlg() | ||
457 | { | 457 | { | ||
458 | // ask the user for a url to view | 458 | // ask the user for a url to view | ||
459 | QUrl dest = KChooseDir::getFile(i18n("Enter a URL to view:"), panel->virtualPath(), panel->virtualPath()); | 459 | QUrl dest = KChooseDir::getFile(i18n("Enter a URL to view:"), QUrl(panel->getCurrentName()), panel->virtualPath()); | ||
460 | if (dest.isEmpty()) | 460 | if (dest.isEmpty()) | ||
461 | return ; // the user canceled | 461 | return ; // the user canceled | ||
462 | 462 | | |||
463 | KrViewer::view(dest); // view the file | 463 | KrViewer::view(dest); // view the file | ||
464 | } | 464 | } | ||
465 | 465 | | |||
466 | void ListPanelFunc::terminal() | 466 | void ListPanelFunc::terminal() | ||
467 | { | 467 | { | ||
Show All 30 Lines | |||||
498 | } | 498 | } | ||
499 | 499 | | |||
500 | void ListPanelFunc::editNew() | 500 | void ListPanelFunc::editNew() | ||
501 | { | 501 | { | ||
502 | if(!fileToCreate.isEmpty()) | 502 | if(!fileToCreate.isEmpty()) | ||
503 | return; | 503 | return; | ||
504 | 504 | | |||
505 | // ask the user for the filename to edit | 505 | // ask the user for the filename to edit | ||
506 | fileToCreate = KChooseDir::getFile(i18n("Enter the filename to edit:"), panel->virtualPath(), panel->virtualPath()); | 506 | fileToCreate = KChooseDir::getFile(i18n("Enter the filename to edit:"), QUrl(panel->getCurrentName()), panel->virtualPath()); | ||
507 | if(fileToCreate.isEmpty()) | 507 | if(fileToCreate.isEmpty()) | ||
508 | return ; // the user canceled | 508 | return ; // the user canceled | ||
509 | 509 | | |||
510 | // if the file exists, edit it instead of creating a new one | 510 | // if the file exists, edit it instead of creating a new one | ||
511 | QFile f(fileToCreate.toLocalFile()); | 511 | QFile f(fileToCreate.toLocalFile()); | ||
512 | 512 | | |||
513 | if(f.exists()) { | 513 | if(f.exists()) { | ||
514 | edit(); | 514 | edit(); | ||
▲ Show 20 Lines • Show All 772 Lines • Show Last 20 Lines |