summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
authorAndrew <forkk@forkk.net>2013-02-19 12:15:22 -0600
committerAndrew <forkk@forkk.net>2013-02-19 12:15:22 -0600
commit6e5017e48b633e20bbba61ac2e7cd58e693aec4e (patch)
treef0027822d84123951fa56ffbb7591b33f297e11b /gui
parent80cd8b33aa12933392bd2293a5e91ae696dbe6be (diff)
downloadMultiMC-6e5017e48b633e20bbba61ac2e7cd58e693aec4e.tar
MultiMC-6e5017e48b633e20bbba61ac2e7cd58e693aec4e.tar.gz
MultiMC-6e5017e48b633e20bbba61ac2e7cd58e693aec4e.tar.lz
MultiMC-6e5017e48b633e20bbba61ac2e7cd58e693aec4e.tar.xz
MultiMC-6e5017e48b633e20bbba61ac2e7cd58e693aec4e.zip
Implemented loadList() stuff.
Diffstat (limited to 'gui')
-rw-r--r--gui/mainwindow.cpp9
-rw-r--r--gui/mainwindow.h4
2 files changed, 7 insertions, 6 deletions
diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp
index bc0840a0..d19d69dc 100644
--- a/gui/mainwindow.cpp
+++ b/gui/mainwindow.cpp
@@ -29,6 +29,7 @@
#include "gui/logindialog.h"
#include "gui/taskdialog.h"
+#include "data/inst/instancelist.h"
#include "data/appsettings.h"
#include "data/version.h"
@@ -36,7 +37,8 @@
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
- ui(new Ui::MainWindow)
+ ui(new Ui::MainWindow),
+ instList(settings->getInstanceDir())
{
ui->setupUi(this);
@@ -45,8 +47,7 @@ MainWindow::MainWindow(QWidget *parent) :
restoreGeometry(settings->getConfig().value("MainWindowGeometry", saveGeometry()).toByteArray());
restoreState(settings->getConfig().value("MainWindowState", saveState()).toByteArray());
- instList.initialLoad("instances");
- ui->instanceView->setModel(&instList);
+ instList.loadList();
}
MainWindow::~MainWindow()
@@ -67,7 +68,7 @@ void MainWindow::on_actionViewInstanceFolder_triggered()
void MainWindow::on_actionRefresh_triggered()
{
- instList.initialLoad("instances");
+ instList.loadList();
}
void MainWindow::on_actionViewCentralModsFolder_triggered()
diff --git a/gui/mainwindow.h b/gui/mainwindow.h
index 28ca341a..d286bd0e 100644
--- a/gui/mainwindow.h
+++ b/gui/mainwindow.h
@@ -18,7 +18,7 @@
#include <QMainWindow>
-#include "data/instancemodel.h"
+#include "data/inst/instancelist.h"
#include "data/loginresponse.h"
namespace Ui
@@ -70,7 +70,7 @@ private slots:
private:
Ui::MainWindow *ui;
- InstanceModel instList;
+ InstanceList instList;
};
#endif // MAINWINDOW_H