[glom] Update EggSpreadTable from libegg.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] Update EggSpreadTable from libegg.
- Date: Wed, 10 Nov 2010 07:33:19 +0000 (UTC)
commit 70a9521e289bbb71d93bac9fd03b07051db7545a
Author: Murray Cumming <murrayc murrayc com>
Date: Wed Nov 10 08:33:10 2010 +0100
Update EggSpreadTable from libegg.
* glom/utility_widgets/eggspreadtable/eggspreadtable.c: Copy from
libegg/libegg/spreadtable/ again, to use Tristan's corrections for the
forall() vfunc.
ChangeLog | 8 +++++++
.../eggspreadtable/eggspreadtable.c | 21 +++++++++----------
2 files changed, 18 insertions(+), 11 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 400e863..a219335 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-11-10 Murray Cumming <murrayc murrayc com>
+
+ Update EggSpreadTable from libegg.
+
+ * glom/utility_widgets/eggspreadtable/eggspreadtable.c: Copy from
+ libegg/libegg/spreadtable/ again, to use Tristan's corrections for the
+ forall() vfunc.
+
2010-11-08 Murray Cumming <murrayc murrayc com>
Call xmlCleanupParser() because libxml++ does not anywmore.
diff --git a/glom/utility_widgets/eggspreadtable/eggspreadtable.c b/glom/utility_widgets/eggspreadtable/eggspreadtable.c
index 3ee48db..c5dbbd1 100644
--- a/glom/utility_widgets/eggspreadtable/eggspreadtable.c
+++ b/glom/utility_widgets/eggspreadtable/eggspreadtable.c
@@ -864,19 +864,18 @@ egg_spread_table_forall (GtkContainer *container,
{
EggSpreadTable *table = EGG_SPREAD_TABLE (container);
EggSpreadTablePrivate *priv = table->priv;
- GList *list = NULL;
+ GList *list;
+ GtkWidget *child;
- /* We use a copy of the list,
- * because the callback could call egg_spread_table_remove(),
- * which would change the list, causing us to use a list->next that
- * is no longer valid.
- */
- for (list = g_list_copy(priv->children); list; list = list->next)
- {
- (* callback) ((GtkWidget*) list->data, callback_data);
- }
+ list = priv->children;
- g_list_free(list);
+ while (list)
+ {
+ child = list->data;
+ list = list->next;
+
+ (* callback) ((GtkWidget*) child, callback_data);
+ }
}
static GType
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]