temp/gnome-software: patches to workaround UI and UX problems (MR 2653)

[ci:skip-build]: already built successfully in CI
This commit is contained in:
Pablo Correa Gómez 2021-12-30 00:58:42 +01:00 committed by Oliver Smith
parent c3a61c0b9e
commit b0c043e4ca
No known key found for this signature in database
GPG Key ID: 5AE7F5513E0885CB
3 changed files with 90 additions and 0 deletions

View File

@ -0,0 +1,48 @@
From 5bc338da693cb7590b9b039548b0624fd244d311 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pablo=20Correa=20G=C3=B3mez?= <ablocorrea@hotmail.com>
Date: Thu, 30 Dec 2021 00:24:32 +0100
Subject: [PATCH 1/2] make updates page default at startup
This is mostly to avoid having the startup of an application
show a window that looks broken. It should be reverted once
the explore page is fully adaptive and filled with beautiful
data.
Simply modifying the desktop file in phosh is not enough because
the application is dbus activated. In consequence, the Exec
in the desktop is ignored. Making the activation accept parameters
might be possible but out of scope
---
src/gs-application.c | 2 +-
src/org.gnome.Software.desktop.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gs-application.c b/src/gs-application.c
index 90487df6..d35edc1c 100644
--- a/src/gs-application.c
+++ b/src/gs-application.c
@@ -1064,7 +1064,7 @@ gs_application_activate (GApplication *application)
GsApplication *app = GS_APPLICATION (application);
if (app->shell_loaded_handler_id == 0)
- gs_shell_set_mode (app->shell, GS_SHELL_MODE_OVERVIEW);
+ gs_shell_set_mode (app->shell, GS_SHELL_MODE_UPDATES);
gs_shell_activate (GS_APPLICATION (application)->shell);
diff --git a/src/org.gnome.Software.desktop.in b/src/org.gnome.Software.desktop.in
index 318c243a..b79666eb 100644
--- a/src/org.gnome.Software.desktop.in
+++ b/src/org.gnome.Software.desktop.in
@@ -3,7 +3,7 @@ Name=Software
Comment=Add, remove or update software on this computer
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=@application_id@
-Exec=gnome-software %U
+Exec=gnome-software --mode=updates %U
Terminal=false
Type=Application
Categories=GNOME;GTK;System;PackageManager;
--
2.25.1

View File

@ -0,0 +1,38 @@
From f85b328d0269630e51db33aef23350eb77e3d2b4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pablo=20Correa=20G=C3=B3mez?= <ablocorrea@hotmail.com>
Date: Mon, 17 Jan 2022 01:40:42 +0100
Subject: [PATCH 2/2] disable "Automatic Updates" options
Those can be dangerous, as applications are updated live, and
kernel or mkinitfs could be installed at any time. This includes
on very low battery or before user shuts-down the phone.
To avoid making this a hard fork of GS, discussion on steps to
solve this issue in pma#1388
---
src/gs-prefs-dialog.ui | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/gs-prefs-dialog.ui b/src/gs-prefs-dialog.ui
index 2ccde058..3094b5c1 100644
--- a/src/gs-prefs-dialog.ui
+++ b/src/gs-prefs-dialog.ui
@@ -18,6 +18,7 @@
<property name="description" translatable="yes">To avoid charges and network caps, software updates are not automatically downloaded on mobile or metered connections.</property>
<child>
<object class="HdyActionRow">
+ <property name="sensitive">False</property>
<property name="visible">True</property>
<property name="title" translatable="yes">Automatic Updates</property>
<property name="subtitle" translatable="yes">Downloads and installs software updates in the background, when possible.</property>
@@ -33,6 +34,7 @@
</child>
<child>
<object class="HdyActionRow">
+ <property name="sensitive">False</property>
<property name="visible">True</property>
<property name="title" translatable="yes">Automatic Update Notifications</property>
<property name="subtitle" translatable="yes">Show notifications when updates have been automatically installed.</property>
--
2.25.1

View File

@ -20,6 +20,8 @@ _purism_commit="caaad1eaa5d863ffb9b7853907af8c8342dc2d39"
_purism_patches="https://source.puri.sm/Librem5/pureos-store/-/raw/$_purism_commit/debian/patches"
source="https://download.gnome.org/sources/gnome-software/${_pkgver%.*}/gnome-software-$_pkgver.tar.xz
0001-make-updates-page-default-at-startup.patch
0002-disable-Automatic-Updates-options.patch
$_purism_patches/ui/0001-assets-Make-the-up-to-date-picture-fit-phones.patch
$_purism_patches/ui/0002-Add-GsInfoWindow.patch
$_purism_patches/ui/0003-metered-data-dialog-Make-it-a-GsInfoWindow-and-a-Hdy.patch
@ -95,6 +97,8 @@ flatpak_plugin() {
sha512sums="
7b19ed7e3b6f8662b6351fbb6eddb45f99cdbf9e6912e11b36301cdfd6f62cb3256da031e6640f9ad397384a23530d11488c78a1af60ce130a99838f97f8a0ed gnome-software-41.3.tar.xz
388910611f93147ab55ec602035baac6b85cdece9164d2205669ad41adc6a7cdf4d37d7eaf2eee51257bf905ff39eb0a2502679abeb4d95025ab1296ac0adc94 0001-make-updates-page-default-at-startup.patch
40c3aab58f050f88769e6265926762217324ed7748bee7bc3981a04e785133b71b81603dcc22f79c79ecb75298cdca07511031906c5c1eee5d2f122e3d8dab0c 0002-disable-Automatic-Updates-options.patch
ea2d4c6ee37b1fb27773d8908a98e6f6726cd2f72fcc7c41caf243a501896c991346d02ccbc36168c7194d0ba3dfd17660c7af79305a447f521617f0fbefae9e 0001-assets-Make-the-up-to-date-picture-fit-phones.patch
4e5b205134d7fc8c60af2e9fcfa70552e20300b2e9959d500a82546986d38677515af841272ef64a019ec946940c59eaca3d95d228952d8384682c7410383417 0002-Add-GsInfoWindow.patch
b67d04f6853762b7d5b26109fdeeec37d07bef40d1e35b46d95ec58e977c1088e256d0e272bc05c764d8673b2766ec82861506415ee11237ee0270a8a0732d97 0003-metered-data-dialog-Make-it-a-GsInfoWindow-and-a-Hdy.patch