[gnome-software] Do not show insanely long licence strings
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Do not show insanely long licence strings
- Date: Wed, 9 Oct 2013 16:32:17 +0000 (UTC)
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]