mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-12 13:17:41 +02:00
fix: open paths directly
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
@ -1197,43 +1197,43 @@ void MainWindow::undoTrashInstance()
|
||||
|
||||
void MainWindow::on_actionViewLauncherRootFolder_triggered()
|
||||
{
|
||||
DesktopServices::openDirectory(".");
|
||||
DesktopServices::openPath(".");
|
||||
}
|
||||
|
||||
void MainWindow::on_actionViewInstanceFolder_triggered()
|
||||
{
|
||||
QString str = APPLICATION->settings()->get("InstanceDir").toString();
|
||||
DesktopServices::openDirectory(str);
|
||||
DesktopServices::openPath(str);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionViewCentralModsFolder_triggered()
|
||||
{
|
||||
DesktopServices::openDirectory(APPLICATION->settings()->get("CentralModsDir").toString(), true);
|
||||
DesktopServices::openPath(APPLICATION->settings()->get("CentralModsDir").toString(), true);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionViewIconThemeFolder_triggered()
|
||||
{
|
||||
DesktopServices::openDirectory(APPLICATION->themeManager()->getIconThemesFolder().path(), true);
|
||||
DesktopServices::openPath(APPLICATION->themeManager()->getIconThemesFolder().path(), true);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionViewWidgetThemeFolder_triggered()
|
||||
{
|
||||
DesktopServices::openDirectory(APPLICATION->themeManager()->getApplicationThemesFolder().path(), true);
|
||||
DesktopServices::openPath(APPLICATION->themeManager()->getApplicationThemesFolder().path(), true);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionViewCatPackFolder_triggered()
|
||||
{
|
||||
DesktopServices::openDirectory(APPLICATION->themeManager()->getCatPacksFolder().path(), true);
|
||||
DesktopServices::openPath(APPLICATION->themeManager()->getCatPacksFolder().path(), true);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionViewIconsFolder_triggered()
|
||||
{
|
||||
DesktopServices::openDirectory(APPLICATION->icons()->getDirectory(), true);
|
||||
DesktopServices::openPath(APPLICATION->icons()->getDirectory(), true);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionViewLogsFolder_triggered()
|
||||
{
|
||||
DesktopServices::openDirectory("logs", true);
|
||||
DesktopServices::openPath("logs", true);
|
||||
}
|
||||
|
||||
void MainWindow::refreshInstances()
|
||||
@ -1452,7 +1452,7 @@ void MainWindow::on_actionViewSelectedInstFolder_triggered()
|
||||
{
|
||||
if (m_selectedInstance) {
|
||||
QString str = m_selectedInstance->instanceRoot();
|
||||
DesktopServices::openDirectory(QDir(str).absolutePath());
|
||||
DesktopServices::openPath(QDir(str).absolutePath());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -159,5 +159,5 @@ IconPickerDialog::~IconPickerDialog()
|
||||
|
||||
void IconPickerDialog::openFolder()
|
||||
{
|
||||
DesktopServices::openDirectory(APPLICATION->icons()->getDirectory(), true);
|
||||
DesktopServices::openPath(APPLICATION->icons()->getDirectory(), true);
|
||||
}
|
||||
|
@ -290,12 +290,12 @@ void ExternalResourcesPage::disableItem()
|
||||
|
||||
void ExternalResourcesPage::viewConfigs()
|
||||
{
|
||||
DesktopServices::openDirectory(m_instance->instanceConfigFolder(), true);
|
||||
DesktopServices::openPath(m_instance->instanceConfigFolder(), true);
|
||||
}
|
||||
|
||||
void ExternalResourcesPage::viewFolder()
|
||||
{
|
||||
DesktopServices::openDirectory(m_model->dir().absolutePath(), true);
|
||||
DesktopServices::openPath(m_model->dir().absolutePath(), true);
|
||||
}
|
||||
|
||||
bool ExternalResourcesPage::current(const QModelIndex& current, const QModelIndex& previous)
|
||||
|
@ -325,7 +325,7 @@ void ScreenshotsPage::onItemActivated(QModelIndex index)
|
||||
return;
|
||||
auto info = m_model->fileInfo(index);
|
||||
QString fileName = info.absoluteFilePath();
|
||||
DesktopServices::openFile(info.absoluteFilePath());
|
||||
DesktopServices::openPath(info.absoluteFilePath());
|
||||
}
|
||||
|
||||
void ScreenshotsPage::onCurrentSelectionChanged(const QItemSelection& selected)
|
||||
@ -352,7 +352,7 @@ void ScreenshotsPage::onCurrentSelectionChanged(const QItemSelection& selected)
|
||||
|
||||
void ScreenshotsPage::on_actionView_Folder_triggered()
|
||||
{
|
||||
DesktopServices::openDirectory(m_folder, true);
|
||||
DesktopServices::openPath(m_folder, true);
|
||||
}
|
||||
|
||||
void ScreenshotsPage::on_actionUpload_triggered()
|
||||
|
@ -447,12 +447,12 @@ void VersionPage::on_actionAdd_Empty_triggered()
|
||||
|
||||
void VersionPage::on_actionLibrariesFolder_triggered()
|
||||
{
|
||||
DesktopServices::openDirectory(m_inst->getLocalLibraryPath(), true);
|
||||
DesktopServices::openPath(m_inst->getLocalLibraryPath(), true);
|
||||
}
|
||||
|
||||
void VersionPage::on_actionMinecraftFolder_triggered()
|
||||
{
|
||||
DesktopServices::openDirectory(m_inst->gameRoot(), true);
|
||||
DesktopServices::openPath(m_inst->gameRoot(), true);
|
||||
}
|
||||
|
||||
void VersionPage::versionCurrent(const QModelIndex& current, [[maybe_unused]] const QModelIndex& previous)
|
||||
|
@ -207,7 +207,7 @@ void WorldListPage::on_actionRemove_triggered()
|
||||
|
||||
void WorldListPage::on_actionView_Folder_triggered()
|
||||
{
|
||||
DesktopServices::openDirectory(m_worlds->dir().absolutePath(), true);
|
||||
DesktopServices::openPath(m_worlds->dir().absolutePath(), true);
|
||||
}
|
||||
|
||||
void WorldListPage::on_actionDatapacks_triggered()
|
||||
@ -223,7 +223,7 @@ void WorldListPage::on_actionDatapacks_triggered()
|
||||
|
||||
auto fullPath = m_worlds->data(index, WorldList::FolderRole).toString();
|
||||
|
||||
DesktopServices::openDirectory(FS::PathCombine(fullPath, "datapacks"), true);
|
||||
DesktopServices::openPath(FS::PathCombine(fullPath, "datapacks"), true);
|
||||
}
|
||||
|
||||
void WorldListPage::on_actionReset_Icon_triggered()
|
||||
|
@ -34,11 +34,11 @@ ThemeCustomizationWidget::ThemeCustomizationWidget(QWidget* parent) : QWidget(pa
|
||||
connect(ui->backgroundCatComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &ThemeCustomizationWidget::applyCatTheme);
|
||||
|
||||
connect(ui->iconsFolder, &QPushButton::clicked, this,
|
||||
[] { DesktopServices::openDirectory(APPLICATION->themeManager()->getIconThemesFolder().path()); });
|
||||
[] { DesktopServices::openPath(APPLICATION->themeManager()->getIconThemesFolder().path()); });
|
||||
connect(ui->widgetStyleFolder, &QPushButton::clicked, this,
|
||||
[] { DesktopServices::openDirectory(APPLICATION->themeManager()->getApplicationThemesFolder().path()); });
|
||||
[] { DesktopServices::openPath(APPLICATION->themeManager()->getApplicationThemesFolder().path()); });
|
||||
connect(ui->catPackFolder, &QPushButton::clicked, this,
|
||||
[] { DesktopServices::openDirectory(APPLICATION->themeManager()->getCatPacksFolder().path()); });
|
||||
[] { DesktopServices::openPath(APPLICATION->themeManager()->getCatPacksFolder().path()); });
|
||||
}
|
||||
|
||||
ThemeCustomizationWidget::~ThemeCustomizationWidget()
|
||||
|
Reference in New Issue
Block a user