Commit 8b8f38fa authored by Kalev Lember's avatar Kalev Lember

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.
parent 4cbe26f8
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment