From cbd718dcfe4cb5a5d62c4a3d1423599645343728 Mon Sep 17 00:00:00 2001 From: "royqh1979@gmail.com" Date: Thu, 24 Feb 2022 16:47:05 +0800 Subject: [PATCH] - enhancement: rename "open folder" to "choose working folder" --- NEWS.md | 2 + RedPandaIDE/RedPandaIDE_zh_CN.ts | 6 +- RedPandaIDE/mainwindow.cpp | 2 +- RedPandaIDE/mainwindow.ui | 163 ++++++++++++++++--------------- RedPandaIDE/vcs/gitmanager.cpp | 3 + 5 files changed, 94 insertions(+), 82 deletions(-) diff --git a/NEWS.md b/NEWS.md index 6bf15963..2b5d37e3 100644 --- a/NEWS.md +++ b/NEWS.md @@ -6,6 +6,8 @@ Red Panda C++ Version 0.14.4 - enhancement: clear history in file -> recent menu - enhancement: close project in project view's context menu - enhancement: auto find compiler sets when run for the first time + - enhancement: git - remotes + - enhancement: rename "open folder" to "choose working folder" Red Panda C++ Version 0.14.3 - fix: wrong code completion font size, when screen dpi changed diff --git a/RedPandaIDE/RedPandaIDE_zh_CN.ts b/RedPandaIDE/RedPandaIDE_zh_CN.ts index 43edd9fe..7e7c49e1 100644 --- a/RedPandaIDE/RedPandaIDE_zh_CN.ts +++ b/RedPandaIDE/RedPandaIDE_zh_CN.ts @@ -4826,7 +4826,6 @@ Are you really want to continue? - Open Folder 打开文件夹 @@ -5440,6 +5439,11 @@ Are you really want to continue? Do you really want to delete it? 你真的要删除它吗? + + + Choose Working Folder + 选择工作文件夹 + diff --git a/RedPandaIDE/mainwindow.cpp b/RedPandaIDE/mainwindow.cpp index 540e96bf..1ce94f4a 100644 --- a/RedPandaIDE/mainwindow.cpp +++ b/RedPandaIDE/mainwindow.cpp @@ -6219,7 +6219,7 @@ void MainWindow::on_treeFiles_doubleClicked(const QModelIndex &index) void MainWindow::on_actionOpen_Folder_triggered() { - QString folder = QFileDialog::getExistingDirectory(this,tr("Open Folder"), + QString folder = QFileDialog::getExistingDirectory(this,tr("Choose Working Folder"), pSettings->environment().currentFolder()); if (!folder.isEmpty()) { setFilesViewRoot(folder); diff --git a/RedPandaIDE/mainwindow.ui b/RedPandaIDE/mainwindow.ui index 70da2610..6ee74f29 100644 --- a/RedPandaIDE/mainwindow.ui +++ b/RedPandaIDE/mainwindow.ui @@ -90,6 +90,85 @@ true + + + + :/icons/images/newlook24/018-copy.png:/icons/images/newlook24/018-copy.png + + + Files + + + + 2 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 2 + + + 0 + + + 0 + + + 2 + + + 0 + + + + + true + + + QComboBox::InsertAtTop + + + + + + + + + + QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked + + + true + + + QAbstractItemView::DragDrop + + + Qt::CopyAction + + + QAbstractItemView::ExtendedSelection + + + false + + + + + @@ -219,85 +298,6 @@ - - - - :/icons/images/newlook24/018-copy.png:/icons/images/newlook24/018-copy.png - - - Files - - - - 2 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 2 - - - 0 - - - 0 - - - 2 - - - 0 - - - - - true - - - QComboBox::InsertAtTop - - - - - - - - - - QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked - - - true - - - QAbstractItemView::DragDrop - - - Qt::CopyAction - - - QAbstractItemView::ExtendedSelection - - - false - - - - - @@ -2550,7 +2550,10 @@ :/icons/images/newlook24/053-open.png:/icons/images/newlook24/053-open.png - Open Folder + Choose Working Folder + + + Choose Working Folder diff --git a/RedPandaIDE/vcs/gitmanager.cpp b/RedPandaIDE/vcs/gitmanager.cpp index d3a12b91..5417831a 100644 --- a/RedPandaIDE/vcs/gitmanager.cpp +++ b/RedPandaIDE/vcs/gitmanager.cpp @@ -22,7 +22,10 @@ void GitManager::createRepository(const QString &folder) contents.append(".git"); contents.append("*.o"); contents.append("*.exe"); + contents.append("*.layout"); +#ifdef Q_OS_LINUX contents.append("*."); +#endif QDir dir(folder); stringsToFile(contents,dir.filePath(".gitignore"));