From 86d9628a94157a9541250551e826bfc272587184 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 29 Jul 2014 14:57:28 +0200 Subject: [PATCH] icon-browser: Hide the description label when empty --- demos/icon-browser/iconbrowserwin.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/demos/icon-browser/iconbrowserwin.c b/demos/icon-browser/iconbrowserwin.c index 47c621d44a..e9dfd30896 100644 --- a/demos/icon-browser/iconbrowserwin.c +++ b/demos/icon-browser/iconbrowserwin.c @@ -104,7 +104,15 @@ item_activated (GtkIconView *icon_view, GtkTreePath *path, IconBrowserWindow *wi set_image (win->image3, name, 32); set_image (win->image4, name, 48); set_image (win->image5, name, 64); - gtk_label_set_text (GTK_LABEL (win->description), description); + if (description && description[0]) + { + gtk_label_set_text (GTK_LABEL (win->description), description); + gtk_widget_show (win->description); + } + else + { + gtk_widget_hide (win->description); + } gtk_window_present (GTK_WINDOW (win->details));