diff options
author | Matthias Clasen <mclasen@redhat.com> | 2022-11-28 06:26:28 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2022-11-28 14:34:55 -0500 |
commit | c823ea4a7037b03744e4e9207b652c6c52d883ce (patch) | |
tree | 2329119973caa5d67dba8d8aba48657b50465bf1 | |
parent | fb8e52f0c957fa7880b9e1c57b15aa6a986def5e (diff) | |
download | gtk+-c823ea4a7037b03744e4e9207b652c6c52d883ce.tar.gz |
icon browser: Stop using gtk_widget_show/hide
-rw-r--r-- | demos/icon-browser/iconbrowserwin.c | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/demos/icon-browser/iconbrowserwin.c b/demos/icon-browser/iconbrowserwin.c index d0da5c464c..de0dea873f 100644 --- a/demos/icon-browser/iconbrowserwin.c +++ b/demos/icon-browser/iconbrowserwin.c @@ -192,26 +192,13 @@ item_activated (GtkGridView *view, set_image (win->image5, name, 32); set_image (win->image6, name, 48); set_image (win->image7, name, 64); + gtk_widget_set_visible (win->image8, symbolic); + gtk_widget_set_visible (win->label8, symbolic); if (symbolic) - { - gtk_widget_show (win->image8); - gtk_widget_show (win->label8); - set_image (win->image8, name, 64); - } - else - { - gtk_widget_hide (win->image8); - gtk_widget_hide (win->label8); - } + set_image (win->image8, name, 64); + gtk_widget_set_visible (win->description, description && description[0]); 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_label_set_text (GTK_LABEL (win->description), description); gtk_window_present (GTK_WINDOW (win->details)); |