Added more open folder actions
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
1150249cec
commit
e99926ea94
@ -108,12 +108,9 @@ bool openDirectory(const QString& path, [[maybe_unused]] bool ensureExists)
|
|||||||
#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD)
|
#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD)
|
||||||
if (!isSandbox()) {
|
if (!isSandbox()) {
|
||||||
return IndirectOpen(f);
|
return IndirectOpen(f);
|
||||||
} else {
|
|
||||||
return f();
|
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
return f();
|
|
||||||
#endif
|
#endif
|
||||||
|
return f();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool openFile(const QString& path)
|
bool openFile(const QString& path)
|
||||||
|
@ -1198,17 +1198,27 @@ void MainWindow::on_actionViewCentralModsFolder_triggered()
|
|||||||
|
|
||||||
void MainWindow::on_actionViewIconThemeFolder_triggered()
|
void MainWindow::on_actionViewIconThemeFolder_triggered()
|
||||||
{
|
{
|
||||||
DesktopServices::openDirectory(APPLICATION->themeManager()->getIconThemesFolder().path());
|
DesktopServices::openDirectory(APPLICATION->themeManager()->getIconThemesFolder().path(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_actionViewWidgetThemeFolder_triggered()
|
void MainWindow::on_actionViewWidgetThemeFolder_triggered()
|
||||||
{
|
{
|
||||||
DesktopServices::openDirectory(APPLICATION->themeManager()->getApplicationThemesFolder().path());
|
DesktopServices::openDirectory(APPLICATION->themeManager()->getApplicationThemesFolder().path(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_actionViewCatPackFolder_triggered()
|
void MainWindow::on_actionViewCatPackFolder_triggered()
|
||||||
{
|
{
|
||||||
DesktopServices::openDirectory(APPLICATION->themeManager()->getCatPacksFolder().path());
|
DesktopServices::openDirectory(APPLICATION->themeManager()->getCatPacksFolder().path(), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_actionViewIconsFolder_triggered()
|
||||||
|
{
|
||||||
|
DesktopServices::openDirectory(APPLICATION->icons()->getDirectory(), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_actionViewLogsFolder_triggered()
|
||||||
|
{
|
||||||
|
DesktopServices::openDirectory("logs", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::refreshInstances()
|
void MainWindow::refreshInstances()
|
||||||
|
@ -117,6 +117,8 @@ class MainWindow : public QMainWindow {
|
|||||||
void on_actionViewIconThemeFolder_triggered();
|
void on_actionViewIconThemeFolder_triggered();
|
||||||
void on_actionViewWidgetThemeFolder_triggered();
|
void on_actionViewWidgetThemeFolder_triggered();
|
||||||
void on_actionViewCatPackFolder_triggered();
|
void on_actionViewCatPackFolder_triggered();
|
||||||
|
void on_actionViewIconsFolder_triggered();
|
||||||
|
void on_actionViewLogsFolder_triggered();
|
||||||
|
|
||||||
void on_actionViewSelectedInstFolder_triggered();
|
void on_actionViewSelectedInstFolder_triggered();
|
||||||
|
|
||||||
|
@ -194,6 +194,9 @@
|
|||||||
<addaction name="actionViewIconThemeFolder"/>
|
<addaction name="actionViewIconThemeFolder"/>
|
||||||
<addaction name="actionViewWidgetThemeFolder"/>
|
<addaction name="actionViewWidgetThemeFolder"/>
|
||||||
<addaction name="actionViewCatPackFolder"/>
|
<addaction name="actionViewCatPackFolder"/>
|
||||||
|
<addaction name="actionViewIconsFolder"/>
|
||||||
|
<addaction name="separator"/>
|
||||||
|
<addaction name="actionViewLogsFolder"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenu" name="accountsMenu">
|
<widget class="QMenu" name="accountsMenu">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
@ -545,10 +548,10 @@
|
|||||||
<normaloff>.</normaloff>.</iconset>
|
<normaloff>.</normaloff>.</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>View &Instance Folder</string>
|
<string>&Instances</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Open the instance folder in a file browser.</string>
|
<string>Open the instances folder in a file browser.</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionViewLauncherRootFolder">
|
<action name="actionViewLauncherRootFolder">
|
||||||
@ -557,7 +560,7 @@
|
|||||||
<normaloff>.</normaloff>.</iconset>
|
<normaloff>.</normaloff>.</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>View Launcher &Root Folder</string>
|
<string>Launcher &Root</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Open the launcher's root folder in a file browser.</string>
|
<string>Open the launcher's root folder in a file browser.</string>
|
||||||
@ -569,12 +572,36 @@
|
|||||||
<normaloff>.</normaloff>.</iconset>
|
<normaloff>.</normaloff>.</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>View &Central Mods Folder</string>
|
<string>&Central Mods</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Open the central mods folder in a file browser.</string>
|
<string>Open the central mods folder in a file browser.</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionViewIconsFolder">
|
||||||
|
<property name="icon">
|
||||||
|
<iconset theme="viewfolder">
|
||||||
|
<normaloff>.</normaloff>.</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Instance Icons</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Open the instance icons folder in a file browser.</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionViewLogsFolder">
|
||||||
|
<property name="icon">
|
||||||
|
<iconset theme="viewfolder">
|
||||||
|
<normaloff>.</normaloff>.</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Logs</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Open the logs folder in a file browser.</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
<action name="actionChangeTheme">
|
<action name="actionChangeTheme">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Themes</string>
|
<string>Themes</string>
|
||||||
@ -718,10 +745,10 @@
|
|||||||
<normaloff>.</normaloff>.</iconset>
|
<normaloff>.</normaloff>.</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>View &Widget Themes Folder</string>
|
<string>&Widget Themes</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>View Widget Theme Folder</string>
|
<string>Open the widget themes folder in a file browser.</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionViewIconThemeFolder">
|
<action name="actionViewIconThemeFolder">
|
||||||
@ -730,18 +757,22 @@
|
|||||||
<normaloff>.</normaloff>.</iconset>
|
<normaloff>.</normaloff>.</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>View I&con Theme Folder</string>
|
<string>I&con Theme</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>View Icon Theme Folder</string>
|
<string>Open the icon theme folder in a file browser.</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionViewCatPackFolder">
|
<action name="actionViewCatPackFolder">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset theme="viewfolder"/>
|
<iconset theme="viewfolder">
|
||||||
|
<normaloff>.</normaloff>.</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>View Cat Packs Folder</string>
|
<string>Cat Packs</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Open the cat packs folder in a file browser.</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
|
Loading…
Reference in New Issue
Block a user