[gtk+] Don't show an empty license tab



commit 3c981d23dcfcfbe7895d495cb191dcf29aed9450
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Feb 15 17:59:19 2014 -0500

    Don't show an empty license tab
    
    It is not useful to show a license tab, if there's no license
    to read.  This was pointed out as a possibility in
    https://bugzilla.gnome.org/show_bug.cgi?id=724411

 gtk/gtkaboutdialog.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkaboutdialog.c b/gtk/gtkaboutdialog.c
index 869ea4d..82f7214 100644
--- a/gtk/gtkaboutdialog.c
+++ b/gtk/gtkaboutdialog.c
@@ -667,7 +667,7 @@ update_license_button_visibility (GtkAboutDialog *about)
 {
   GtkAboutDialogPrivate *priv = about->priv;
 
-  if (priv->license_type == GTK_LICENSE_CUSTOM && priv->license != NULL)
+  if (priv->license_type == GTK_LICENSE_CUSTOM && priv->license != NULL && priv->license[0] != '\0')
     gtk_widget_show (priv->license_page);
   else
     gtk_widget_hide (priv->license_page);


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