コード例 #1
0
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);
  }
}
コード例 #2
0
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());
        }
    }
}
コード例 #3
0
void DesktopWindow::onCopyActivated() {
    auto paths = selectedFilePaths();
    if(!paths.empty()) {
        Fm::copyFilesToClipboard(paths);
    }
}
コード例 #4
0
void DesktopWindow::onCopyActivated() {
  if(FmPathList* paths = selectedFilePaths()) {
    Fm::copyFilesToClipboard(paths);
    fm_path_list_unref(paths);
  }
}