[gimp] app: don't depend on GimpData sort order for identifying internal data
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: don't depend on GimpData sort order for identifying internal data
- Date: Mon, 1 Oct 2018 09:25:39 +0000 (UTC)
commit 50bab438ce58bf372089664d99026a3ca6866c43
Author: Ell <ell_se yahoo com>
Date: Mon Oct 1 02:25:22 2018 -0400
app: don't depend on GimpData sort order for identifying internal data
In gimp_data_factory_data_foreach(), don't rely on internal
GimpData objects being sorted first (while this is currently true
for all types of GimpData, they may override the sort order.)
app/core/gimpdatafactory.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/app/core/gimpdatafactory.c b/app/core/gimpdatafactory.c
index 6f99551373..9bbe9b5a63 100644
--- a/app/core/gimpdatafactory.c
+++ b/app/core/gimpdatafactory.c
@@ -771,17 +771,12 @@ gimp_data_factory_data_foreach (GimpDataFactory *factory,
list = GIMP_LIST (factory->priv->container)->queue->head;
- if (skip_internal)
- {
- while (list && gimp_data_is_internal (GIMP_DATA (list->data)))
- list = g_list_next (list);
- }
-
while (list)
{
GList *next = g_list_next (list);
- callback (factory, list->data, user_data);
+ if (! (skip_internal && gimp_data_is_internal (list->data)))
+ callback (factory, list->data, user_data);
list = next;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]