mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-25 04:02:50 +01:00
Fix right click edit wallpaper
This commit is contained in:
parent
221f2ba6b7
commit
5c960b94a0
@ -85,7 +85,7 @@ Rectangle {
|
||||
}
|
||||
|
||||
ListElement {
|
||||
headline: qsTr("Godot Wallpaper")
|
||||
headline: qsTr("3D Engine Wallpaper (Godot 4.2)")
|
||||
source: "qrc:/qml/ScreenPlayApp/qml/Create/Wizards/GodotWallpaper.qml"
|
||||
category: "Code Wallpaper"
|
||||
objectName: ""
|
||||
|
@ -45,7 +45,7 @@ Item {
|
||||
Text {
|
||||
id: txtDescription
|
||||
|
||||
text: qsTr("ScreenPlay V0.15 and up can play *.mp4 (also more known as h264). This can improove performance on older systems.")
|
||||
text: qsTr("ScreenPlay v0.15 and up can play *.mp4 (also more known as h264). This can improove performance on older systems.")
|
||||
color: Material.primaryTextColor
|
||||
Layout.fillWidth: true
|
||||
font.pointSize: 13
|
||||
|
@ -242,7 +242,7 @@ Item {
|
||||
// call popup when we are in the closing animtion.
|
||||
if (contextMenu.visible || contextMenu.opened)
|
||||
return;
|
||||
if (delegate.type === ContentTypes.InstalledType.GodotWallpaper) {
|
||||
if (delegate.type === Util.ContentTypes.InstalledType.GodotWallpaper) {
|
||||
contextMenu.godotItem = editGodotWallpaperComp.createObject();
|
||||
contextMenu.insertItem(0, contextMenu.godotItem);
|
||||
}
|
||||
@ -260,10 +260,10 @@ Item {
|
||||
MenuItem {
|
||||
text: qsTr("Edit Wallpaper")
|
||||
objectName: "editWallpaper"
|
||||
enabled: contextMenu.type === ContentTypes.InstalledType.GodotWallpaper
|
||||
enabled: contextMenu.type === Util.ContentTypes.InstalledType.GodotWallpaper
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_edit.svg"
|
||||
onClicked: {
|
||||
App.util.openGodotEditor(contextMenu.absoluteStoragePath);
|
||||
App.util.openGodotEditor(contextMenu.absoluteStoragePath, App.globalVariables.godotEditorExecutablePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ public:
|
||||
|
||||
Q_INVOKABLE void copyToClipboard(const QString& text) const;
|
||||
Q_INVOKABLE void openFolderInExplorer(const QString& url) const;
|
||||
Q_INVOKABLE bool openGodotEditor(QString contentPath) const;
|
||||
Q_INVOKABLE bool openGodotEditor(QString contentPath, QString godotEditorExecutablePath) const;
|
||||
Q_INVOKABLE void requestAllLicenses();
|
||||
Q_INVOKABLE void requestDataProtection();
|
||||
Q_INVOKABLE bool fileExists(const QString& filePath) const;
|
||||
|
@ -519,11 +519,11 @@ void Util::openFolderInExplorer(const QString& url) const
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile(path));
|
||||
}
|
||||
|
||||
bool Util::openGodotEditor(QString contentPath) const
|
||||
bool Util::openGodotEditor(QString contentPath, QString godotEditorExecutablePath) const
|
||||
{
|
||||
const QList<QString> godotCmd = { "--editor", "--path", toLocal(contentPath) };
|
||||
QProcess process;
|
||||
// process.setProgram(m_globalVariables->godotEditorExecutablePath().toString());
|
||||
process.setProgram(godotEditorExecutablePath);
|
||||
process.setArguments(godotCmd);
|
||||
return process.startDetached();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user