Exemplo n.º 1
0
static void
gimp_undo_stack_pop (GimpUndo            *undo,
                     GimpUndoMode         undo_mode,
                     GimpUndoAccumulator *accum)
{
  GimpUndoStack *stack = GIMP_UNDO_STACK (undo);
  GList         *list;

  for (list = GIMP_LIST (stack->undos)->list;
       list;
       list = g_list_next (list))
    {
      GimpUndo *child = list->data;

      gimp_undo_pop (child, undo_mode, accum);
    }
}
Exemplo n.º 2
0
GimpUndo *
gimp_undo_stack_pop_undo (GimpUndoStack       *stack,
                          GimpUndoMode         undo_mode,
                          GimpUndoAccumulator *accum)
{
  GimpUndo *undo;

  g_return_val_if_fail (GIMP_IS_UNDO_STACK (stack), NULL);
  g_return_val_if_fail (accum != NULL, NULL);

  undo = GIMP_UNDO (gimp_container_get_first_child (stack->undos));

  if (undo)
    {
      gimp_container_remove (stack->undos, GIMP_OBJECT (undo));
      gimp_undo_pop (undo, undo_mode, accum);

      return undo;
    }

  return NULL;
}