Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qt: Open shadPS4 Folder #2107

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/qt_gui/main_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,12 @@ void MainWindow::CreateConnects() {
}
});

connect(ui->shadFolderAct, &QAction::triggered, this, [this]() {
QString userPath;
Common::FS::PathToQString(userPath, Common::FS::GetUserPath(Common::FS::PathType::UserDir));
QDesktopServices::openUrl(QUrl::fromLocalFile(userPath));
});

connect(ui->playButton, &QPushButton::clicked, this, &MainWindow::StartGame);
connect(m_game_grid_frame.get(), &QTableWidget::cellDoubleClicked, this,
&MainWindow::StartGame);
Expand Down Expand Up @@ -982,6 +988,7 @@ QIcon MainWindow::RecolorIcon(const QIcon& icon, bool isWhite) {
void MainWindow::SetUiIcons(bool isWhite) {
ui->bootInstallPkgAct->setIcon(RecolorIcon(ui->bootInstallPkgAct->icon(), isWhite));
ui->bootGameAct->setIcon(RecolorIcon(ui->bootGameAct->icon(), isWhite));
ui->shadFolderAct->setIcon(RecolorIcon(ui->shadFolderAct->icon(), isWhite));
ui->exitAct->setIcon(RecolorIcon(ui->exitAct->icon(), isWhite));
#ifdef ENABLE_UPDATER
ui->updaterAct->setIcon(RecolorIcon(ui->updaterAct->icon(), isWhite));
Expand Down
8 changes: 8 additions & 0 deletions src/qt_gui/main_window_ui.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class Ui_MainWindow {
QAction* bootInstallPkgAct;
QAction* bootGameAct;
QAction* addElfFolderAct;
QAction* shadFolderAct;
QAction* exitAct;
QAction* showGameListAct;
QAction* refreshGameListAct;
Expand Down Expand Up @@ -89,6 +90,9 @@ class Ui_MainWindow {
addElfFolderAct = new QAction(MainWindow);
addElfFolderAct->setObjectName("addElfFolderAct");
addElfFolderAct->setIcon(QIcon(":images/folder_icon.png"));
shadFolderAct = new QAction(MainWindow);
shadFolderAct->setObjectName("shadFolderAct");
shadFolderAct->setIcon(QIcon(":images/folder_icon.png"));
exitAct = new QAction(MainWindow);
exitAct->setObjectName("exitAct");
exitAct->setIcon(QIcon(":images/exit_icon.png"));
Expand Down Expand Up @@ -274,7 +278,9 @@ class Ui_MainWindow {
menuBar->addAction(menuHelp->menuAction());
menuFile->addAction(bootInstallPkgAct);
menuFile->addAction(bootGameAct);
menuFile->addSeparator();
menuFile->addAction(addElfFolderAct);
menuFile->addAction(shadFolderAct);
menuFile->addSeparator();
menuFile->addAction(menuRecent->menuAction());
menuFile->addSeparator();
Expand Down Expand Up @@ -333,6 +339,8 @@ class Ui_MainWindow {
"MainWindow", "Install application from a .pkg file", nullptr));
#endif // QT_CONFIG(tooltip)
menuRecent->setTitle(QCoreApplication::translate("MainWindow", "Recent Games", nullptr));
shadFolderAct->setText(
QCoreApplication::translate("MainWindow", "Open shadPS4 Folder", nullptr));
exitAct->setText(QCoreApplication::translate("MainWindow", "Exit", nullptr));
#if QT_CONFIG(tooltip)
exitAct->setToolTip(QCoreApplication::translate("MainWindow", "Exit shadPS4", nullptr));
Expand Down
4 changes: 4 additions & 0 deletions src/qt_gui/translations/ar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@
<source>Recent Games</source>
<translation>الألعاب الأخيرة</translation>
</message>
<message>
<source>Open shadPS4 Folder</source>
<translation>Open shadPS4 Folder</translation>
</message>
<message>
<source>Exit</source>
<translation>خروج</translation>
Expand Down
4 changes: 4 additions & 0 deletions src/qt_gui/translations/da_DK.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@
<source>Recent Games</source>
<translation>Recent Games</translation>
</message>
<message>
<source>Open shadPS4 Folder</source>
<translation>Open shadPS4 Folder</translation>
</message>
<message>
<source>Exit</source>
<translation>Exit</translation>
Expand Down
4 changes: 4 additions & 0 deletions src/qt_gui/translations/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@
<source>Recent Games</source>
<translation>Zuletzt gespielt</translation>
</message>
<message>
<source>Open shadPS4 Folder</source>
<translation>Open shadPS4 Folder</translation>
</message>
<message>
<source>Exit</source>
<translation>Beenden</translation>
Expand Down
4 changes: 4 additions & 0 deletions src/qt_gui/translations/el.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@
<source>Recent Games</source>
<translation>Recent Games</translation>
</message>
<message>
<source>Open shadPS4 Folder</source>
<translation>Open shadPS4 Folder</translation>
</message>
<message>
<source>Exit</source>
<translation>Exit</translation>
Expand Down
4 changes: 4 additions & 0 deletions src/qt_gui/translations/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@
<source>Recent Games</source>
<translation>Recent Games</translation>
</message>
<message>
<source>Open shadPS4 Folder</source>
<translation>Open shadPS4 Folder</translation>
</message>
<message>
<source>Exit</source>
<translation>Exit</translation>
Expand Down
4 changes: 4 additions & 0 deletions src/qt_gui/translations/es_ES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@
<source>Recent Games</source>
<translation>Juegos recientes</translation>
</message>
<message>
<source>Open shadPS4 Folder</source>
<translation>Open shadPS4 Folder</translation>
</message>
<message>
<source>Exit</source>
<translation>Salir</translation>
Expand Down
4 changes: 4 additions & 0 deletions src/qt_gui/translations/fa_IR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@
<source>Recent Games</source>
<translation>بازی های اخیر</translation>
</message>
<message>
<source>Open shadPS4 Folder</source>
<translation>Open shadPS4 Folder</translation>
</message>
<message>
<source>Exit</source>
<translation>خروج</translation>
Expand Down
4 changes: 4 additions & 0 deletions src/qt_gui/translations/fi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@
<source>Recent Games</source>
<translation>Viimeisimmät Pelit</translation>
</message>
<message>
<source>Open shadPS4 Folder</source>
<translation>Open shadPS4 Folder</translation>
</message>
<message>
<source>Exit</source>
<translation>Sulje</translation>
Expand Down
4 changes: 4 additions & 0 deletions src/qt_gui/translations/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@
<source>Recent Games</source>
<translation>Jeux récents</translation>
</message>
<message>
<source>Open shadPS4 Folder</source>
<translation>Ouvrir le dossier de shadPS4</translation>
</message>
<message>
<source>Exit</source>
<translation>Fermer</translation>
Expand Down
4 changes: 4 additions & 0 deletions src/qt_gui/translations/hu_HU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@
<source>Recent Games</source>
<translation>Legutóbbi Játékok</translation>
</message>
<message>
<source>Open shadPS4 Folder</source>
<translation>Open shadPS4 Folder</translation>
</message>
<message>
<source>Exit</source>
<translation>Kilépés</translation>
Expand Down
4 changes: 4 additions & 0 deletions src/qt_gui/translations/id.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@
<source>Recent Games</source>
<translation>Recent Games</translation>
</message>
<message>
<source>Open shadPS4 Folder</source>
<translation>Open shadPS4 Folder</translation>
</message>
<message>
<source>Exit</source>
<translation>Exit</translation>
Expand Down
4 changes: 4 additions & 0 deletions src/qt_gui/translations/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@
<source>Recent Games</source>
<translation>Giochi Recenti</translation>
</message>
<message>
<source>Open shadPS4 Folder</source>
<translation>Open shadPS4 Folder</translation>
</message>
<message>
<source>Exit</source>
<translation>Uscita</translation>
Expand Down
4 changes: 4 additions & 0 deletions src/qt_gui/translations/ja_JP.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@
<source>Recent Games</source>
<translation>最近のゲーム</translation>
</message>
<message>
<source>Open shadPS4 Folder</source>
<translation>Open shadPS4 Folder</translation>
</message>
<message>
<source>Exit</source>
<translation>終了</translation>
Expand Down
4 changes: 4 additions & 0 deletions src/qt_gui/translations/ko_KR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@
<source>Recent Games</source>
<translation>Recent Games</translation>
</message>
<message>
<source>Open shadPS4 Folder</source>
<translation>Open shadPS4 Folder</translation>
</message>
<message>
<source>Exit</source>
<translation>Exit</translation>
Expand Down
4 changes: 4 additions & 0 deletions src/qt_gui/translations/lt_LT.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@
<source>Recent Games</source>
<translation>Recent Games</translation>
</message>
<message>
<source>Open shadPS4 Folder</source>
<translation>Open shadPS4 Folder</translation>
</message>
<message>
<source>Exit</source>
<translation>Exit</translation>
Expand Down
4 changes: 4 additions & 0 deletions src/qt_gui/translations/nb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@
<source>Recent Games</source>
<translation>Nylige spill</translation>
</message>
<message>
<source>Open shadPS4 Folder</source>
<translation>Open shadPS4 Folder</translation>
</message>
<message>
<source>Exit</source>
<translation>Avslutt</translation>
Expand Down
4 changes: 4 additions & 0 deletions src/qt_gui/translations/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@
<source>Recent Games</source>
<translation>Recent Games</translation>
</message>
<message>
<source>Open shadPS4 Folder</source>
<translation>Open shadPS4 Folder</translation>
</message>
<message>
<source>Exit</source>
<translation>Exit</translation>
Expand Down
4 changes: 4 additions & 0 deletions src/qt_gui/translations/pl_PL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@
<source>Recent Games</source>
<translation>Ostatnie gry</translation>
</message>
<message>
<source>Open shadPS4 Folder</source>
<translation>Open shadPS4 Folder</translation>
</message>
<message>
<source>Exit</source>
<translation>Wyjdź</translation>
Expand Down
6 changes: 5 additions & 1 deletion src/qt_gui/translations/pt_BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@
<source>Recent Games</source>
<translation>Jogos Recentes</translation>
</message>
<message>
<source>Open shadPS4 Folder</source>
<translation>Abrir pasta shadPS4</translation>
</message>
<message>
<source>Exit</source>
<translation>Sair</translation>
Expand Down Expand Up @@ -1337,4 +1341,4 @@
<translation>TB</translation>
</message>
</context>
</TS>
</TS>
4 changes: 4 additions & 0 deletions src/qt_gui/translations/ro_RO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@
<source>Recent Games</source>
<translation>Recent Games</translation>
</message>
<message>
<source>Open shadPS4 Folder</source>
<translation>Open shadPS4 Folder</translation>
</message>
<message>
<source>Exit</source>
<translation>Exit</translation>
Expand Down
4 changes: 4 additions & 0 deletions src/qt_gui/translations/ru_RU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@
<source>Recent Games</source>
<translation>Недавние игры</translation>
</message>
<message>
<source>Open shadPS4 Folder</source>
<translation>Open shadPS4 Folder</translation>
</message>
<message>
<source>Exit</source>
<translation>Выход</translation>
Expand Down
4 changes: 4 additions & 0 deletions src/qt_gui/translations/sq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@
<source>Recent Games</source>
<translation>Lojërat e fundit</translation>
</message>
<message>
<source>Open shadPS4 Folder</source>
<translation>Open shadPS4 Folder</translation>
</message>
<message>
<source>Exit</source>
<translation>Dil</translation>
Expand Down
4 changes: 4 additions & 0 deletions src/qt_gui/translations/sv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,10 @@
<source>Recent Games</source>
<translation>Senaste spel</translation>
</message>
<message>
<source>Open shadPS4 Folder</source>
<translation>Open shadPS4 Folder</translation>
</message>
<message>
<source>Exit</source>
<translation>Avsluta</translation>
Expand Down
4 changes: 4 additions & 0 deletions src/qt_gui/translations/tr_TR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@
<source>Recent Games</source>
<translation>Son Oyunlar</translation>
</message>
<message>
<source>Open shadPS4 Folder</source>
<translation>Open shadPS4 Folder</translation>
</message>
<message>
<source>Exit</source>
<translation>Çıkış</translation>
Expand Down
4 changes: 4 additions & 0 deletions src/qt_gui/translations/uk_UA.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@
<source>Recent Games</source>
<translation>Нещодавні ігри</translation>
</message>
<message>
<source>Open shadPS4 Folder</source>
<translation>Open shadPS4 Folder</translation>
</message>
<message>
<source>Exit</source>
<translation>Вихід</translation>
Expand Down
4 changes: 4 additions & 0 deletions src/qt_gui/translations/vi_VN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@
<source>Recent Games</source>
<translation>Recent Games</translation>
</message>
<message>
<source>Open shadPS4 Folder</source>
<translation>Open shadPS4 Folder</translation>
</message>
<message>
<source>Exit</source>
<translation>Exit</translation>
Expand Down
4 changes: 4 additions & 0 deletions src/qt_gui/translations/zh_CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@
<source>Recent Games</source>
<translation>最近启动的游戏</translation>
</message>
<message>
<source>Open shadPS4 Folder</source>
<translation>Open shadPS4 Folder</translation>
</message>
<message>
<source>Exit</source>
<translation>退出</translation>
Expand Down
4 changes: 4 additions & 0 deletions src/qt_gui/translations/zh_TW.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@
<source>Recent Games</source>
<translation>Recent Games</translation>
</message>
<message>
<source>Open shadPS4 Folder</source>
<translation>Open shadPS4 Folder</translation>
</message>
<message>
<source>Exit</source>
<translation>Exit</translation>
Expand Down