[gnome-software/wip/kalev/shell-extensions-fixes] details page: Show a different text for shell extensions prefs launching



commit ff4639b198e3e36aec7cd5931dbb0c7f99956d0d
Author: Kalev Lember <klember redhat com>
Date:   Wed Feb 21 11:27:59 2018 +0100

    details page: Show a different text for shell extensions prefs launching
    
    Instead of "Launch", show "Extension Settings" so that it's clear that
    the button is for opening the extension preferences.
    
    This reuses an existing string marked for translation and doesn't break
    the string freeze.

 src/gs-details-page.c  | 12 ++++++++++++
 src/gs-details-page.ui |  1 -
 2 files changed, 12 insertions(+), 1 deletion(-)
---
diff --git a/src/gs-details-page.c b/src/gs-details-page.c
index b8f9eb18..d1dcd2d8 100644
--- a/src/gs-details-page.c
+++ b/src/gs-details-page.c
@@ -352,6 +352,18 @@ gs_details_page_switch_to (GsPage *page, gboolean scroll_up)
                break;
        }
 
+       if (gs_app_get_kind (self->app) == AS_APP_KIND_SHELL_EXTENSION) {
+               /* TRANSLATORS: A label for a button to show the settings for
+                  the selected shell extension. */
+               gtk_button_set_label (GTK_BUTTON (self->button_details_launch),
+                                     _("Extension Settings"));
+       } else {
+               /* TRANSLATORS: A label for a button to execute the selected
+                  application. */
+               gtk_button_set_label (GTK_BUTTON (self->button_details_launch),
+                                     _("_Launch"));
+       }
+
        /* don't show the launch and shortcut buttons if the app doesn't have a desktop ID */
        if (gs_app_get_id (self->app) == NULL) {
                gtk_widget_set_visible (self->button_details_launch, FALSE);
diff --git a/src/gs-details-page.ui b/src/gs-details-page.ui
index 5adc0322..1856013f 100644
--- a/src/gs-details-page.ui
+++ b/src/gs-details-page.ui
@@ -225,7 +225,6 @@
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="use_underline">True</property>
-                                <property name="label" translatable="yes" comments="Translators: A label for 
a button to execute the selected application.">_Launch</property>
                                 <style>
                                   <class name="suggested-action"/>
                                 </style>


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