From 94cb5c7d770866269d1a61ec6b3c76607eccee6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 18 May 2014 23:12:35 +0200 Subject: Restore manage screenshots in main window. --- gui/MainWindow.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'gui/MainWindow.cpp') 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(); + } +} -- cgit v1.2.3