diff options
author | TakSuyu <taksuyu@gmail.com> | 2013-07-06 19:11:24 -0700 |
---|---|---|
committer | TakSuyu <taksuyu@gmail.com> | 2013-07-06 19:11:24 -0700 |
commit | 96cceeafeb7a52e0dd2005677deec0af2fa4db92 (patch) | |
tree | 93708ea1d149d504e92c1ec33add85ecc41b0498 /gui/mainwindow.cpp | |
parent | eb16d977c86844c9562e9bbe2e3dc6f58dddcc04 (diff) | |
download | MultiMC-96cceeafeb7a52e0dd2005677deec0af2fa4db92.tar MultiMC-96cceeafeb7a52e0dd2005677deec0af2fa4db92.tar.gz MultiMC-96cceeafeb7a52e0dd2005677deec0af2fa4db92.tar.lz MultiMC-96cceeafeb7a52e0dd2005677deec0af2fa4db92.tar.xz MultiMC-96cceeafeb7a52e0dd2005677deec0af2fa4db92.zip |
implemented ModEditUI and mapped ModEditUI Buttons for implementation
enabled EditMods button on MainWindowUI
added validation check for renaming instances
Diffstat (limited to 'gui/mainwindow.cpp')
-rw-r--r-- | gui/mainwindow.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 3f0221b2..5336b12c 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -42,6 +42,7 @@ #include "gui/versionselectdialog.h" #include "gui/lwjglselectdialog.h" #include "gui/consolewindow.h" +#include "gui/modeditwindow.h" #include "kcategorizedview.h" #include "kcategorydrawer.h" @@ -313,9 +314,12 @@ void MainWindow::on_actionRenameInstance_triggered() QString name ( inst->name() ); name = QInputDialog::getText ( this, tr ( "Instance name" ), tr ( "Enter a new instance name." ), QLineEdit::Normal, name, &ok ); - //FIXME: dialog should do the validation!!! - if(ok && name.length() && name.length() <= 25) - inst->setName(name); + + if (name.length() > 0) + { + if(ok && name.length() && name.length() <= 25) + inst->setName(name); + } } } @@ -329,6 +333,15 @@ void MainWindow::on_actionViewSelectedInstFolder_triggered() } } +void MainWindow::on_actionEditInstMods_triggered() +{ + Instance* inst = selectedInstance(); + if (inst) + { + ModEditWindow dialog ( this, inst ); + dialog.exec(); + } +} void MainWindow::closeEvent ( QCloseEvent *event ) { |