[balsa/gtk4: 220/311] identity: Simplify emptying a GtkBox
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/gtk4: 220/311] identity: Simplify emptying a GtkBox
- Date: Fri, 17 Dec 2021 19:54:25 +0000 (UTC)
commit 6f91d3ab0496ee1f67e7665886ba5e8d4e691fca
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]