[gnome-software/wip/kalev/fix-upgrade-text] Revert "gs-upgrade-banner: Change button/label text for reboot upgrades"



commit b3d79c517a65d0db7ffe175d3eadeab09aaeb136
Author: Kalev Lember <klember redhat com>
Date:   Thu Feb 27 13:47:50 2020 +0100

    Revert "gs-upgrade-banner: Change button/label text for reboot upgrades"
    
    This broke the distro upgrade text for both PackageKit and rpm-ostree
    backends.
    
    This reverts commit d8c06890808eca89ed29ebe33a760a56ca4d89a5.

 src/gs-upgrade-banner.c  | 16 ----------------
 src/gs-upgrade-banner.ui |  4 ++--
 2 files changed, 2 insertions(+), 18 deletions(-)
---
diff --git a/src/gs-upgrade-banner.c b/src/gs-upgrade-banner.c
index 51b369f5..70473c28 100644
--- a/src/gs-upgrade-banner.c
+++ b/src/gs-upgrade-banner.c
@@ -57,22 +57,6 @@ 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. */
-       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."));
-       }
-
        /* Refresh the title. Normally a distro upgrade state goes from
         *
         * AVAILABLE (available to download) to
diff --git a/src/gs-upgrade-banner.ui b/src/gs-upgrade-banner.ui
index 3e53a257..b69c3bda 100644
--- a/src/gs-upgrade-banner.ui
+++ b/src/gs-upgrade-banner.ui
@@ -82,7 +82,7 @@
             <child>
               <object class="GtkLabel" id="label_upgrades_warning">
                 <property name="visible">True</property>
-                <property name="label"></property><!-- Set in code -->
+                <property name="label" translatable="yes">It is recommended that you back up your data and 
files before upgrading.</property>
                 <property name="justify">center</property>
                 <property name="wrap">True</property>
               </object>
@@ -119,7 +119,7 @@
             </child>
             <child>
               <object class="GtkButton" id="button_upgrades_install">
-                <property name="label">_Install</property><!-- Set in code -->
+                <property name="label" translatable="yes">_Install</property>
                 <property name="width_request">150</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]