void DesktopWindow::onDeleteActivated() { if(FmPathList* paths = selectedFilePaths()) { Settings& settings = static_cast<Application*>(qApp)->settings(); bool shiftPressed = (qApp->keyboardModifiers() & Qt::ShiftModifier ? true : false); if(settings.useTrash() && !shiftPressed) Fm::FileOperation::trashFiles(paths, settings.confirmTrash()); else Fm::FileOperation::deleteFiles(paths, settings.confirmDelete()); fm_path_list_unref(paths); } }
void DesktopWindow::onDeleteActivated() { auto paths = selectedFilePaths(); if(!paths.empty()) { Settings& settings = static_cast<Application*>(qApp)->settings(); bool shiftPressed = (qApp->keyboardModifiers() & Qt::ShiftModifier ? true : false); if(settings.useTrash() && !shiftPressed) { Fm::FileOperation::trashFiles(paths, settings.confirmTrash()); } else { Fm::FileOperation::deleteFiles(paths, settings.confirmDelete()); } } }
void DesktopWindow::onCopyActivated() { auto paths = selectedFilePaths(); if(!paths.empty()) { Fm::copyFilesToClipboard(paths); } }
void DesktopWindow::onCopyActivated() { if(FmPathList* paths = selectedFilePaths()) { Fm::copyFilesToClipboard(paths); fm_path_list_unref(paths); } }