diff options
author | Petr Mrázek <peterix@gmail.com> | 2014-05-18 23:12:35 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2014-05-18 23:12:35 +0200 |
commit | 94cb5c7d770866269d1a61ec6b3c76607eccee6f (patch) | |
tree | 1ffae987512491c6a0cd87a5d66c654dc801f73e /gui | |
parent | 911ac19a56fa1a5f8dd4798385022813cd0b9d07 (diff) | |
download | MultiMC-94cb5c7d770866269d1a61ec6b3c76607eccee6f.tar MultiMC-94cb5c7d770866269d1a61ec6b3c76607eccee6f.tar.gz MultiMC-94cb5c7d770866269d1a61ec6b3c76607eccee6f.tar.lz MultiMC-94cb5c7d770866269d1a61ec6b3c76607eccee6f.tar.xz MultiMC-94cb5c7d770866269d1a61ec6b3c76607eccee6f.zip |
Restore manage screenshots in main window.
Diffstat (limited to 'gui')
-rw-r--r-- | gui/MainWindow.cpp | 23 | ||||
-rw-r--r-- | gui/MainWindow.h | 2 |
2 files changed, 25 insertions, 0 deletions
diff --git a/gui/MainWindow.cpp b/gui/MainWindow.cpp index 9661537a..554a58ec 100644 --- a/gui/MainWindow.cpp +++ b/gui/MainWindow.cpp @@ -65,6 +65,7 @@ #include "gui/dialogs/UpdateDialog.h" #include "gui/dialogs/EditAccountDialog.h" #include "gui/dialogs/NotificationDialog.h" +#include "dialogs/ScreenshotDialog.h" #include "gui/ConsoleWindow.h" @@ -1572,3 +1573,25 @@ 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(); + } +} diff --git a/gui/MainWindow.h b/gui/MainWindow.h index 45ca520c..69cf11b0 100644 --- a/gui/MainWindow.h +++ b/gui/MainWindow.h @@ -111,6 +111,8 @@ slots: void on_actionEditInstNotes_triggered(); + void on_actionScreenshots_triggered(); + /*! * Launches the currently selected instance with the default account. * If no default account is selected, prompts the user to pick an account. |