Remove treefiles shortcuts

This commit is contained in:
Roy Qu 2024-03-04 21:11:26 +08:00
parent cbef0d7db3
commit 535dde574b
1 changed files with 6 additions and 18 deletions

View File

@ -2984,25 +2984,19 @@ void MainWindow::createCustomActions()
//Files view //Files view
mFilesView_CreateFolder = createAction( mFilesView_CreateFolder = createAction(
tr("New Folder"), tr("New Folder"),
ui->treeFiles, ui->treeFiles);
Qt::CTRL + Qt::Key_F,
Qt::WidgetShortcut);
connect(mFilesView_CreateFolder, &QAction::triggered, connect(mFilesView_CreateFolder, &QAction::triggered,
this, &MainWindow::onFilesViewCreateFolder); this, &MainWindow::onFilesViewCreateFolder);
mFilesView_CreateFile = createAction( mFilesView_CreateFile = createAction(
tr("New File"), tr("New File"),
ui->treeFiles, ui->treeFiles);
Qt::CTRL + Qt::Key_N,
Qt::WidgetShortcut);
connect(mFilesView_CreateFile, &QAction::triggered, connect(mFilesView_CreateFile, &QAction::triggered,
this, &MainWindow::onFilesViewCreateFile); this, &MainWindow::onFilesViewCreateFile);
mFilesView_Rename = createAction( mFilesView_Rename = createAction(
tr("Rename"), tr("Rename"),
ui->treeFiles, ui->treeFiles);
Qt::CTRL + Qt::Key_R,
Qt::WidgetShortcut);
connect(mFilesView_Rename, &QAction::triggered, connect(mFilesView_Rename, &QAction::triggered,
this, &MainWindow::onFilesViewRename); this, &MainWindow::onFilesViewRename);
@ -3026,26 +3020,20 @@ void MainWindow::createCustomActions()
mFilesView_OpenWithExternal = createAction( mFilesView_OpenWithExternal = createAction(
tr("Open in External Program"), tr("Open in External Program"),
ui->treeFiles, ui->treeFiles);
Qt::CTRL + Qt::Key_O,
Qt::WidgetShortcut);
connect(mFilesView_OpenWithExternal, &QAction::triggered, connect(mFilesView_OpenWithExternal, &QAction::triggered,
this, &MainWindow::onFilesViewOpenWithExternal); this, &MainWindow::onFilesViewOpenWithExternal);
mFilesView_OpenInTerminal = createAction( mFilesView_OpenInTerminal = createAction(
tr("Open in Terminal"), tr("Open in Terminal"),
ui->treeFiles, ui->treeFiles);
Qt::CTRL + Qt::Key_T,
Qt::WidgetShortcut);
mFilesView_OpenInTerminal->setIcon(ui->actionOpen_Terminal->icon()); mFilesView_OpenInTerminal->setIcon(ui->actionOpen_Terminal->icon());
connect(mFilesView_OpenInTerminal, &QAction::triggered, connect(mFilesView_OpenInTerminal, &QAction::triggered,
this, &MainWindow::onFilesViewOpenInTerminal); this, &MainWindow::onFilesViewOpenInTerminal);
mFilesView_OpenInExplorer = createAction( mFilesView_OpenInExplorer = createAction(
tr("Open in Windows Explorer"), tr("Open in Windows Explorer"),
ui->treeFiles, ui->treeFiles);
Qt::CTRL + Qt::Key_E,
Qt::WidgetShortcut);
mFilesView_OpenInExplorer->setIcon(ui->actionOpen_Containing_Folder->icon()); mFilesView_OpenInExplorer->setIcon(ui->actionOpen_Containing_Folder->icon());
connect(mFilesView_OpenInExplorer, &QAction::triggered, connect(mFilesView_OpenInExplorer, &QAction::triggered,
this, &MainWindow::onFilesViewOpenInExplorer); this, &MainWindow::onFilesViewOpenInExplorer);