[gnome-software: 1/2] gs-app-details-page: Change the title to ‘Update Details’




commit 2dfbc864e9a4212cb8449bdae6fc6fc34c26ce31
Author: Philip Withnall <pwithnall endlessos org>
Date:   Mon Jul 25 20:15:38 2022 +0200

    gs-app-details-page: Change the title to ‘Update Details’
    
    It looks weird to show the package name and/or version in the dialog
    title. Instead, just consistently show ‘Update Details’.
    
    If we later decide that we need to show the package name/version
    somewhere, the right place for it is lower down in the dialog, not in
    the title bar.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>
    
    Fixes: #1460

 src/gs-app-details-page.c | 27 +--------------------------
 1 file changed, 1 insertion(+), 26 deletions(-)
---
diff --git a/src/gs-app-details-page.c b/src/gs-app-details-page.c
index 88b38d8e3..c224f2a66 100644
--- a/src/gs-app-details-page.c
+++ b/src/gs-app-details-page.c
@@ -154,7 +154,6 @@ populate_permissions_section (GsAppDetailsPage *page,
 static void
 set_updates_description_ui (GsAppDetailsPage *page, GsApp *app)
 {
-       AsComponentKind kind;
        g_autoptr(GIcon) icon = NULL;
        guint icon_size;
        const gchar *update_details;
@@ -164,31 +163,7 @@ set_updates_description_ui (GsAppDetailsPage *page, GsApp *app)
        /* FIXME support app == NULL */
 
        /* set window title */
-       kind = gs_app_get_kind (app);
-       if (kind == AS_COMPONENT_KIND_GENERIC &&
-           gs_app_get_special_kind (app) == GS_APP_SPECIAL_KIND_OS_UPDATE) {
-               adw_window_title_set_title (page->window_title, gs_app_get_name (app));
-       } else if (gs_app_get_source_default (app) != NULL &&
-                  gs_app_get_update_version (app) != NULL) {
-               g_autofree gchar *tmp = NULL;
-               /* Translators: This is the source and upgrade version of an
-                * application, shown to the user when they view more detailed
-                * information about pending updates. The source is of the form
-                * ‘deja-dup’ (a package name) or
-                * ‘app/org.gnome.Builder/x86_64/main’ (a flatpak ID), and the
-                * version is of the form ‘40.4-1.fc34’ (a version number). */
-               tmp = g_strdup_printf (_("%s %s"),
-                                      gs_app_get_source_default (app),
-                                      gs_app_get_update_version (app));
-               adw_window_title_set_title (page->window_title, tmp);
-       } else if (gs_app_get_source_default (app) != NULL) {
-               adw_window_title_set_title (page->window_title,
-                                           gs_app_get_source_default (app));
-       } else {
-               adw_window_title_set_title (page->window_title,
-                                           gs_app_get_update_version (app));
-       }
-
+       adw_window_title_set_title (page->window_title, _("Update Details"));
        g_object_notify_by_pspec (G_OBJECT (page), obj_props[PROP_TITLE]);
 
        /* set update header */


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