gimp r27526 - in trunk: . app/actions app/core app/dialogs app/display app/gui app/menus app/pdb app/tools app/widgets tools/pdbgen/pdb
- From: mitch svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r27526 - in trunk: . app/actions app/core app/dialogs app/display app/gui app/menus app/pdb app/tools app/widgets tools/pdbgen/pdb
- Date: Sun, 2 Nov 2008 21:34:15 +0000 (UTC)
Author: mitch
Date: Sun Nov 2 21:34:14 2008
New Revision: 27526
URL: http://svn.gnome.org/viewvc/gimp?rev=27526&view=rev
Log:
2008-11-02 Michael Natterer <mitch gimp org>
* app/core/gimp.[ch]: add new functions gimp_get_image_iter(),
display_iter() and tool_info_iter().
* app/tools/gimp-tools.c
* app/tools/gimptexttool.c
* app/tools/gimpvectortool.c
* app/dialogs/quit-dialog.c
* app/gui/gui.c
* app/menus/windows-menu.c
* app/actions/images-commands.c
* app/actions/tools-actions.c
* app/actions/windows-actions.c
* app/actions/tool-options-commands.c
* app/display/gimpdisplay.c
* app/display/gimpdisplay-foreach.c
* app/widgets/gimptoolbox.c
* tools/pdbgen/pdb/image.pdb: use them here.
* app/pdb/image-cmds.c: regenerated.
Modified:
trunk/ChangeLog
trunk/app/actions/images-commands.c
trunk/app/actions/tool-options-commands.c
trunk/app/actions/tools-actions.c
trunk/app/actions/windows-actions.c
trunk/app/core/gimp.c
trunk/app/core/gimp.h
trunk/app/dialogs/quit-dialog.c
trunk/app/display/gimpdisplay-foreach.c
trunk/app/display/gimpdisplay.c
trunk/app/gui/gui.c
trunk/app/menus/windows-menu.c
trunk/app/pdb/image-cmds.c
trunk/app/tools/gimp-tools.c
trunk/app/tools/gimptexttool.c
trunk/app/tools/gimpvectortool.c
trunk/app/widgets/gimptoolbox.c
trunk/tools/pdbgen/pdb/image.pdb
Modified: trunk/app/actions/images-commands.c
==============================================================================
--- trunk/app/actions/images-commands.c (original)
+++ trunk/app/actions/images-commands.c Sun Nov 2 21:34:14 2008
@@ -24,9 +24,9 @@
#include "actions-types.h"
#include "core/gimp.h"
+#include "core/gimpcontainer.h"
#include "core/gimpcontext.h"
#include "core/gimpimage.h"
-#include "core/gimplist.h"
#include "widgets/gimpcontainerview.h"
#include "widgets/gimpimageview.h"
@@ -56,7 +56,7 @@
{
GList *list;
- for (list = GIMP_LIST (image->gimp->displays)->list;
+ for (list = gimp_get_display_iter (image->gimp);
list;
list = g_list_next (list))
{
Modified: trunk/app/actions/tool-options-commands.c
==============================================================================
--- trunk/app/actions/tool-options-commands.c (original)
+++ trunk/app/actions/tool-options-commands.c Sun Nov 2 21:34:14 2008
@@ -28,7 +28,6 @@
#include "actions-types.h"
#include "core/gimp.h"
-#include "core/gimplist.h"
#include "core/gimptoolinfo.h"
#include "core/gimptooloptions.h"
#include "core/gimptoolpresets.h"
@@ -215,7 +214,7 @@
Gimp *gimp = editor->ui_manager->gimp;
GList *list;
- for (list = GIMP_LIST (gimp->tool_info_list)->list;
+ for (list = gimp_get_tool_info_iter (gimp);
list;
list = g_list_next (list))
{
Modified: trunk/app/actions/tools-actions.c
==============================================================================
--- trunk/app/actions/tools-actions.c (original)
+++ trunk/app/actions/tools-actions.c Sun Nov 2 21:34:14 2008
@@ -27,8 +27,8 @@
#include "actions-types.h"
#include "core/gimp.h"
+#include "core/gimpcontainer.h"
#include "core/gimpcontext.h"
-#include "core/gimplist.h"
#include "core/gimptoolinfo.h"
#include "widgets/gimpactiongroup.h"
@@ -639,7 +639,7 @@
G_N_ELEMENTS (tools_object_2_actions),
G_CALLBACK (tools_object_2_cmd_callback));
- for (list = GIMP_LIST (group->gimp->tool_info_list)->list;
+ for (list = gimp_get_tool_info_iter (group->gimp);
list;
list = g_list_next (list))
{
Modified: trunk/app/actions/windows-actions.c
==============================================================================
--- trunk/app/actions/windows-actions.c (original)
+++ trunk/app/actions/windows-actions.c Sun Nov 2 21:34:14 2008
@@ -107,7 +107,7 @@
G_CALLBACK (windows_actions_display_remove),
group, 0);
- for (list = GIMP_LIST (group->gimp->displays)->list;
+ for (list = gimp_get_display_iter (group->gimp);
list;
list = g_list_next (list))
{
Modified: trunk/app/core/gimp.c
==============================================================================
--- trunk/app/core/gimp.c (original)
+++ trunk/app/core/gimp.c Sun Nov 2 21:34:14 2008
@@ -905,6 +905,30 @@
&handled);
}
+GList *
+gimp_get_image_iter (Gimp *gimp)
+{
+ g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
+
+ return GIMP_LIST (gimp->images)->list;
+}
+
+GList *
+gimp_get_display_iter (Gimp *gimp)
+{
+ g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
+
+ return GIMP_LIST (gimp->displays)->list;
+}
+
+GList *
+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;
+}
+
void
gimp_set_global_buffer (Gimp *gimp,
GimpBuffer *buffer)
Modified: trunk/app/core/gimp.h
==============================================================================
--- trunk/app/core/gimp.h (original)
+++ trunk/app/core/gimp.h Sun Nov 2 21:34:14 2008
@@ -161,6 +161,10 @@
void gimp_exit (Gimp *gimp,
gboolean force);
+GList * gimp_get_image_iter (Gimp *gimp);
+GList * gimp_get_display_iter (Gimp *gimp);
+GList * gimp_get_tool_info_iter (Gimp *gimp);
+
void gimp_set_global_buffer (Gimp *gimp,
GimpBuffer *buffer);
Modified: trunk/app/dialogs/quit-dialog.c
==============================================================================
--- trunk/app/dialogs/quit-dialog.c (original)
+++ trunk/app/dialogs/quit-dialog.c Sun Nov 2 21:34:14 2008
@@ -29,8 +29,8 @@
#include "config/gimpcoreconfig.h"
#include "core/gimp.h"
+#include "core/gimpcontainer.h"
#include "core/gimpcontext.h"
-#include "core/gimplist.h"
#include "display/gimpdisplay.h"
#include "display/gimpdisplay-foreach.h"
@@ -252,7 +252,7 @@
{
GList *list;
- for (list = GIMP_LIST (gimp->displays)->list;
+ for (list = gimp_get_display_iter (gimp);
list;
list = g_list_next (list))
{
Modified: trunk/app/display/gimpdisplay-foreach.c
==============================================================================
--- trunk/app/display/gimpdisplay-foreach.c (original)
+++ trunk/app/display/gimpdisplay-foreach.c Sun Nov 2 21:34:14 2008
@@ -24,9 +24,9 @@
#include "display-types.h"
#include "core/gimp.h"
+#include "core/gimpcontainer.h"
#include "core/gimpcontext.h"
#include "core/gimpimage.h"
-#include "core/gimplist.h"
#include "gimpdisplay.h"
#include "gimpdisplay-foreach.h"
@@ -41,7 +41,7 @@
g_return_val_if_fail (GIMP_IS_GIMP (gimp), FALSE);
- for (list = GIMP_LIST (gimp->displays)->list;
+ for (list = gimp_get_display_iter (gimp);
list;
list = g_list_next (list))
{
@@ -124,7 +124,7 @@
G_CALLBACK (gimp_displays_image_clean_callback),
container);
- for (list = GIMP_LIST (gimp->images)->list;
+ for (list = gimp_get_image_iter (gimp);
list;
list = g_list_next (list))
{
@@ -156,7 +156,7 @@
*/
while (! gimp_container_is_empty (gimp->displays))
{
- GimpDisplay *display = GIMP_LIST (gimp->displays)->list->data;
+ GimpDisplay *display = gimp_get_display_iter (gimp)->data;
gimp_display_delete (display);
}
@@ -177,7 +177,7 @@
g_return_if_fail (GIMP_IS_GIMP (gimp));
- list = g_list_copy (GIMP_LIST (gimp->displays)->list);
+ list = g_list_copy (gimp_get_display_iter (gimp));
for (iter = list; iter; iter = g_list_next (iter))
{
@@ -210,7 +210,7 @@
contexts = g_list_prepend (contexts, list->data);
}
- for (list = GIMP_LIST (gimp->displays)->list;
+ for (list = gimp_get_display_iter (gimp);
list;
list = g_list_next (list))
{
@@ -236,7 +236,7 @@
g_return_val_if_fail (GIMP_IS_GIMP (gimp), 0);
- for (list = GIMP_LIST (gimp->displays)->list;
+ for (list = gimp_get_display_iter (gimp);
list;
list = g_list_next (list))
{
@@ -264,7 +264,7 @@
g_return_if_fail (GIMP_IS_GIMP (gimp));
- for (list = GIMP_LIST (gimp->displays)->list;
+ for (list = gimp_get_display_iter (gimp);
list;
list = g_list_next (list))
{
@@ -282,7 +282,7 @@
g_return_if_fail (GIMP_IS_GIMP (gimp));
- for (list = GIMP_LIST (gimp->displays)->list;
+ for (list = gimp_get_display_iter (gimp);
list;
list = g_list_next (list))
{
Modified: trunk/app/display/gimpdisplay.c
==============================================================================
--- trunk/app/display/gimpdisplay.c (original)
+++ trunk/app/display/gimpdisplay.c Sun Nov 2 21:34:14 2008
@@ -30,8 +30,8 @@
#include "core/gimp.h"
#include "core/gimparea.h"
+#include "core/gimpcontainer.h"
#include "core/gimpimage.h"
-#include "core/gimplist.h"
#include "core/gimpprogress.h"
#include "tools/gimptool.h"
@@ -479,7 +479,7 @@
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
- for (list = GIMP_LIST (gimp->displays)->list;
+ for (list = gimp_get_display_iter (gimp);
list;
list = g_list_next (list))
{
Modified: trunk/app/gui/gui.c
==============================================================================
--- trunk/app/gui/gui.c (original)
+++ trunk/app/gui/gui.c Sun Nov 2 21:34:14 2008
@@ -35,7 +35,6 @@
#include "core/gimpcontainer.h"
#include "core/gimpcontext.h"
#include "core/gimpimage.h"
-#include "core/gimplist.h"
#include "core/gimptoolinfo.h"
#include "plug-in/gimpenvirontable.h"
@@ -714,7 +713,7 @@
{
GList *list;
- for (list = GIMP_LIST (gimp->displays)->list;
+ for (list = gimp_get_display_iter (gimp);
list;
list = g_list_next (list))
{
Modified: trunk/app/menus/windows-menu.c
==============================================================================
--- trunk/app/menus/windows-menu.c (original)
+++ trunk/app/menus/windows-menu.c Sun Nov 2 21:34:14 2008
@@ -95,7 +95,7 @@
G_CALLBACK (windows_menu_display_remove),
manager, 0);
- for (list = GIMP_LIST (manager->gimp->displays)->list;
+ for (list = gimp_get_display_iter (manager->gimp);
list;
list = g_list_next (list))
{
Modified: trunk/app/pdb/image-cmds.c
==============================================================================
--- trunk/app/pdb/image-cmds.c (original)
+++ trunk/app/pdb/image-cmds.c Sun Nov 2 21:34:14 2008
@@ -32,6 +32,7 @@
#include "config/gimpcoreconfig.h"
#include "core/gimp.h"
#include "core/gimpchannel.h"
+#include "core/gimpcontainer.h"
#include "core/gimpdrawable.h"
#include "core/gimpimage-colormap.h"
#include "core/gimpimage-crop.h"
@@ -45,7 +46,6 @@
#include "core/gimpimage.h"
#include "core/gimplayer.h"
#include "core/gimplayermask.h"
-#include "core/gimplist.h"
#include "core/gimpparamspecs.h"
#include "core/gimppickable.h"
#include "core/gimpprogress.h"
@@ -106,7 +106,7 @@
gint32 num_images = 0;
gint32 *image_ids = NULL;
- GList *list = GIMP_LIST (gimp->images)->list;
+ GList *list = gimp_get_image_iter (gimp);
num_images = g_list_length (list);
Modified: trunk/app/tools/gimp-tools.c
==============================================================================
--- trunk/app/tools/gimp-tools.c (original)
+++ trunk/app/tools/gimp-tools.c Sun Nov 2 21:34:14 2008
@@ -195,7 +195,7 @@
gimp_container_thaw (gimp->tool_info_list);
- for (list = GIMP_LIST (gimp->tool_info_list)->list;
+ for (list = gimp_get_tool_info_iter (gimp);
list;
list = g_list_next (list))
{
@@ -280,7 +280,7 @@
g_free (filename);
g_object_unref (gimp_list);
- for (list = GIMP_LIST (gimp->tool_info_list)->list;
+ for (list = gimp_get_tool_info_iter (gimp);
list;
list = g_list_next (list))
{
@@ -297,7 +297,7 @@
g_clear_error (&error);
}
- for (list = GIMP_LIST (gimp->tool_info_list)->list;
+ for (list = gimp_get_tool_info_iter (gimp);
list;
list = g_list_next (list))
{
@@ -364,7 +364,7 @@
gimp_tool_options_create_folder ();
- for (list = GIMP_LIST (gimp->tool_info_list)->list;
+ for (list = gimp_get_tool_info_iter (gimp);
list;
list = g_list_next (list))
{
@@ -396,7 +396,7 @@
g_return_val_if_fail (GIMP_IS_GIMP (gimp), FALSE);
- for (list = GIMP_LIST (gimp->tool_info_list)->list;
+ for (list = gimp_get_tool_info_iter (gimp);
list && success;
list = g_list_next (list))
{
Modified: trunk/app/tools/gimptexttool.c
==============================================================================
--- trunk/app/tools/gimptexttool.c (original)
+++ trunk/app/tools/gimptexttool.c Sun Nov 2 21:34:14 2008
@@ -36,7 +36,6 @@
#include "core/gimpimage-undo.h"
#include "core/gimpimage-undo-push.h"
#include "core/gimplayer-floating-sel.h"
-#include "core/gimplist.h"
#include "core/gimptoolinfo.h"
#include "core/gimpundostack.h"
@@ -2131,7 +2130,7 @@
display = NULL;
- for (list = GIMP_LIST (tool->tool_info->gimp->displays)->list;
+ for (list = gimp_get_display_iter (tool->tool_info->gimp);
list;
list = g_list_next (list))
{
Modified: trunk/app/tools/gimpvectortool.c
==============================================================================
--- trunk/app/tools/gimpvectortool.c (original)
+++ trunk/app/tools/gimpvectortool.c Sun Nov 2 21:34:14 2008
@@ -1673,7 +1673,7 @@
display = NULL;
- for (list = GIMP_LIST (item->image->gimp->displays)->list;
+ for (list = gimp_get_display_iter (item->image->gimp);
list;
list = g_list_next (list))
{
Modified: trunk/app/widgets/gimptoolbox.c
==============================================================================
--- trunk/app/widgets/gimptoolbox.c (original)
+++ trunk/app/widgets/gimptoolbox.c Sun Nov 2 21:34:14 2008
@@ -31,7 +31,6 @@
#include "core/gimp.h"
#include "core/gimpcontext.h"
-#include "core/gimplist.h"
#include "core/gimptoolinfo.h"
#include "file/file-open.h"
@@ -362,7 +361,7 @@
gtk_widget_size_request (tool_button, &button_requisition);
- for (list = GIMP_LIST (gimp->tool_info_list)->list, n_tools = 0;
+ for (list = gimp_get_tool_info_iter (gimp), n_tools = 0;
list;
list = list->next)
{
@@ -453,7 +452,7 @@
"button-relief", &relief,
NULL);
- for (list = GIMP_LIST (gimp->tool_info_list)->list;
+ for (list = gimp_get_tool_info_iter (gimp);
list;
list = g_list_next (list))
{
@@ -681,7 +680,7 @@
active_tool = gimp_context_get_tool (context);
- for (list = GIMP_LIST (context->gimp->tool_info_list)->list;
+ for (list = gimp_get_tool_info_iter (context->gimp);
list;
list = g_list_next (list))
{
Modified: trunk/tools/pdbgen/pdb/image.pdb
==============================================================================
--- trunk/tools/pdbgen/pdb/image.pdb (original)
+++ trunk/tools/pdbgen/pdb/image.pdb Sun Nov 2 21:34:14 2008
@@ -65,7 +65,7 @@
%invoke = (
code => <<CODE
{
- GList *list = GIMP_LIST (gimp->images)->list;
+ GList *list = gimp_get_image_iter (gimp);
num_images = g_list_length (list);
@@ -2620,7 +2620,7 @@
"libgimpbase/gimpbase.h"
"base/temp-buf.h"
"core/gimp.h"
- "core/gimplist.h"
+ "core/gimpcontainer.h"
"core/gimpprogress.h"
"core/gimpunit.h"
"gimppdberror.h"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]