mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-03 11:56:57 +03:00
implement desktop shortcut creation. windows code not tested.
This commit is contained in:
parent
c755195b97
commit
369b1c55c9
6 changed files with 152 additions and 4 deletions
|
|
@ -18,11 +18,14 @@
|
|||
|
||||
#include <QMenu>
|
||||
#include <QMessageBox>
|
||||
#include <QInputDialog>
|
||||
|
||||
#include <QDesktopServices>
|
||||
#include <QUrl>
|
||||
|
||||
#include "util/osutils.h"
|
||||
#include "util/userutil.h"
|
||||
#include "util/pathutils.h"
|
||||
|
||||
#include "gui/settingsdialog.h"
|
||||
#include "gui/newinstancedialog.h"
|
||||
|
|
@ -159,6 +162,17 @@ void MainWindow::onLoginComplete(LoginResponse response)
|
|||
arg(response.getUsername(), response.getSessionID()));
|
||||
}
|
||||
|
||||
// Create A Desktop Shortcut
|
||||
void MainWindow::on_actionMakeDesktopShortcut_triggered()
|
||||
{
|
||||
QString name("Test");
|
||||
name = QInputDialog::getText(this, tr("MultiMC Shortcut"), tr("Enter a Shortcut Name."), QLineEdit::Normal, name);
|
||||
|
||||
Util::createShortCut(Util::getDesktopDir(), "test", QStringList() << "-d" << "lol", name, "application-x-octet-stream");
|
||||
|
||||
QMessageBox::warning(this, "Stupidness", "A Dummy Shortcut was created. the current instance model doesnt allow for anything more");
|
||||
}
|
||||
|
||||
// BrowserDialog
|
||||
void MainWindow::openWebPage(QUrl url)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue