[balsa/gtk4: 207/294] identity: Simplify emptying a GtkBox
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/gtk4: 207/294] identity: Simplify emptying a GtkBox
- Date: Sun, 10 Oct 2021 00:03:12 +0000 (UTC)
commit 10155dea2ce383a52d1c1ada178d7d990c6c366c
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]