[balsa/gtk4: 233/314] identity: Simplify emptying a GtkBox
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/gtk4: 233/314] identity: Simplify emptying a GtkBox
- Date: Sat, 19 Jun 2021 21:03:51 +0000 (UTC)
commit 8fa7f7e6b0444afd02bc056eefe3e62a70b49626
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Thu Oct 22 13:02:33 2020 -0400
identity: Simplify emptying a GtkBox
libbalsa/identity.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/libbalsa/identity.c b/libbalsa/identity.c
index 5767e53ff..c474d2989 100644
--- a/libbalsa/identity.c
+++ b/libbalsa/identity.c
@@ -1227,12 +1227,9 @@ md_face_path_changed(const gchar * filename, gboolean active,
return;
}
- child = gtk_widget_get_first_child(face_box);
- while (child != NULL) {
- GtkWidget *this_child = child;
- child = gtk_widget_get_next_sibling(child);
- gtk_box_remove(GTK_BOX(face_box), this_child);
- }
+ while ((child = gtk_widget_get_first_child(face_box)) != NULL)
+ gtk_box_remove(GTK_BOX(face_box), child);
+
gtk_box_append(GTK_BOX(face_box), image);
gtk_widget_show(face_box);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]