[gnome-software] Do not show insanely long licence strings



commit 4fbf584bb015bc3729bb41462151487644514e2c
Author: Richard Hughes <richard hughsie com>
Date:   Wed Oct 9 17:08:36 2013 +0100

    Do not show insanely long licence strings
    
    You get a huge licence string for any of the LibreOffice packages.

 src/gs-shell-details.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-shell-details.c b/src/gs-shell-details.c
index c645891..4709551 100644
--- a/src/gs-shell-details.c
+++ b/src/gs-shell-details.c
@@ -342,8 +342,15 @@ gs_shell_details_refresh_all (GsShellDetails *shell_details)
        if (tmp == NULL) {
                /* TRANSLATORS: this is where the licence is not known */
                gtk_label_set_label (GTK_LABEL (widget), _("Unknown"));
+               gtk_widget_set_tooltip_text (widget, NULL);
+       } else if (strlen (tmp) > 20) {
+               /* TRANSLATORS: this is where the licence is insanely
+                * complicated and the full string is put into the tooltip */
+               gtk_label_set_label (GTK_LABEL (widget), _("Complicated!"));
+               gtk_widget_set_tooltip_text (widget, tmp);
        } else {
                gtk_label_set_label (GTK_LABEL (widget), tmp);
+               gtk_widget_set_tooltip_text (widget, NULL);
        }
 
        /* set version */


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