- enhancement: rename "open folder" to "choose working folder"

This commit is contained in:
royqh1979@gmail.com 2022-02-24 16:47:05 +08:00
parent 0764c9afbc
commit cbd718dcfe
5 changed files with 94 additions and 82 deletions

View File

@ -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

View File

@ -4826,7 +4826,6 @@ Are you really want to continue?</oldsource>
</message>
<message>
<location filename="mainwindow.ui" line="2553"/>
<location filename="mainwindow.cpp" line="6222"/>
<source>Open Folder</source>
<translation></translation>
</message>
@ -5440,6 +5439,11 @@ Are you really want to continue?</oldsource>
<source>Do you really want to delete it?</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6222"/>
<source>Choose Working Folder</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6592"/>
<location filename="mainwindow.cpp" line="6644"/>

View File

@ -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);

View File

@ -90,6 +90,85 @@
<property name="usesScrollButtons">
<bool>true</bool>
</property>
<widget class="QWidget" name="tabFiles">
<attribute name="icon">
<iconset resource="icons.qrc">
<normaloff>:/icons/images/newlook24/018-copy.png</normaloff>:/icons/images/newlook24/018-copy.png</iconset>
</attribute>
<attribute name="title">
<string>Files</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="spacing">
<number>2</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QWidget" name="panelFiles" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_13">
<property name="spacing">
<number>2</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QComboBox" name="cbFilesPath">
<property name="editable">
<bool>true</bool>
</property>
<property name="insertPolicy">
<enum>QComboBox::InsertAtTop</enum>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QTreeView" name="treeFiles">
<property name="editTriggers">
<set>QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked</set>
</property>
<property name="dragEnabled">
<bool>true</bool>
</property>
<property name="dragDropMode">
<enum>QAbstractItemView::DragDrop</enum>
</property>
<property name="defaultDropAction">
<enum>Qt::CopyAction</enum>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::ExtendedSelection</enum>
</property>
<attribute name="headerVisible">
<bool>false</bool>
</attribute>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tabProject">
<attribute name="icon">
<iconset resource="icons.qrc">
@ -219,85 +298,6 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="tabFiles">
<attribute name="icon">
<iconset resource="icons.qrc">
<normaloff>:/icons/images/newlook24/018-copy.png</normaloff>:/icons/images/newlook24/018-copy.png</iconset>
</attribute>
<attribute name="title">
<string>Files</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="spacing">
<number>2</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QWidget" name="panelFiles" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_13">
<property name="spacing">
<number>2</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QComboBox" name="cbFilesPath">
<property name="editable">
<bool>true</bool>
</property>
<property name="insertPolicy">
<enum>QComboBox::InsertAtTop</enum>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QTreeView" name="treeFiles">
<property name="editTriggers">
<set>QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked</set>
</property>
<property name="dragEnabled">
<bool>true</bool>
</property>
<property name="dragDropMode">
<enum>QAbstractItemView::DragDrop</enum>
</property>
<property name="defaultDropAction">
<enum>Qt::CopyAction</enum>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::ExtendedSelection</enum>
</property>
<attribute name="headerVisible">
<bool>false</bool>
</attribute>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tabProblemSet">
<attribute name="icon">
<iconset resource="icons.qrc">
@ -2550,7 +2550,10 @@
<normaloff>:/icons/images/newlook24/053-open.png</normaloff>:/icons/images/newlook24/053-open.png</iconset>
</property>
<property name="text">
<string>Open Folder</string>
<string>Choose Working Folder</string>
</property>
<property name="toolTip">
<string>Choose Working Folder</string>
</property>
</action>
<action name="actionRun_Parameters">

View File

@ -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"));