[gnome-software/1160-don-t-show-version-history-dialog-when-it-has-one-entry] gs-details-page: Hide "Version History" button when there's only one version



commit f2060e8b9f45015e298a8ce66ff8fd8ae71cb8c4
Author: Milan Crha <mcrha redhat com>
Date:   Thu May 20 17:21:44 2021 +0200

    gs-details-page: Hide "Version History" button when there's only one version
    
    In the case there's only one version provided the "Version History" opens the dialog
    with exactly the same information as is shown in the details page. Hide it, to not
    confuse the user.
    
    Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1160

 src/gs-details-page.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/src/gs-details-page.c b/src/gs-details-page.c
index 728f0e5bb..b1356c470 100644
--- a/src/gs-details-page.c
+++ b/src/gs-details-page.c
@@ -1374,6 +1374,8 @@ gs_details_page_refresh_all (GsDetailsPage *self)
                                                     as_release_get_description (latest_version));
        }
 
+       gtk_widget_set_visible (self->version_history_button, version_history != NULL && version_history->len 
1);
+
        /* refresh size information */
        gs_details_page_refresh_size (self);
 


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