summaryrefslogtreecommitdiffstats
path: root/gui/mainwindow.cpp
diff options
context:
space:
mode:
authorTakSuyu <taksuyu@gmail.com>2013-07-27 12:55:51 -0700
committerTakSuyu <taksuyu@gmail.com>2013-07-27 12:55:51 -0700
commitdc39d093396c9a0ed4f03d81f95fcc8fa5705b65 (patch)
treeb88bf5fa692de82ce3418bdf5c55e9cd9eff37bc /gui/mainwindow.cpp
parent44498f98945b7501486da35c5fdc32f94a2be080 (diff)
parenta7a84d4dbb58565f108cb0886da6cb786e34d10d (diff)
downloadMultiMC-dc39d093396c9a0ed4f03d81f95fcc8fa5705b65.tar
MultiMC-dc39d093396c9a0ed4f03d81f95fcc8fa5705b65.tar.gz
MultiMC-dc39d093396c9a0ed4f03d81f95fcc8fa5705b65.tar.lz
MultiMC-dc39d093396c9a0ed4f03d81f95fcc8fa5705b65.tar.xz
MultiMC-dc39d093396c9a0ed4f03d81f95fcc8fa5705b65.zip
Merge remote-tracking branch 'upstream/master'
Conflicts: gui/mainwindow.cpp
Diffstat (limited to 'gui/mainwindow.cpp')
-rw-r--r--gui/mainwindow.cpp23
1 files changed, 22 insertions, 1 deletions
diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp
index 80f737e3..f9398c8b 100644
--- a/gui/mainwindow.cpp
+++ b/gui/mainwindow.cpp
@@ -43,6 +43,7 @@
#include "gui/lwjglselectdialog.h"
#include "gui/consolewindow.h"
#include "gui/legacymodeditdialog.h"
+#include "gui/instancesettings.h"
#include "kcategorizedview.h"
#include "kcategorydrawer.h"
@@ -130,6 +131,9 @@ MainWindow::MainWindow ( QWidget *parent ) :
view->setModel ( proxymodel );
connect(view, SIGNAL(doubleClicked(const QModelIndex &)),
this, SLOT(instanceActivated(const QModelIndex &)));
+
+ connect(view, SIGNAL(clicked(const QModelIndex &)),
+ this, SLOT(instanceChanged(const QModelIndex &)));
// Load the instances.
instList.loadList();
@@ -417,7 +421,7 @@ void MainWindow::onLoginComplete(LoginResponse response)
{
Q_ASSERT_X(m_activeInst != NULL, "onLoginComplete", "no active instance is set");
- if (!m_activeInst->shouldUpdateGame())
+ if (!m_activeInst->shouldUpdate())
{
launchInstance(m_activeInst, response);
}
@@ -554,3 +558,20 @@ void MainWindow::on_actionChangeInstLWJGLVersion_triggered()
}
}
+
+void MainWindow::on_actionInstanceSettings_triggered()
+{
+ if (view->selectionModel()->selectedIndexes().count() < 1)
+ return;
+
+ Instance *inst = selectedInstance();
+ SettingsObject *s;
+ s = &inst->settings();
+ InstanceSettings settings(s, this);
+ settings.setWindowTitle(QString("Instance settings"));
+ settings.exec();
+}
+
+void MainWindow::instanceChanged(QModelIndex idx) {
+ ui->instanceToolBar->setEnabled(idx.isValid());
+}