diff options
author | Andrew <forkk@forkk.net> | 2013-02-20 19:10:09 -0600 |
---|---|---|
committer | Andrew <forkk@forkk.net> | 2013-02-20 19:10:09 -0600 |
commit | dd2e836b4cf4cfa043f9ea2911f58f1d22d4e282 (patch) | |
tree | 07e99dd9c2858e2e46075a649751049c3195b437 /gui/mainwindow.cpp | |
parent | f71479ec33562c9a0ebbdb335bef5e2824a12710 (diff) | |
download | PrismLauncher-dd2e836b4cf4cfa043f9ea2911f58f1d22d4e282.tar.gz PrismLauncher-dd2e836b4cf4cfa043f9ea2911f58f1d22d4e282.tar.bz2 PrismLauncher-dd2e836b4cf4cfa043f9ea2911f58f1d22d4e282.zip |
Split MultiMC up into a few separate libraries.
Fixed plugin system.
Tons of other stuff...
Diffstat (limited to 'gui/mainwindow.cpp')
-rw-r--r-- | gui/mainwindow.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index d19d69dc..19ff2108 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -21,20 +21,25 @@ #include <QDesktopServices> #include <QUrl> +#include <QFileInfo> -#include "util/osutils.h" +#include "osutils.h" #include "gui/settingsdialog.h" #include "gui/newinstancedialog.h" #include "gui/logindialog.h" #include "gui/taskdialog.h" -#include "data/inst/instancelist.h" -#include "data/appsettings.h" +#include "instancelist.h" +#include "appsettings.h" #include "data/version.h" #include "tasks/logintask.h" +// Opens the given file in the default application. +// TODO: Move this somewhere. +void openInDefaultProgram(QString filename); + MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow), @@ -156,3 +161,8 @@ void MainWindow::onLoginComplete(LoginResponse response) QString("Logged in as %1 with session ID %2."). arg(response.getUsername(), response.getSessionID())); } + +void openInDefaultProgram(QString filename) +{ + QDesktopServices::openUrl("file:///" + QFileInfo(filename).absolutePath()); +} |