1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-22 10:42:29 +01:00

Fix right click edit wallpaper

This commit is contained in:
Elias Steurer 2023-12-07 14:17:20 +01:00
parent 221f2ba6b7
commit 5c960b94a0
5 changed files with 8 additions and 8 deletions

View File

@ -85,7 +85,7 @@ Rectangle {
} }
ListElement { ListElement {
headline: qsTr("Godot Wallpaper") headline: qsTr("3D Engine Wallpaper (Godot 4.2)")
source: "qrc:/qml/ScreenPlayApp/qml/Create/Wizards/GodotWallpaper.qml" source: "qrc:/qml/ScreenPlayApp/qml/Create/Wizards/GodotWallpaper.qml"
category: "Code Wallpaper" category: "Code Wallpaper"
objectName: "" objectName: ""

View File

@ -45,7 +45,7 @@ Item {
Text { Text {
id: txtDescription 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 color: Material.primaryTextColor
Layout.fillWidth: true Layout.fillWidth: true
font.pointSize: 13 font.pointSize: 13

View File

@ -242,7 +242,7 @@ Item {
// call popup when we are in the closing animtion. // call popup when we are in the closing animtion.
if (contextMenu.visible || contextMenu.opened) if (contextMenu.visible || contextMenu.opened)
return; return;
if (delegate.type === ContentTypes.InstalledType.GodotWallpaper) { if (delegate.type === Util.ContentTypes.InstalledType.GodotWallpaper) {
contextMenu.godotItem = editGodotWallpaperComp.createObject(); contextMenu.godotItem = editGodotWallpaperComp.createObject();
contextMenu.insertItem(0, contextMenu.godotItem); contextMenu.insertItem(0, contextMenu.godotItem);
} }
@ -260,10 +260,10 @@ Item {
MenuItem { MenuItem {
text: qsTr("Edit Wallpaper") text: qsTr("Edit Wallpaper")
objectName: "editWallpaper" 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" icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_edit.svg"
onClicked: { onClicked: {
App.util.openGodotEditor(contextMenu.absoluteStoragePath); App.util.openGodotEditor(contextMenu.absoluteStoragePath, App.globalVariables.godotEditorExecutablePath);
} }
} }
} }

View File

@ -86,7 +86,7 @@ public:
Q_INVOKABLE void copyToClipboard(const QString& text) const; Q_INVOKABLE void copyToClipboard(const QString& text) const;
Q_INVOKABLE void openFolderInExplorer(const QString& url) 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 requestAllLicenses();
Q_INVOKABLE void requestDataProtection(); Q_INVOKABLE void requestDataProtection();
Q_INVOKABLE bool fileExists(const QString& filePath) const; Q_INVOKABLE bool fileExists(const QString& filePath) const;

View File

@ -519,11 +519,11 @@ void Util::openFolderInExplorer(const QString& url) const
QDesktopServices::openUrl(QUrl::fromLocalFile(path)); 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) }; const QList<QString> godotCmd = { "--editor", "--path", toLocal(contentPath) };
QProcess process; QProcess process;
// process.setProgram(m_globalVariables->godotEditorExecutablePath().toString()); process.setProgram(godotEditorExecutablePath);
process.setArguments(godotCmd); process.setArguments(godotCmd);
return process.startDetached(); return process.startDetached();
} }