From 33b9b25da7d3d29f949c9418295de257d437c9f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 14 Jul 2013 18:33:31 +0200 Subject: More work on the downloader and 1.6 instance creation --- gui/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gui/mainwindow.cpp') diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 5336b12c..8ba988c5 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -416,7 +416,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); } -- cgit v1.2.3 From ce253ded0e0d2ae90a971c2e074d561f5e7baeb2 Mon Sep 17 00:00:00 2001 From: Stiepen Date: Sun, 14 Jul 2013 20:26:53 +0200 Subject: Added Per-Instance settings --- gui/mainwindow.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'gui/mainwindow.cpp') diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 8ba988c5..0b592cf0 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -553,3 +553,19 @@ 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 = new InstanceSettings (this); + settings->loadSettings(s); + if (settings->exec()) { + settings->applySettings(s); + } + delete settings; +} -- cgit v1.2.3 From b5450042b5f9ddaad7585f644591b7d009aeb5cb Mon Sep 17 00:00:00 2001 From: Stiepen Date: Sun, 14 Jul 2013 22:01:30 +0200 Subject: Broke instance loading(?), also attempted to make Toolbar grayed out when no instance is selected. For debug purposes it is initially not grayed out --- gui/mainwindow.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gui/mainwindow.cpp') diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 0b592cf0..4326431e 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -43,6 +43,7 @@ #include "gui/lwjglselectdialog.h" #include "gui/consolewindow.h" #include "gui/modeditwindow.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(); @@ -563,9 +567,14 @@ void MainWindow::on_actionInstanceSettings_triggered() SettingsObject *s; s = &inst->settings(); InstanceSettings *settings = new InstanceSettings (this); + settings->setWindowTitle(QString("Instance settings")); settings->loadSettings(s); if (settings->exec()) { settings->applySettings(s); } delete settings; } + +void MainWindow::instanceChanged(QModelIndex idx) { + ui->instanceToolBar->setEnabled(idx.isValid()); +} -- cgit v1.2.3 From e2ee6d6d254285284f07b07cb60409fbda0bf7ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Tue, 16 Jul 2013 00:30:32 +0200 Subject: Finalize the instance settings dialog, add setting reset mechanism --- gui/mainwindow.cpp | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'gui/mainwindow.cpp') diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 4326431e..4bf38424 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -560,19 +560,15 @@ 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 = new InstanceSettings (this); - settings->setWindowTitle(QString("Instance settings")); - settings->loadSettings(s); - if (settings->exec()) { - settings->applySettings(s); - } - delete settings; + 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) { -- cgit v1.2.3