From 1a82580ec0d7b177ebd690fce9d035a162b622fc Mon Sep 17 00:00:00 2001 From: Timothée Ravier Date: Jul 29 2024 18:54:05 +0000 Subject: [PATCH 1/7] ThirdPartyRepos: Add more context --- diff --git a/usr/share/plasma/plasma-welcome/extra-pages/01-EnableExtraRepos.qml b/usr/share/plasma/plasma-welcome/extra-pages/01-EnableExtraRepos.qml index 5862155..49dacdc 100644 --- a/usr/share/plasma/plasma-welcome/extra-pages/01-EnableExtraRepos.qml +++ b/usr/share/plasma/plasma-welcome/extra-pages/01-EnableExtraRepos.qml @@ -15,7 +15,7 @@ import org.kde.plasma.welcome GenericPage { heading: i18nc("@info:window", "Enable Third Party Repositories") - description: xi18nc("@info:usagetip", "Click the button below to enable third-party repositories.") + description: xi18nc("@info:usagetip", "By default, Fedora includes only Free and Open Source Software (with some exceptions).The Third Party repositories provide access to additional desktop software that is not included in Fedora’s own repos but may be necessary or important for users to have access to. This includes some proprietary software.Once the Third Party repositories are enabled, you will be able to install those softwares from Plasma Discover.") topContent: [ Kirigami.UrlButton { id: thirdPartyInfoLink From c560ec5e86da28540d8f078abe2cda163ec5d337 Mon Sep 17 00:00:00 2001 From: Timothée Ravier Date: Jul 29 2024 19:45:55 +0000 Subject: [PATCH 2/7] ThirdPartyRepos: Directly point to software list --- diff --git a/usr/share/plasma/plasma-welcome/extra-pages/01-EnableExtraRepos.qml b/usr/share/plasma/plasma-welcome/extra-pages/01-EnableExtraRepos.qml index 49dacdc..138c093 100644 --- a/usr/share/plasma/plasma-welcome/extra-pages/01-EnableExtraRepos.qml +++ b/usr/share/plasma/plasma-welcome/extra-pages/01-EnableExtraRepos.qml @@ -21,7 +21,7 @@ GenericPage { id: thirdPartyInfoLink Layout.topMargin: Kirigami.Units.largeSpacing text: i18nc("@action:button", "See which repositories will get added") - url: "https://docs.fedoraproject.org/en-US/workstation-working-group/third-party-repos/" + url: "https://docs.fedoraproject.org/en-US/workstation-working-group/third-party-repos/#_included_software" }, Kirigami.UrlButton { id: thirdPartyPolicyLink From de56115c42eafc139b7eac8fc53d6665494c7ec7 Mon Sep 17 00:00:00 2001 From: Timothée Ravier Date: Jul 29 2024 19:46:14 +0000 Subject: [PATCH 3/7] ThirdPartyRepos: Link to Fedora License policy --- diff --git a/usr/share/plasma/plasma-welcome/extra-pages/01-EnableExtraRepos.qml b/usr/share/plasma/plasma-welcome/extra-pages/01-EnableExtraRepos.qml index 138c093..1fbd155 100644 --- a/usr/share/plasma/plasma-welcome/extra-pages/01-EnableExtraRepos.qml +++ b/usr/share/plasma/plasma-welcome/extra-pages/01-EnableExtraRepos.qml @@ -29,6 +29,12 @@ GenericPage { text: i18nc("@action:button", "Learn more about Fedora's Third Party Repository Policy") url: "https://docs.fedoraproject.org/en-US/fesco/Third_Party_Repository_Policy/" }, + Kirigami.UrlButton { + id: fedoraLicenseLink + Layout.topMargin: Kirigami.Units.largeSpacing + text: i18nc("@action:button", "Learn more about Fedora's license approval standards") + url: "https://docs.fedoraproject.org/en-US/legal/license-approval/" + }, QQC2.Button { id: enableThirdParty text: "Enable Third Party Repositories" From a1c82e63091402ac521b3764482f632c6363d01c Mon Sep 17 00:00:00 2001 From: Timothée Ravier Date: Jul 30 2024 09:59:46 +0000 Subject: [PATCH 4/7] ThirdPartyRepos: Remove root.padding --- diff --git a/usr/share/plasma/plasma-welcome/extra-pages/01-EnableExtraRepos.qml b/usr/share/plasma/plasma-welcome/extra-pages/01-EnableExtraRepos.qml index 1fbd155..4021d8d 100644 --- a/usr/share/plasma/plasma-welcome/extra-pages/01-EnableExtraRepos.qml +++ b/usr/share/plasma/plasma-welcome/extra-pages/01-EnableExtraRepos.qml @@ -16,6 +16,7 @@ import org.kde.plasma.welcome GenericPage { heading: i18nc("@info:window", "Enable Third Party Repositories") description: xi18nc("@info:usagetip", "By default, Fedora includes only Free and Open Source Software (with some exceptions).The Third Party repositories provide access to additional desktop software that is not included in Fedora’s own repos but may be necessary or important for users to have access to. This includes some proprietary software.Once the Third Party repositories are enabled, you will be able to install those softwares from Plasma Discover.") + id: root topContent: [ Kirigami.UrlButton { id: thirdPartyInfoLink From ec16970764239bd92cff4f65e70fe9472f6b6323 Mon Sep 17 00:00:00 2001 From: Timothée Ravier Date: Jul 30 2024 09:59:46 +0000 Subject: [PATCH 5/7] ThirdPartyRepos: Fix disable passive text --- diff --git a/usr/share/plasma/plasma-welcome/extra-pages/01-EnableExtraRepos.qml b/usr/share/plasma/plasma-welcome/extra-pages/01-EnableExtraRepos.qml index 4021d8d..0750316 100644 --- a/usr/share/plasma/plasma-welcome/extra-pages/01-EnableExtraRepos.qml +++ b/usr/share/plasma/plasma-welcome/extra-pages/01-EnableExtraRepos.qml @@ -52,7 +52,7 @@ GenericPage { text: "Disable Third Party Repositories" onClicked: { Controller.runCommand("pkexec fedora-third-party disable"); - showPassiveNotification(i18n("Third-Party Repositories are now being enabled in the background.")); + showPassiveNotification(i18n("Third-Party Repositories are now being disabled in the background.")); disableThirdParty.visible = false; enableThirdParty.visible = true; } From 0540fe0525d3dbc686a34ab2647ff3c303211f8e Mon Sep 17 00:00:00 2001 From: Timothée Ravier Date: Jul 30 2024 09:59:46 +0000 Subject: [PATCH 6/7] ThirdPartyRepos: Clean up state logic --- diff --git a/usr/share/plasma/plasma-welcome/extra-pages/01-EnableExtraRepos.qml b/usr/share/plasma/plasma-welcome/extra-pages/01-EnableExtraRepos.qml index 0750316..01a8a43 100644 --- a/usr/share/plasma/plasma-welcome/extra-pages/01-EnableExtraRepos.qml +++ b/usr/share/plasma/plasma-welcome/extra-pages/01-EnableExtraRepos.qml @@ -75,59 +75,18 @@ GenericPage { source: "/usr/share/icons/hicolor/scalable/apps/plasma-welcome-panda.svg" } } - ColumnLayout { - anchors.fill: parent - spacing: root.padding - id: openH264Col - visible: false - Text { - text: "Ostree test, this should only show if you are on rpmostree." - color: "white" - } - } Component.onCompleted: { - Controller.runCommand("fedora-third-party query", callback); - Controller.runCommand("test -f /run/ostree", isOsTree); + Controller.runCommand("fedora-third-party query --quiet", callback); } property var callback: (returnStatus, outputText) => { - if (returnStatus == 0) { // App executed successfully - if (outputText.includes('enabled') == true) { - enableThirdParty.visible = false; - console.log('State is Enabled'); - } else if (outputText.includes('disabled') == true) { - disableThirdParty.visible = false; - console.log('State is Disabled'); - } else { //What else?? - disableThirdParty.visible = false; - console.log('State is Unknown'); - } - } else if (returnStatus == -1) { // App not found - disableThirdParty.visible = false; - console.log('State is Not Found'); - } else { // And for anything else... + if (returnStatus == 0) { + enableThirdParty.visible = false; + disableThirdParty.visible = true; + console.log('Third Party Repositories are enabled'); + } else { + enableThirdParty.visible = true; disableThirdParty.visible = false; - console.log('State is ...?'); - } - } - property var isOsTree: (returnStatus, outputText) => { - if (returnStatus == 0) { // App executed successfully - if (outputText.includes('true') == true) { - openH264Col.visible = true; - pandaImage.visible = false; - console.log('RPMOSTREE section is enabled'); - } else { - openH264Col.visible = false; - pandaImage.visible = true; - console.log('RPMOSTREE section is disabled'); - } - } else if (returnStatus == -1) { // App not found - openH264Col.visible = false; - pandaImage.visible = true; - console.log('RPMOSTREE section is disabled'); - } else { // And for anything else... - openH264Col.visible = false; - pandaImage.visible = true; - console.log('RPMOSTREE section is disabled'); + console.log('Third Party Repositories are not enabled'); } } } From d8949a3330b777d82c6fc7bade97392614461ccb Mon Sep 17 00:00:00 2001 From: Timothée Ravier Date: Jul 30 2024 09:59:46 +0000 Subject: [PATCH 7/7] ThirdPartyRepos: Images are visible by default --- diff --git a/usr/share/plasma/plasma-welcome/extra-pages/01-EnableExtraRepos.qml b/usr/share/plasma/plasma-welcome/extra-pages/01-EnableExtraRepos.qml index 01a8a43..fabffb9 100644 --- a/usr/share/plasma/plasma-welcome/extra-pages/01-EnableExtraRepos.qml +++ b/usr/share/plasma/plasma-welcome/extra-pages/01-EnableExtraRepos.qml @@ -63,7 +63,6 @@ GenericPage { anchors.fill: parent spacing: root.padding id: pandaImage - visible: true Image { Layout.alignment: Qt.AlignCenter Layout.fillWidth: true