[gimp] app: replace GimpList's internal GList with a GQueue
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: replace GimpList's internal GList with a GQueue
- Date: Sun, 1 May 2016 13:24:18 +0000 (UTC)
commit 39909b6008ac73b6233bd44c1846b5f4ba9cd5ab
Author: Michael Natterer <mitch gimp org>
Date: Sun May 1 15:22:44 2016 +0200
app: replace GimpList's internal GList with a GQueue
so we can easily iterate in reverse order, and access the last element
in O(1). Nothing makes use of this yet.
app/actions/tool-options-actions.c | 2 +-
app/actions/windows-actions.c | 2 +-
app/core/gimp-templates.c | 2 +-
app/core/gimp.c | 8 ++--
app/core/gimpdatafactory.c | 4 +-
app/core/gimpfilteredcontainer.c | 2 +-
app/core/gimpfilterstack.c | 2 +-
app/core/gimpitem.c | 2 +-
app/core/gimpitemstack.c | 10 ++--
app/core/gimplist.c | 98 ++++++++++++++++++++++------------
app/core/gimplist.h | 4 +-
app/core/gimptaggedcontainer.c | 4 +-
app/core/gimpundostack.c | 4 +-
app/dialogs/convert-indexed-dialog.c | 7 +--
app/menus/windows-menu.c | 2 +-
app/pdb/gimppdbcontext.c | 6 +-
app/pdb/item-cmds.c | 2 +-
app/tools/gimp-tools.c | 2 +-
app/widgets/gimpdeviceeditor.c | 2 +-
app/widgets/gimpdevices.c | 2 +-
app/widgets/gimpdevicestatus.c | 2 +-
app/widgets/gimpdockwindow.c | 2 +-
app/widgets/gimpsettingsbox.c | 4 +-
app/widgets/gimpundoeditor.c | 4 +-
tools/pdbgen/pdb/item.pdb | 2 +-
25 files changed, 104 insertions(+), 77 deletions(-)
---
diff --git a/app/actions/tool-options-actions.c b/app/actions/tool-options-actions.c
index 69a653b..ae39d1a 100644
--- a/app/actions/tool-options-actions.c
+++ b/app/actions/tool-options-actions.c
@@ -201,7 +201,7 @@ tool_options_actions_update_presets (GimpActionGroup *group,
entry.value_variable = FALSE;
entry.help_id = help_id;
- for (list = GIMP_LIST (presets)->list, i = 0;
+ for (list = GIMP_LIST (presets)->queue->head, i = 0;
list;
list = g_list_next (list), i++)
{
diff --git a/app/actions/windows-actions.c b/app/actions/windows-actions.c
index d3121c4..88da6f2 100644
--- a/app/actions/windows-actions.c
+++ b/app/actions/windows-actions.c
@@ -222,7 +222,7 @@ windows_actions_setup (GimpActionGroup *group)
G_CALLBACK (windows_actions_recent_remove),
group, 0);
- for (list = GIMP_LIST (global_recent_docks)->list;
+ for (list = GIMP_LIST (global_recent_docks)->queue->head;
list;
list = g_list_next (list))
{
diff --git a/app/core/gimp-templates.c b/app/core/gimp-templates.c
index 94eca7f..8d7047f 100644
--- a/app/core/gimp-templates.c
+++ b/app/core/gimp-templates.c
@@ -124,7 +124,7 @@ gimp_templates_migrate_get_child_by_name (const GimpContainer *container,
GimpObject *retval = NULL;
GList *glist;
- for (glist = list->list; glist; glist = g_list_next (glist))
+ for (glist = list->queue->head; glist; glist = g_list_next (glist))
{
GimpObject *object = glist->data;
gchar *str1 = g_ascii_strdown (gimp_object_get_name (object), -1);
diff --git a/app/core/gimp.c b/app/core/gimp.c
index 08d4d71..c140c86 100644
--- a/app/core/gimp.c
+++ b/app/core/gimp.c
@@ -1233,7 +1233,7 @@ gimp_get_image_iter (Gimp *gimp)
{
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
- return GIMP_LIST (gimp->images)->list;
+ return GIMP_LIST (gimp->images)->queue->head;
}
GList *
@@ -1241,7 +1241,7 @@ gimp_get_display_iter (Gimp *gimp)
{
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
- return GIMP_LIST (gimp->displays)->list;
+ return GIMP_LIST (gimp->displays)->queue->head;
}
GList *
@@ -1257,7 +1257,7 @@ gimp_get_paint_info_iter (Gimp *gimp)
{
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
- return GIMP_LIST (gimp->paint_info_list)->list;
+ return GIMP_LIST (gimp->paint_info_list)->queue->head;
}
GList *
@@ -1265,7 +1265,7 @@ gimp_get_tool_info_iter (Gimp *gimp)
{
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
- return GIMP_LIST (gimp->tool_info_list)->list;
+ return GIMP_LIST (gimp->tool_info_list)->queue->head;
}
void
diff --git a/app/core/gimpdatafactory.c b/app/core/gimpdatafactory.c
index b548144..37e5463 100644
--- a/app/core/gimpdatafactory.c
+++ b/app/core/gimpdatafactory.c
@@ -318,7 +318,7 @@ gimp_data_factory_data_foreach (GimpDataFactory *factory,
GimpDataForeachFunc callback,
gpointer user_data)
{
- GList *list = GIMP_LIST (factory->priv->container)->list;
+ GList *list = GIMP_LIST (factory->priv->container)->queue->head;
if (skip_internal)
{
@@ -427,7 +427,7 @@ gimp_data_factory_data_save (GimpDataFactory *factory)
if (gimp_container_is_empty (factory->priv->container))
return;
- for (list = GIMP_LIST (factory->priv->container)->list;
+ for (list = GIMP_LIST (factory->priv->container)->queue->head;
list;
list = g_list_next (list))
{
diff --git a/app/core/gimpfilteredcontainer.c b/app/core/gimpfilteredcontainer.c
index e209be0..24ec1a7 100644
--- a/app/core/gimpfilteredcontainer.c
+++ b/app/core/gimpfilteredcontainer.c
@@ -277,7 +277,7 @@ gimp_filtered_container_real_src_thaw (GimpFilteredContainer *filtered_container
{
GList *list;
- for (list = GIMP_LIST (filtered_container->src_container)->list;
+ for (list = GIMP_LIST (filtered_container->src_container)->queue->head;
list;
list = g_list_next (list))
{
diff --git a/app/core/gimpfilterstack.c b/app/core/gimpfilterstack.c
index 2d327ea..9e46312 100644
--- a/app/core/gimpfilterstack.c
+++ b/app/core/gimpfilterstack.c
@@ -224,7 +224,7 @@ gimp_filter_stack_get_graph (GimpFilterStack *stack)
if (stack->graph)
return stack->graph;
- for (list = GIMP_LIST (stack)->list;
+ for (list = GIMP_LIST (stack)->queue->head;
list;
list = g_list_next (list))
{
diff --git a/app/core/gimpitem.c b/app/core/gimpitem.c
index 34ee0df..047b5e4 100644
--- a/app/core/gimpitem.c
+++ b/app/core/gimpitem.c
@@ -815,7 +815,7 @@ gimp_item_get_container_iter (GimpItem *item)
container = gimp_item_get_container (item);
if (container)
- return GIMP_LIST (container)->list;
+ return GIMP_LIST (container)->queue->head;
return NULL;
}
diff --git a/app/core/gimpitemstack.c b/app/core/gimpitemstack.c
index 0045bf3..e913139 100644
--- a/app/core/gimpitemstack.c
+++ b/app/core/gimpitemstack.c
@@ -118,7 +118,7 @@ gimp_item_stack_get_n_items (GimpItemStack *stack)
g_return_val_if_fail (GIMP_IS_ITEM_STACK (stack), 0);
- for (list = GIMP_LIST (stack)->list; list; list = g_list_next (list))
+ for (list = GIMP_LIST (stack)->queue->head; list; list = g_list_next (list))
{
GimpItem *item = list->data;
GimpContainer *children;
@@ -141,7 +141,7 @@ gimp_item_stack_is_flat (GimpItemStack *stack)
g_return_val_if_fail (GIMP_IS_ITEM_STACK (stack), TRUE);
- for (list = GIMP_LIST (stack)->list; list; list = g_list_next (list))
+ for (list = GIMP_LIST (stack)->queue->head; list; list = g_list_next (list))
{
GimpViewable *viewable = list->data;
@@ -157,7 +157,7 @@ gimp_item_stack_get_item_iter (GimpItemStack *stack)
{
g_return_val_if_fail (GIMP_IS_ITEM_STACK (stack), NULL);
- return GIMP_LIST (stack)->list;
+ return GIMP_LIST (stack)->queue->head;
}
GList *
@@ -168,7 +168,7 @@ gimp_item_stack_get_item_list (GimpItemStack *stack)
g_return_val_if_fail (GIMP_IS_ITEM_STACK (stack), NULL);
- for (list = GIMP_LIST (stack)->list;
+ for (list = GIMP_LIST (stack)->queue->head;
list;
list = g_list_next (list))
{
@@ -205,7 +205,7 @@ gimp_item_stack_get_item_by_tattoo (GimpItemStack *stack,
g_return_val_if_fail (GIMP_IS_ITEM_STACK (stack), NULL);
- for (list = GIMP_LIST (stack)->list; list; list = g_list_next (list))
+ for (list = GIMP_LIST (stack)->queue->head; list; list = g_list_next (list))
{
GimpItem *item = list->data;
GimpContainer *children;
diff --git a/app/core/gimplist.c b/app/core/gimplist.c
index 0ae918c..ddadc80 100644
--- a/app/core/gimplist.c
+++ b/app/core/gimplist.c
@@ -2,7 +2,7 @@
* Copyright (C) 1995-1997 Spencer Kimball and Peter Mattis
*
* gimplist.c
- * Copyright (C) 2001 Michael Natterer <mitch gimp org>
+ * Copyright (C) 2001-2016 Michael Natterer <mitch gimp org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -27,6 +27,7 @@
#include "core-types.h"
+#include "gimp-memsize.h"
#include "gimplist.h"
@@ -39,6 +40,7 @@ enum
};
+static void gimp_list_finalize (GObject *object);
static void gimp_list_set_property (GObject *object,
guint property_id,
const GValue *value,
@@ -89,6 +91,7 @@ gimp_list_class_init (GimpListClass *klass)
GimpObjectClass *gimp_object_class = GIMP_OBJECT_CLASS (klass);
GimpContainerClass *container_class = GIMP_CONTAINER_CLASS (klass);
+ object_class->finalize = gimp_list_finalize;
object_class->set_property = gimp_list_set_property;
object_class->get_property = gimp_list_get_property;
@@ -128,13 +131,27 @@ gimp_list_class_init (GimpListClass *klass)
static void
gimp_list_init (GimpList *list)
{
- list->list = NULL;
+ list->queue = g_queue_new ();
list->unique_names = FALSE;
list->sort_func = NULL;
list->append = FALSE;
}
static void
+gimp_list_finalize (GObject *object)
+{
+ GimpList *list = GIMP_LIST (object);
+
+ if (list->queue)
+ {
+ g_queue_free (list->queue);
+ list->queue = NULL;
+ }
+
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
gimp_list_set_property (GObject *object,
guint property_id,
const GValue *value,
@@ -193,22 +210,32 @@ gimp_list_get_memsize (GimpObject *object,
GimpList *list = GIMP_LIST (object);
gint64 memsize = 0;
- memsize += (gimp_container_get_n_children (GIMP_CONTAINER (list)) *
- sizeof (GList));
-
if (gimp_container_get_policy (GIMP_CONTAINER (list)) ==
GIMP_CONTAINER_POLICY_STRONG)
{
- GList *glist;
-
- for (glist = list->list; glist; glist = g_list_next (glist))
- memsize += gimp_object_get_memsize (GIMP_OBJECT (glist->data), gui_size);
+ memsize += gimp_g_queue_get_memsize_foreach (list->queue,
+ (GimpMemsizeFunc) gimp_object_get_memsize,
+ gui_size);
+ }
+ else
+ {
+ memsize += gimp_g_queue_get_memsize (list->queue, 0);
}
return memsize + GIMP_OBJECT_CLASS (parent_class)->get_memsize (object,
gui_size);
}
+static gint
+gimp_list_sort_func (gconstpointer a,
+ gconstpointer b,
+ gpointer user_data)
+{
+ GCompareFunc func = user_data;
+
+ return func (a, b);
+}
+
static void
gimp_list_add (GimpContainer *container,
GimpObject *object)
@@ -224,11 +251,18 @@ gimp_list_add (GimpContainer *container,
list);
if (list->sort_func)
- list->list = g_list_insert_sorted (list->list, object, list->sort_func);
+ {
+ g_queue_insert_sorted (list->queue, object, gimp_list_sort_func,
+ list->sort_func);
+ }
else if (list->append)
- list->list = g_list_append (list->list, object);
+ {
+ g_queue_push_tail (list->queue, object);
+ }
else
- list->list = g_list_prepend (list->list, object);
+ {
+ g_queue_push_head (list->queue, object);
+ }
GIMP_CONTAINER_CLASS (parent_class)->add (container, object);
}
@@ -244,7 +278,7 @@ gimp_list_remove (GimpContainer *container,
gimp_list_object_renamed,
list);
- list->list = g_list_remove (list->list, object);
+ g_queue_remove (list->queue, object);
GIMP_CONTAINER_CLASS (parent_class)->remove (container, object);
}
@@ -256,12 +290,12 @@ gimp_list_reorder (GimpContainer *container,
{
GimpList *list = GIMP_LIST (container);
- list->list = g_list_remove (list->list, object);
+ g_queue_remove (list->queue, object);
if (new_index == gimp_container_get_n_children (container) - 1)
- list->list = g_list_append (list->list, object);
+ g_queue_push_tail (list->queue, object);
else
- list->list = g_list_insert (list->list, object, new_index);
+ g_queue_push_nth (list->queue, object, new_index);
}
static void
@@ -269,8 +303,8 @@ gimp_list_clear (GimpContainer *container)
{
GimpList *list = GIMP_LIST (container);
- while (list->list)
- gimp_container_remove (container, list->list->data);
+ while (g_queue_peek_head (list->queue))
+ gimp_container_remove (container, g_queue_peek_head (list->queue));
}
static gboolean
@@ -279,7 +313,7 @@ gimp_list_have (const GimpContainer *container,
{
GimpList *list = GIMP_LIST (container);
- return g_list_find (list->list, object) ? TRUE : FALSE;
+ return g_queue_find (list->queue, object) ? TRUE : FALSE;
}
static void
@@ -289,7 +323,7 @@ gimp_list_foreach (const GimpContainer *container,
{
GimpList *list = GIMP_LIST (container);
- g_list_foreach (list->list, func, user_data);
+ g_queue_foreach (list->queue, func, user_data);
}
static GimpObject *
@@ -299,7 +333,7 @@ gimp_list_get_child_by_name (const GimpContainer *container,
GimpList *list = GIMP_LIST (container);
GList *glist;
- for (glist = list->list; glist; glist = g_list_next (glist))
+ for (glist = list->queue->head; glist; glist = g_list_next (glist))
{
GimpObject *object = glist->data;
@@ -315,14 +349,8 @@ gimp_list_get_child_by_index (const GimpContainer *container,
gint index)
{
GimpList *list = GIMP_LIST (container);
- GList *glist;
- glist = g_list_nth (list->list, index);
-
- if (glist)
- return (GimpObject *) glist->data;
-
- return NULL;
+ return g_queue_peek_nth (list->queue, index);
}
static gint
@@ -331,7 +359,7 @@ gimp_list_get_child_index (const GimpContainer *container,
{
GimpList *list = GIMP_LIST (container);
- return g_list_index (list->list, (gpointer) object);
+ return g_queue_index (list->queue, (gpointer) object);
}
/**
@@ -416,7 +444,7 @@ gimp_list_reverse (GimpList *list)
if (gimp_container_get_n_children (GIMP_CONTAINER (list)) > 1)
{
gimp_container_freeze (GIMP_CONTAINER (list));
- list->list = g_list_reverse (list->list);
+ g_queue_reverse (list->queue);
gimp_container_thaw (GIMP_CONTAINER (list));
}
}
@@ -480,7 +508,7 @@ gimp_list_sort (GimpList *list,
if (gimp_container_get_n_children (GIMP_CONTAINER (list)) > 1)
{
gimp_container_freeze (GIMP_CONTAINER (list));
- list->list = g_list_sort (list->list, sort_func);
+ g_queue_sort (list->queue, gimp_list_sort_func, sort_func);
gimp_container_thaw (GIMP_CONTAINER (list));
}
}
@@ -512,7 +540,7 @@ gimp_list_uniquefy_name (GimpList *gimp_list,
if (! name)
return;
- for (list = gimp_list->list; list; list = g_list_next (list))
+ for (list = gimp_list->queue->head; list; list = g_list_next (list))
{
GimpObject *object2 = list->data;
const gchar *name2 = gimp_object_get_name (object2);
@@ -563,7 +591,7 @@ gimp_list_uniquefy_name (GimpList *gimp_list,
new_name = g_strdup_printf ("%s #%d", name, unique_ext);
- for (list = gimp_list->list; list; list = g_list_next (list))
+ for (list = gimp_list->queue->head; list; list = g_list_next (list))
{
GimpObject *object2 = list->data;
const gchar *name2 = gimp_object_get_name (object2);
@@ -605,9 +633,9 @@ gimp_list_object_renamed (GimpObject *object,
gint old_index;
gint new_index = 0;
- old_index = g_list_index (list->list, object);
+ old_index = g_queue_index (list->queue, object);
- for (glist = list->list; glist; glist = g_list_next (glist))
+ for (glist = list->queue->head; glist; glist = g_list_next (glist))
{
GimpObject *object2 = GIMP_OBJECT (glist->data);
diff --git a/app/core/gimplist.h b/app/core/gimplist.h
index b6c44de..35719b8 100644
--- a/app/core/gimplist.h
+++ b/app/core/gimplist.h
@@ -2,7 +2,7 @@
* Copyright (C) 1995-1997 Spencer Kimball and Peter Mattis
*
* gimplist.h
- * Copyright (C) 2001 Michael Natterer <mitch gimp org>
+ * Copyright (C) 2001-2016 Michael Natterer <mitch gimp org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -39,7 +39,7 @@ struct _GimpList
{
GimpContainer parent_instance;
- GList *list;
+ GQueue *queue;
gboolean unique_names;
GCompareFunc sort_func;
gboolean append;
diff --git a/app/core/gimptaggedcontainer.c b/app/core/gimptaggedcontainer.c
index 75fc047..3714203 100644
--- a/app/core/gimptaggedcontainer.c
+++ b/app/core/gimptaggedcontainer.c
@@ -156,7 +156,7 @@ gimp_tagged_container_clear (GimpContainer *container)
GimpTaggedContainer *tagged_container = GIMP_TAGGED_CONTAINER (container);
GList *list;
- for (list = GIMP_LIST (filtered_container->src_container)->list;
+ for (list = GIMP_LIST (filtered_container->src_container)->queue->head;
list;
list = g_list_next (list))
{
@@ -242,7 +242,7 @@ gimp_tagged_container_src_thaw (GimpFilteredContainer *filtered_container)
{
GList *list;
- for (list = GIMP_LIST (filtered_container->src_container)->list;
+ for (list = GIMP_LIST (filtered_container->src_container)->queue->head;
list;
list = g_list_next (list))
{
diff --git a/app/core/gimpundostack.c b/app/core/gimpundostack.c
index 1be843e..4aff7a9 100644
--- a/app/core/gimpundostack.c
+++ b/app/core/gimpundostack.c
@@ -101,7 +101,7 @@ gimp_undo_stack_pop (GimpUndo *undo,
GimpUndoStack *stack = GIMP_UNDO_STACK (undo);
GList *list;
- for (list = GIMP_LIST (stack->undos)->list;
+ for (list = GIMP_LIST (stack->undos)->queue->head;
list;
list = g_list_next (list))
{
@@ -118,7 +118,7 @@ gimp_undo_stack_free (GimpUndo *undo,
GimpUndoStack *stack = GIMP_UNDO_STACK (undo);
GList *list;
- for (list = GIMP_LIST (stack->undos)->list;
+ for (list = GIMP_LIST (stack->undos)->queue->head;
list;
list = g_list_next (list))
{
diff --git a/app/dialogs/convert-indexed-dialog.c b/app/dialogs/convert-indexed-dialog.c
index f93948c..664d50e 100644
--- a/app/dialogs/convert-indexed-dialog.c
+++ b/app/dialogs/convert-indexed-dialog.c
@@ -352,7 +352,6 @@ convert_dialog_palette_box (IndexedDialog *dialog)
{
Gimp *gimp = dialog->image->gimp;
GList *list;
- GimpPalette *palette;
GimpPalette *web_palette = NULL;
gboolean default_found = FALSE;
@@ -376,11 +375,11 @@ convert_dialog_palette_box (IndexedDialog *dialog)
g_object_weak_ref (G_OBJECT (dialog->dialog),
(GWeakNotify) g_object_unref, dialog->container);
- for (list = GIMP_LIST (dialog->container)->list;
+ for (list = GIMP_LIST (dialog->container)->queue->head;
list;
list = g_list_next (list))
{
- palette = list->data;
+ GimpPalette *palette = list->data;
/* Preferentially, the initial default is 'Web' if available */
if (web_palette == NULL &&
@@ -401,7 +400,7 @@ convert_dialog_palette_box (IndexedDialog *dialog)
if (web_palette)
dialog->custom_palette = web_palette;
else
- dialog->custom_palette = GIMP_LIST (dialog->container)->list->data;
+ dialog->custom_palette = GIMP_LIST (dialog->container)->queue->head->data;
}
gimp_context_set_palette (dialog->context, dialog->custom_palette);
diff --git a/app/menus/windows-menu.c b/app/menus/windows-menu.c
index 75e20f1..0c09a58 100644
--- a/app/menus/windows-menu.c
+++ b/app/menus/windows-menu.c
@@ -139,7 +139,7 @@ windows_menu_setup (GimpUIManager *manager,
G_CALLBACK (windows_menu_recent_remove),
manager, 0);
- for (list = g_list_last (GIMP_LIST (global_recent_docks)->list);
+ for (list = g_list_last (GIMP_LIST (global_recent_docks)->queue->head);
list;
list = g_list_previous (list))
{
diff --git a/app/pdb/gimppdbcontext.c b/app/pdb/gimppdbcontext.c
index 267758c..673a5e8 100644
--- a/app/pdb/gimppdbcontext.c
+++ b/app/pdb/gimppdbcontext.c
@@ -409,7 +409,7 @@ gimp_pdb_context_reset (GimpConfig *config)
GimpPDBContext *context = GIMP_PDB_CONTEXT (config);
GList *list;
- for (list = GIMP_LIST (context->paint_options_list)->list;
+ for (list = GIMP_LIST (context->paint_options_list)->queue->head;
list;
list = g_list_next (list))
{
@@ -462,7 +462,7 @@ gimp_pdb_context_new (Gimp *gimp,
}
else
{
- for (list = GIMP_LIST (GIMP_PDB_CONTEXT (parent)->paint_options_list)->list;
+ for (list = GIMP_LIST (GIMP_PDB_CONTEXT (parent)->paint_options_list)->queue->head;
list;
list = g_list_next (list))
{
@@ -508,7 +508,7 @@ gimp_pdb_context_get_brush_options (GimpPDBContext *context)
g_return_val_if_fail (GIMP_IS_PDB_CONTEXT (context), NULL);
- for (list = GIMP_LIST (context->paint_options_list)->list;
+ for (list = GIMP_LIST (context->paint_options_list)->queue->head;
list;
list = g_list_next (list))
{
diff --git a/app/pdb/item-cmds.c b/app/pdb/item-cmds.c
index 6194593..652320f 100644
--- a/app/pdb/item-cmds.c
+++ b/app/pdb/item-cmds.c
@@ -419,7 +419,7 @@ item_get_children_invoker (GimpProcedure *procedure,
child_ids = g_new (gint32, num_children);
- for (list = GIMP_LIST (children)->list, i = 0;
+ for (list = GIMP_LIST (children)->queue->head, i = 0;
list;
list = g_list_next (list), i++)
{
diff --git a/app/tools/gimp-tools.c b/app/tools/gimp-tools.c
index e0477cc..0ff0f01 100644
--- a/app/tools/gimp-tools.c
+++ b/app/tools/gimp-tools.c
@@ -279,7 +279,7 @@ gimp_tools_restore (Gimp *gimp)
gimp_list_reverse (GIMP_LIST (gimp_list));
- for (list = GIMP_LIST (gimp_list)->list, i = 0;
+ for (list = GIMP_LIST (gimp_list)->queue->head, i = 0;
list;
list = g_list_next (list), i++)
{
diff --git a/app/widgets/gimpdeviceeditor.c b/app/widgets/gimpdeviceeditor.c
index b3824ba..5e31327 100644
--- a/app/widgets/gimpdeviceeditor.c
+++ b/app/widgets/gimpdeviceeditor.c
@@ -246,7 +246,7 @@ gimp_device_editor_constructed (GObject *object)
G_CALLBACK (gimp_device_editor_device_changed),
editor);
- for (list = GIMP_LIST (devices)->list;
+ for (list = GIMP_LIST (devices)->queue->head;
list;
list = g_list_next (list))
{
diff --git a/app/widgets/gimpdevices.c b/app/widgets/gimpdevices.c
index 0dfae7a..721f174 100644
--- a/app/widgets/gimpdevices.c
+++ b/app/widgets/gimpdevices.c
@@ -99,7 +99,7 @@ gimp_devices_restore (Gimp *gimp)
user_context = gimp_get_user_context (gimp);
- for (list = GIMP_LIST (manager)->list;
+ for (list = GIMP_LIST (manager)->queue->head;
list;
list = g_list_next (list))
{
diff --git a/app/widgets/gimpdevicestatus.c b/app/widgets/gimpdevicestatus.c
index 43269ea..ec0f9c7 100644
--- a/app/widgets/gimpdevicestatus.c
+++ b/app/widgets/gimpdevicestatus.c
@@ -155,7 +155,7 @@ gimp_device_status_constructed (GObject *object)
devices = GIMP_CONTAINER (gimp_devices_get_manager (status->gimp));
- for (list = GIMP_LIST (devices)->list; list; list = list->next)
+ for (list = GIMP_LIST (devices)->queue->head; list; list = list->next)
gimp_device_status_device_add (devices, list->data, status);
g_signal_connect_object (devices, "add",
diff --git a/app/widgets/gimpdockwindow.c b/app/widgets/gimpdockwindow.c
index 487234f..f5d4fb7 100644
--- a/app/widgets/gimpdockwindow.c
+++ b/app/widgets/gimpdockwindow.c
@@ -1040,7 +1040,7 @@ gimp_dock_window_image_changed (GimpDockWindow *dock_window,
{
GList *list;
- for (list = GIMP_LIST (display_container)->list;
+ for (list = GIMP_LIST (display_container)->queue->head;
list;
list = g_list_next (list))
{
diff --git a/app/widgets/gimpsettingsbox.c b/app/widgets/gimpsettingsbox.c
index b63a2f7..b37c44e 100644
--- a/app/widgets/gimpsettingsbox.c
+++ b/app/widgets/gimpsettingsbox.c
@@ -916,7 +916,7 @@ gimp_settings_box_truncate_list (GimpSettingsBox *box,
GList *list;
gint n_recent = 0;
- list = GIMP_LIST (private->container)->list;
+ list = GIMP_LIST (private->container)->queue->head;
while (list)
{
GimpConfig *config = list->data;
@@ -1001,7 +1001,7 @@ gimp_settings_box_add_current (GimpSettingsBox *box,
private = GET_PRIVATE (box);
- for (list = GIMP_LIST (private->container)->list;
+ for (list = GIMP_LIST (private->container)->queue->head;
list;
list = g_list_next (list))
{
diff --git a/app/widgets/gimpundoeditor.c b/app/widgets/gimpundoeditor.c
index 2226007..8a3867a 100644
--- a/app/widgets/gimpundoeditor.c
+++ b/app/widgets/gimpundoeditor.c
@@ -262,7 +262,7 @@ gimp_undo_editor_fill (GimpUndoEditor *editor)
NULL);
/* the list prepends its items, so first add the redo items... */
- for (list = GIMP_LIST (redo_stack->undos)->list;
+ for (list = GIMP_LIST (redo_stack->undos)->queue->head;
list;
list = g_list_next (list))
{
@@ -273,7 +273,7 @@ gimp_undo_editor_fill (GimpUndoEditor *editor)
gimp_list_reverse (GIMP_LIST (editor->container));
/* ...then add the undo items in descending order... */
- for (list = GIMP_LIST (undo_stack->undos)->list;
+ for (list = GIMP_LIST (undo_stack->undos)->queue->head;
list;
list = g_list_next (list))
{
diff --git a/tools/pdbgen/pdb/item.pdb b/tools/pdbgen/pdb/item.pdb
index 6d99a51..58f07db 100644
--- a/tools/pdbgen/pdb/item.pdb
+++ b/tools/pdbgen/pdb/item.pdb
@@ -404,7 +404,7 @@ HELP
child_ids = g_new (gint32, num_children);
- for (list = GIMP_LIST (children)->list, i = 0;
+ for (list = GIMP_LIST (children)->queue->head, i = 0;
list;
list = g_list_next (list), i++)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]