Skip to content

Commit

Permalink
Fix desktop shortcut not working on flatpak.
Browse files Browse the repository at this point in the history
This patch adds the ability to make working shortcuts on flatpak.
However, this requires permissions to write files to the /home/Desktop
directory. This means the flathub/org.polymc.PolyMC repository needs to
be updated.

Signed-off-by: xSlendiX <slendi@socopon.com>
  • Loading branch information
xslendix committed Jun 4, 2023
1 parent 94353da commit 16e325d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions launcher/ui/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1910,6 +1910,9 @@ void MainWindow::on_actionCreateShortcut_triggered()

auto desktop = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation);
auto executable_path = APPLICATION->applicationFilePath();
if (APPLICATION->isFlatpak()) {
executable_path = "flatpak run org.polymc.PolyMC ";
}
auto instId = m_selectedInstance->id();
auto icon = APPLICATION->windowIcon();
auto name = m_selectedInstance->name();
Expand Down

0 comments on commit 16e325d

Please sign in to comment.