diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-12-08 17:39:32 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-12-08 17:39:32 +0100 |
commit | d68f49ffc0e4b39ed842032a1e365870d2597adf (patch) | |
tree | 7befe15e9cd0ae9fede0f2d883a1f4f789ee3959 /gui/ConsoleWindow.cpp | |
parent | 0cb8ff40b26401a707781c2c4171d3ec6c114077 (diff) | |
parent | c6f0d9ce937349aaab0ed7ee3968c73bf721665c (diff) | |
download | MultiMC-d68f49ffc0e4b39ed842032a1e365870d2597adf.tar MultiMC-d68f49ffc0e4b39ed842032a1e365870d2597adf.tar.gz MultiMC-d68f49ffc0e4b39ed842032a1e365870d2597adf.tar.lz MultiMC-d68f49ffc0e4b39ed842032a1e365870d2597adf.tar.xz MultiMC-d68f49ffc0e4b39ed842032a1e365870d2597adf.zip |
Merge branch 'feature_pasting' of https://github.com/robotbrain/MultiMC5 into develop
Diffstat (limited to 'gui/ConsoleWindow.cpp')
-rw-r--r-- | gui/ConsoleWindow.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gui/ConsoleWindow.cpp b/gui/ConsoleWindow.cpp index d0210df6..5db4442e 100644 --- a/gui/ConsoleWindow.cpp +++ b/gui/ConsoleWindow.cpp @@ -22,6 +22,9 @@ #include <gui/Platform.h> #include <gui/dialogs/CustomMessageBox.h> +#include <gui/dialogs/ProgressDialog.h> + +#include "logic/net/PasteUpload.h" ConsoleWindow::ConsoleWindow(MinecraftProcess *mcproc, QWidget *parent) : QMainWindow(parent), ui(new Ui::ConsoleWindow), proc(mcproc) @@ -179,3 +182,15 @@ void ConsoleWindow::onLaunchFailed(BaseInstance *instance) if(!isVisible()) show(); } + +void ConsoleWindow::on_btnPaste_clicked() +{ + auto text = ui->text->toPlainText(); + ProgressDialog dialog(this); + PasteUpload* paste=new PasteUpload(this, text); + dialog.exec(paste); + if(!paste->successful()) + { + CustomMessageBox::selectable(this, "Upload failed", paste->failReason(), QMessageBox::Critical)->exec(); + } +} |