[gnome-builder] plugins/flatpak: cleanup display name for flatpak runtimes



commit 71904362180e6dfa10813d05cf3589d6659fca4c
Author: Christian Hergert <chergert redhat com>
Date:   Tue Jul 19 19:37:15 2022 -0700

    plugins/flatpak: cleanup display name for flatpak runtimes
    
    This makes it nicer in the popover for combo box rows.

 src/plugins/flatpak/gbp-flatpak-runtime.c | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)
---
diff --git a/src/plugins/flatpak/gbp-flatpak-runtime.c b/src/plugins/flatpak/gbp-flatpak-runtime.c
index 26bba560c..4cf243710 100644
--- a/src/plugins/flatpak/gbp-flatpak-runtime.c
+++ b/src/plugins/flatpak/gbp-flatpak-runtime.c
@@ -882,9 +882,7 @@ gbp_flatpak_runtime_new (IdeObject  *parent,
 {
   g_autofree char *id = NULL;
   g_autofree char *short_id = NULL;
-  g_autofree char *display_name = NULL;
   g_autofree char *triplet = NULL;
-  g_autofree char *runtime_name = NULL;
   g_autoptr(IdeTriplet) triplet_object = NULL;
   g_autoptr(GString) category = NULL;
 
@@ -919,13 +917,6 @@ gbp_flatpak_runtime_new (IdeObject  *parent,
   else
     g_string_append_printf (category, "%s (%s)", name, arch);
 
-  if (g_str_equal (arch, ide_get_system_arch ()))
-    display_name = g_strdup_printf (_("%s <b>%s</b>"), name, branch);
-  else
-    display_name = g_strdup_printf (_("%s <b>%s</b> <span fgalpha='36044'>%s</span>"), name, branch, arch);
-
-  runtime_name = g_strdup_printf ("%s %s", _("Flatpak"), triplet);
-
   return g_object_new (GBP_TYPE_FLATPAK_RUNTIME,
                        "parent", parent,
                        "id", id,
@@ -933,9 +924,9 @@ gbp_flatpak_runtime_new (IdeObject  *parent,
                        "triplet", triplet_object,
                        "branch", branch,
                        "category", category->str,
-                       "name", runtime_name,
+                       "name", triplet,
                        "deploy-dir", deploy_dir,
-                       "display-name", display_name,
+                       "display-name", triplet,
                        "platform", name,
                        "sdk", sdk_name,
                        NULL);


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