diff options
author | Petr Mrázek <peterix@gmail.com> | 2014-06-28 17:07:08 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2014-06-28 17:07:08 +0200 |
commit | e8731c5d013e67ee0153d5a49b38b0e914d14aa0 (patch) | |
tree | ab3611681ec35ea8f10aa7b9a7770c1356b3ef22 /gui/MainWindow.cpp | |
parent | 30b1f5e5cf935689fc628e37016e650655153d00 (diff) | |
download | MultiMC-e8731c5d013e67ee0153d5a49b38b0e914d14aa0.tar MultiMC-e8731c5d013e67ee0153d5a49b38b0e914d14aa0.tar.gz MultiMC-e8731c5d013e67ee0153d5a49b38b0e914d14aa0.tar.lz MultiMC-e8731c5d013e67ee0153d5a49b38b0e914d14aa0.tar.xz MultiMC-e8731c5d013e67ee0153d5a49b38b0e914d14aa0.zip |
Turn screenshot management into a page.
Diffstat (limited to 'gui/MainWindow.cpp')
-rw-r--r-- | gui/MainWindow.cpp | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/gui/MainWindow.cpp b/gui/MainWindow.cpp index e5c7dbb1..bee250c4 100644 --- a/gui/MainWindow.cpp +++ b/gui/MainWindow.cpp @@ -63,7 +63,6 @@ #include "gui/dialogs/UpdateDialog.h" #include "gui/dialogs/EditAccountDialog.h" #include "gui/dialogs/NotificationDialog.h" -#include "dialogs/ScreenshotDialog.h" #include "gui/ConsoleWindow.h" #include "pagedialog/PageDialog.h" @@ -969,6 +968,12 @@ void MainWindow::on_actionEditInstance_triggered() ShowPageDialog(m_selectedInstance, this); } +void MainWindow::on_actionScreenshots_triggered() +{ + ShowPageDialog(m_selectedInstance, this, "screenshots"); +} + + void MainWindow::on_actionManageAccounts_triggered() { AccountListDialog dialog(this); @@ -1510,25 +1515,3 @@ void MainWindow::checkSetDefaultJava() MMC->settings()->set("JavaPath", QString("java")); } } - -void MainWindow::on_actionScreenshots_triggered() -{ - if (!m_selectedInstance) - return; - ScreenshotList *list = new ScreenshotList(m_selectedInstance); - Task *task = list->load(); - ProgressDialog prog(this); - prog.exec(task); - if (!task->successful()) - { - CustomMessageBox::selectable(this, tr("Failed to load screenshots!"), - task->failReason(), QMessageBox::Warning)->exec(); - return; - } - ScreenshotDialog dialog(list, this); - if (dialog.exec() == ScreenshotDialog::Accepted) - { - CustomMessageBox::selectable(this, tr("Done uploading!"), dialog.message(), - QMessageBox::Information)->exec(); - } -} |