[gnome-software/wip/kalev/fix-upgrade-text: 9/9] upgrade banner: Show the correct button when NEEDS_REBOOT quirk is set
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/kalev/fix-upgrade-text: 9/9] upgrade banner: Show the correct button when NEEDS_REBOOT quirk is set
- Date: Mon, 2 Mar 2020 14:42:53 +0000 (UTC)
commit 8b8f38fad7983e8ce30bb0b569cd42f18f524a90
Author: Kalev Lember <klember redhat com>
Date: Mon Mar 2 15:37:52 2020 +0100
upgrade banner: Show the correct button when NEEDS_REBOOT quirk is set
The logic here is that all distro upgrades need a reboot to *use* it,
but only some need a reboot to *deploy* it. We use the
GS_APP_QUIRK_NEEDS_REBOOT to denote distro upgrades that need to reboot
to deploy it, e.g. PackageKit distro upgrades or rpm-ostree rebases.
src/gs-upgrade-banner.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/src/gs-upgrade-banner.c b/src/gs-upgrade-banner.c
index 51b369f5..8abe1d43 100644
--- a/src/gs-upgrade-banner.c
+++ b/src/gs-upgrade-banner.c
@@ -57,20 +57,19 @@ gs_upgrade_banner_refresh (GsUpgradeBanner *self)
name_bold = g_strdup_printf ("<b>%s</b>", gs_app_get_name (priv->app));
version_bold = g_strdup_printf ("<b>%s</b>", gs_app_get_version (priv->app));
- /* Show the right button text. Distributions which are based on OSTree
- * don’t need a post-reboot installation step. */
+ /* Distributions that need to reboot to deploy the upgrade show the "Install" button */
if (gs_app_has_quirk (priv->app, GS_APP_QUIRK_NEEDS_REBOOT)) {
- gtk_button_set_label (GTK_BUTTON (priv->button_upgrades_install),
- _("_Restart Now"));
- gtk_label_set_text (GTK_LABEL (priv->label_upgrades_warning),
- _("Updates will be applied when the "
- "computer is restarted."));
- } else {
gtk_button_set_label (GTK_BUTTON (priv->button_upgrades_install),
_("_Install"));
gtk_label_set_text (GTK_LABEL (priv->label_upgrades_warning),
_("It is recommended that you back up your "
"data and files before upgrading."));
+ } else {
+ gtk_button_set_label (GTK_BUTTON (priv->button_upgrades_install),
+ _("_Restart Now"));
+ gtk_label_set_text (GTK_LABEL (priv->label_upgrades_warning),
+ _("Updates will be applied when the "
+ "computer is restarted."));
}
/* Refresh the title. Normally a distro upgrade state goes from
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]