feat: Add the launcher root folder to the Folders menu

Signed-off-by: Redson <redson@riseup.net>
This commit is contained in:
Redson 2023-05-08 19:57:30 -03:00
parent ce5bb29c44
commit 0b251fa754
No known key found for this signature in database
GPG Key ID: A55CD2880240ABD7
3 changed files with 23 additions and 0 deletions

View File

@ -1201,6 +1201,14 @@ void MainWindow::on_actionViewInstanceFolder_triggered()
DesktopServices::openDirectory(str); DesktopServices::openDirectory(str);
} }
void MainWindow::on_actionViewLauncherRootFolder_triggered()
{
QDir rootDir(FS::PathCombine(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation), ".."));
QString DataPath = rootDir.absolutePath();
DesktopServices::openDirectory(DataPath);
}
void MainWindow::refreshInstances() void MainWindow::refreshInstances()
{ {
APPLICATION->instances()->loadList(); APPLICATION->instances()->loadList();

View File

@ -112,6 +112,8 @@ private slots:
void on_actionViewInstanceFolder_triggered(); void on_actionViewInstanceFolder_triggered();
void on_actionViewLauncherRootFolder_triggered();
void on_actionViewSelectedInstFolder_triggered(); void on_actionViewSelectedInstFolder_triggered();
void refreshInstances(); void refreshInstances();

View File

@ -187,6 +187,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
<addaction name="actionViewInstanceFolder"/> <addaction name="actionViewInstanceFolder"/>
<addaction name="actionViewLauncherRootFolder"/>
<addaction name="actionViewCentralModsFolder"/> <addaction name="actionViewCentralModsFolder"/>
</widget> </widget>
<widget class="QMenu" name="accountsMenu"> <widget class="QMenu" name="accountsMenu">
@ -528,6 +529,18 @@
<string>Open the instance folder in a file browser.</string> <string>Open the instance folder in a file browser.</string>
</property> </property>
</action> </action>
<action name="actionViewLauncherRootFolder">
<property name="icon">
<iconset theme="viewfolder">
<normaloff>.</normaloff>.</iconset>
</property>
<property name="text">
<string>&amp;View Launcher Root Folder</string>
</property>
<property name="toolTip">
<string>Open the launcher's root folder in a file browser.</string>
</property>
</action>
<action name="actionViewCentralModsFolder"> <action name="actionViewCentralModsFolder">
<property name="icon"> <property name="icon">
<iconset theme="centralmods"> <iconset theme="centralmods">