summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Flynn <MC42@users.noreply.github.com>2017-01-16 16:42:22 -0500
committerPetr Mrázek <peterix@users.noreply.github.com>2017-01-16 22:42:22 +0100
commit98e17998fe4dd541143de3e1bbc4b267aadb383b (patch)
tree7be0da03813083e231647318e3175c800a0bf6eb
parent944ff256b2d9e271632efacd6e8dd1ea542e869f (diff)
downloadMultiMC-98e17998fe4dd541143de3e1bbc4b267aadb383b.tar
MultiMC-98e17998fe4dd541143de3e1bbc4b267aadb383b.tar.gz
MultiMC-98e17998fe4dd541143de3e1bbc4b267aadb383b.tar.lz
MultiMC-98e17998fe4dd541143de3e1bbc4b267aadb383b.tar.xz
MultiMC-98e17998fe4dd541143de3e1bbc4b267aadb383b.zip
GH-1065 Normalize usage of directory vs folder
-rw-r--r--api/logic/FileSystem.cpp6
-rw-r--r--application/MultiMC.cpp4
-rw-r--r--application/pages/InstanceSettingsPage.ui15
-rw-r--r--application/pages/global/ExternalToolsPage.cpp4
-rw-r--r--application/pages/global/JavaPage.ui13
-rw-r--r--application/pages/global/MultiMCPage.cpp12
6 files changed, 18 insertions, 36 deletions
diff --git a/api/logic/FileSystem.cpp b/api/logic/FileSystem.cpp
index 67bafd28..b3115988 100644
--- a/api/logic/FileSystem.cpp
+++ b/api/logic/FileSystem.cpp
@@ -15,7 +15,7 @@ void ensureExists(const QDir &dir)
{
if (!QDir().mkpath(dir.absolutePath()))
{
- throw FileSystemException("Unable to create directory " + dir.dirName() + " (" +
+ throw FileSystemException("Unable to create folder " + dir.dirName() + " (" +
dir.absolutePath() + ")");
}
}
@@ -265,7 +265,7 @@ QString ResolveExecutable(QString path)
/**
* Normalize path
*
- * Any paths inside the current directory will be normalized to relative paths (to current)
+ * Any paths inside the current folder will be normalized to relative paths (to current)
* Other paths will be made absolute
*/
QString NormalizePath(QString path)
@@ -324,7 +324,7 @@ QString DirNameFromString(QString string, QString inDir)
return dirName;
}
-// Does the directory path contain any '!'? If yes, return true, otherwise false.
+// Does the folder path contain any '!'? If yes, return true, otherwise false.
// (This is a problem for Java)
bool checkProblemticPathJava(QDir folder)
{
diff --git a/application/MultiMC.cpp b/application/MultiMC.cpp
index 8e924d98..6c0c4e5e 100644
--- a/application/MultiMC.cpp
+++ b/application/MultiMC.cpp
@@ -140,7 +140,7 @@ MultiMC::MultiMC(int &argc, char **argv) : QApplication(argc, argv)
// --dir
parser.addOption("dir", applicationDirPath());
parser.addShortOpt("dir", 'd');
- parser.addDocumentation("dir", "use the supplied directory as MultiMC root instead of "
+ parser.addDocumentation("dir", "use the supplied folder as MultiMC root instead of "
"the binary location (use '.' for current)");
// --launch
parser.addOption("launch");
@@ -188,7 +188,7 @@ MultiMC::MultiMC(int &argc, char **argv) : QApplication(argc, argv)
QString binPath = applicationDirPath();
QString adjustedBy;
QString dataPath;
- // change directory
+ // change folder
QString dirParam = args["dir"].toString();
if (!dirParam.isEmpty())
{
diff --git a/application/pages/InstanceSettingsPage.ui b/application/pages/InstanceSettingsPage.ui
index 4a17aa78..adc5a84f 100644
--- a/application/pages/InstanceSettingsPage.ui
+++ b/application/pages/InstanceSettingsPage.ui
@@ -11,16 +11,7 @@
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
- <property name="leftMargin">
- <number>0</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
+ <property name="margin">
<number>0</number>
</property>
<item>
@@ -29,7 +20,7 @@
<enum>QTabWidget::Rounded</enum>
</property>
<property name="currentIndex">
- <number>0</number>
+ <number>2</number>
</property>
<widget class="QWidget" name="minecraftTab">
<attribute name="title">
@@ -413,7 +404,7 @@
<item>
<widget class="QLabel" name="labelCustomCmdsDescription">
<property name="text">
- <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Pre-launch command runs before the instance launches and post-exit command runs after it exits.&lt;/p&gt;&lt;p&gt;Both will be run in MultiMC's working directory with extra environment variables:&lt;/p&gt;&lt;ul style=&quot;margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;&quot;&gt;&lt;li style=&quot; margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;INST_NAME - Name of the instance&lt;/li&gt;&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;INST_ID - ID of the instance&lt;/li&gt;&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;INST_DIR - absolute path of the instance&lt;/li&gt;&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;INST_MC_DIR - absolute path of minecraft&lt;/li&gt;&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;INST_JAVA - java binary used for launch&lt;/li&gt;&lt;li style=&quot; margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;INST_JAVA_ARGS - command-line parameters used for launch&lt;/li&gt;&lt;/ul&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Pre-launch command runs before the instance launches and post-exit command runs after it exits.&lt;/p&gt;&lt;p&gt;Both will be run in MultiMC's working folder with extra environment variables:&lt;/p&gt;&lt;ul style=&quot;margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;&quot;&gt;&lt;li style=&quot; margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;INST_NAME - Name of the instance&lt;/li&gt;&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;INST_ID - ID of the instance&lt;/li&gt;&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;INST_DIR - absolute path of the instance&lt;/li&gt;&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;INST_MC_DIR - absolute path of minecraft&lt;/li&gt;&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;INST_JAVA - java binary used for launch&lt;/li&gt;&lt;li style=&quot; margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;INST_JAVA_ARGS - command-line parameters used for launch&lt;/li&gt;&lt;/ul&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
diff --git a/application/pages/global/ExternalToolsPage.cpp b/application/pages/global/ExternalToolsPage.cpp
index 88540f7e..71de159a 100644
--- a/application/pages/global/ExternalToolsPage.cpp
+++ b/application/pages/global/ExternalToolsPage.cpp
@@ -86,7 +86,7 @@ void ExternalToolsPage::on_jprofilerPathBtn_clicked()
QString error;
do
{
- raw_dir = QFileDialog::getExistingDirectory(this, tr("JProfiler Directory"), raw_dir);
+ raw_dir = QFileDialog::getExistingDirectory(this, tr("JProfiler Folder"), raw_dir);
if (raw_dir.isEmpty())
{
break;
@@ -164,7 +164,7 @@ void ExternalToolsPage::on_mceditPathBtn_clicked()
#warning stuff
raw_dir = QFileDialog::getOpenFileName(this, tr("MCEdit Application"), raw_dir);
#else
- raw_dir = QFileDialog::getExistingDirectory(this, tr("MCEdit Directory"), raw_dir);
+ raw_dir = QFileDialog::getExistingDirectory(this, tr("MCEdit Folder"), raw_dir);
#endif
if (raw_dir.isEmpty())
{
diff --git a/application/pages/global/JavaPage.ui b/application/pages/global/JavaPage.ui
index ba873d34..9023b932 100644
--- a/application/pages/global/JavaPage.ui
+++ b/application/pages/global/JavaPage.ui
@@ -17,16 +17,7 @@
</sizepolicy>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
- <property name="leftMargin">
- <number>0</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
+ <property name="margin">
<number>0</number>
</property>
<item>
@@ -273,7 +264,7 @@
</sizepolicy>
</property>
<property name="text">
- <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Pre-launch command runs before the instance launches and post-exit command runs after it exits. Both will be run in MultiMC's working directory with INST_ID, INST_DIR, and INST_NAME as environment variables.&lt;/p&gt;&lt;p&gt;Wrapper command allows running java using an extra wrapper program (like 'optirun' on Linux)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Pre-launch command runs before the instance launches and post-exit command runs after it exits. Both will be run in MultiMC's working folder with INST_ID, INST_DIR, and INST_NAME as environment variables.&lt;/p&gt;&lt;p&gt;Wrapper command allows running java using an extra wrapper program (like 'optirun' on Linux)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
diff --git a/application/pages/global/MultiMCPage.cpp b/application/pages/global/MultiMCPage.cpp
index de28b58e..728f2dde 100644
--- a/application/pages/global/MultiMCPage.cpp
+++ b/application/pages/global/MultiMCPage.cpp
@@ -99,7 +99,7 @@ bool MultiMCPage::apply()
void MultiMCPage::on_ftbLauncherBrowseBtn_clicked()
{
- QString raw_dir = QFileDialog::getExistingDirectory(this, tr("FTB Launcher Directory"),
+ QString raw_dir = QFileDialog::getExistingDirectory(this, tr("FTB Launcher Folder"),
ui->ftbLauncherBox->text());
QString cooked_dir = FS::NormalizePath(raw_dir);
@@ -112,7 +112,7 @@ void MultiMCPage::on_ftbLauncherBrowseBtn_clicked()
void MultiMCPage::on_ftbBrowseBtn_clicked()
{
QString raw_dir =
- QFileDialog::getExistingDirectory(this, tr("FTB Directory"), ui->ftbBox->text());
+ QFileDialog::getExistingDirectory(this, tr("FTB Folder"), ui->ftbBox->text());
QString cooked_dir = FS::NormalizePath(raw_dir);
// do not allow current dir - it's dirty. Do not allow dirs that don't exist
@@ -124,7 +124,7 @@ void MultiMCPage::on_ftbBrowseBtn_clicked()
void MultiMCPage::on_instDirBrowseBtn_clicked()
{
- QString raw_dir = QFileDialog::getExistingDirectory(this, tr("Instance Directory"),
+ QString raw_dir = QFileDialog::getExistingDirectory(this, tr("Instance Folder"),
ui->instDirTextBox->text());
QString cooked_dir = FS::NormalizePath(raw_dir);
@@ -157,7 +157,7 @@ void MultiMCPage::on_instDirBrowseBtn_clicked()
void MultiMCPage::on_iconsDirBrowseBtn_clicked()
{
- QString raw_dir = QFileDialog::getExistingDirectory(this, tr("Icons Directory"),
+ QString raw_dir = QFileDialog::getExistingDirectory(this, tr("Icons Folder"),
ui->iconsDirTextBox->text());
QString cooked_dir = FS::NormalizePath(raw_dir);
@@ -169,7 +169,7 @@ void MultiMCPage::on_iconsDirBrowseBtn_clicked()
}
void MultiMCPage::on_modsDirBrowseBtn_clicked()
{
- QString raw_dir = QFileDialog::getExistingDirectory(this, tr("Mods Directory"),
+ QString raw_dir = QFileDialog::getExistingDirectory(this, tr("Mods Folder"),
ui->modsDirTextBox->text());
QString cooked_dir = FS::NormalizePath(raw_dir);
@@ -181,7 +181,7 @@ void MultiMCPage::on_modsDirBrowseBtn_clicked()
}
void MultiMCPage::on_lwjglDirBrowseBtn_clicked()
{
- QString raw_dir = QFileDialog::getExistingDirectory(this, tr("LWJGL Directory"),
+ QString raw_dir = QFileDialog::getExistingDirectory(this, tr("LWJGL Folder"),
ui->lwjglDirTextBox->text());
QString cooked_dir = FS::NormalizePath(raw_dir);