[gimp/metadata-browser] app: rename gimpimage-convert.[ch] to gimpimage-convert-type.[ch]



commit bec3b1d2568d8c2b43b5fa37b3d1a7c86a486c61
Author: Michael Natterer <mitch gimp org>
Date:   Tue Jun 26 14:38:33 2012 +0200

    app: rename gimpimage-convert.[ch] to gimpimage-convert-type.[ch]

 app/actions/image-commands.c                       |    7 ++--
 app/core/Makefile.am                               |    4 +-
 ...impimage-convert.c => gimpimage-convert-type.c} |   33 ++++++++++---------
 ...impimage-convert.h => gimpimage-convert-type.h} |   14 ++++----
 app/dialogs/convert-type-dialog.c                  |   20 ++++++------
 app/pdb/convert-cmds.c                             |   26 ++++++++--------
 po/POTFILES.in                                     |    2 +-
 tools/pdbgen/pdb/convert.pdb                       |   26 ++++++++--------
 8 files changed, 67 insertions(+), 65 deletions(-)
---
diff --git a/app/actions/image-commands.c b/app/actions/image-commands.c
index 486647f..27aabcc 100644
--- a/app/actions/image-commands.c
+++ b/app/actions/image-commands.c
@@ -31,8 +31,8 @@
 #include "core/gimpchannel.h"
 #include "core/gimpcontext.h"
 #include "core/gimpimage.h"
-#include "core/gimpimage-convert.h"
 #include "core/gimpimage-convert-precision.h"
+#include "core/gimpimage-convert-type.h"
 #include "core/gimpimage-crop.h"
 #include "core/gimpimage-duplicate.h"
 #include "core/gimpimage-flip.h"
@@ -175,8 +175,9 @@ image_convert_base_type_cmd_callback (GtkAction *action,
     {
     case GIMP_RGB:
     case GIMP_GRAY:
-      if (! gimp_image_convert (image, value, 0, 0, FALSE, FALSE, 0, NULL,
-                                NULL, &error))
+      if (! gimp_image_convert_type (image, value,
+                                     0, 0, FALSE, FALSE, 0, NULL,
+                                     NULL, &error))
         {
           gimp_message_literal (image->gimp,
 				G_OBJECT (widget), GIMP_MESSAGE_WARNING,
diff --git a/app/core/Makefile.am b/app/core/Makefile.am
index a58fd30..4793c06 100644
--- a/app/core/Makefile.am
+++ b/app/core/Makefile.am
@@ -197,12 +197,12 @@ libappcore_a_sources = \
 	gimpimage-colormap.h			\
 	gimpimage-contiguous-region.c		\
 	gimpimage-contiguous-region.h		\
-	gimpimage-convert.c			\
-	gimpimage-convert.h			\
 	gimpimage-convert-fsdither.h		\
 	gimpimage-convert-data.h		\
 	gimpimage-convert-precision.c		\
 	gimpimage-convert-precision.h		\
+	gimpimage-convert-type.c		\
+	gimpimage-convert-type.h		\
 	gimpimage-crop.c			\
 	gimpimage-crop.h			\
 	gimpimage-duplicate.c			\
diff --git a/app/core/gimpimage-convert.c b/app/core/gimpimage-convert-type.c
similarity index 99%
rename from app/core/gimpimage-convert.c
rename to app/core/gimpimage-convert-type.c
index 629d550..0ef38aa 100644
--- a/app/core/gimpimage-convert.c
+++ b/app/core/gimpimage-convert-type.c
@@ -157,7 +157,7 @@
 
 #include "gimpimage-convert-fsdither.h"
 #include "gimpimage-convert-data.h"
-#include "gimpimage-convert.h"
+#include "gimpimage-convert-type.h"
 
 #include "gimp-intl.h"
 
@@ -731,18 +731,19 @@ color_quicksort (const void *c1,
 }
 
 gboolean
-gimp_image_convert (GimpImage               *image,
-                    GimpImageBaseType        new_type,
-                    /* The following are only used for new_type == GIMP_INDEXED
-                     */
-                    gint                     num_cols,
-                    GimpConvertDitherType    dither,
-                    gboolean                 alpha_dither,
-                    gboolean                 remove_dups,
-                    GimpConvertPaletteType   palette_type,
-                    GimpPalette             *custom_palette,
-                    GimpProgress            *progress,
-                    GError                 **error)
+gimp_image_convert_type (GimpImage               *image,
+                         GimpImageBaseType        new_type,
+                         /* The following are only used for
+                          * new_type == GIMP_INDEXED
+                          */
+                         gint                     num_cols,
+                         GimpConvertDitherType    dither,
+                         gboolean                 alpha_dither,
+                         gboolean                 remove_dups,
+                         GimpConvertPaletteType   palette_type,
+                         GimpPalette             *custom_palette,
+                         GimpProgress            *progress,
+                         GError                 **error)
 {
   QuantizeObj       *quantobj = NULL;
   GimpImageBaseType  old_type;
@@ -4280,9 +4281,9 @@ delete_median_cut (QuantizeObj *quantobj)
 
 
 void
-gimp_image_convert_set_dither_matrix (const guchar *matrix,
-                                      gint          width,
-                                      gint          height)
+gimp_image_convert_type_set_dither_matrix (const guchar *matrix,
+                                           gint          width,
+                                           gint          height)
 {
   gint x;
   gint y;
diff --git a/app/core/gimpimage-convert.h b/app/core/gimpimage-convert-type.h
similarity index 80%
rename from app/core/gimpimage-convert.h
rename to app/core/gimpimage-convert-type.h
index 7cf1e2a..893fcbc 100644
--- a/app/core/gimpimage-convert.h
+++ b/app/core/gimpimage-convert-type.h
@@ -15,14 +15,14 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef __GIMP_IMAGE_CONVERT_H__
-#define __GIMP_IMAGE_CONVERT_H__
+#ifndef __GIMP_IMAGE_CONVERT_TYPE_H__
+#define __GIMP_IMAGE_CONVERT_TYPE_H__
 
 
 #define MAXNUMCOLORS 256
 
 
-gboolean   gimp_image_convert           (GimpImage               *image,
+gboolean   gimp_image_convert_type      (GimpImage               *image,
                                          GimpImageBaseType        new_type,
                                          /* The following params used only for
                                           * new_type == GIMP_INDEXED
@@ -36,9 +36,9 @@ gboolean   gimp_image_convert           (GimpImage               *image,
                                          GimpProgress            *progress,
                                          GError                 **error);
 
-void  gimp_image_convert_set_dither_matrix (const guchar *matrix,
-                                            gint          width,
-                                            gint          height);
+void  gimp_image_convert_type_set_dither_matrix (const guchar *matrix,
+                                                 gint          width,
+                                                 gint          height);
 
 
-#endif  /*  __GIMP_IMAGE_CONVERT_H__  */
+#endif  /*  __GIMP_IMAGE_CONVERT_TYPE_H__  */
diff --git a/app/dialogs/convert-type-dialog.c b/app/dialogs/convert-type-dialog.c
index beb7544..20982b9 100644
--- a/app/dialogs/convert-type-dialog.c
+++ b/app/dialogs/convert-type-dialog.c
@@ -29,7 +29,7 @@
 #include "core/gimpcontext.h"
 #include "core/gimpdatafactory.h"
 #include "core/gimpimage.h"
-#include "core/gimpimage-convert.h"
+#include "core/gimpimage-convert-type.h"
 #include "core/gimplist.h"
 #include "core/gimppalette.h"
 #include "core/gimpprogress.h"
@@ -288,15 +288,15 @@ convert_dialog_response (GtkWidget     *widget,
                                       _("Converting to indexed colors"), FALSE);
 
       /*  Convert the image to indexed color  */
-      if (! gimp_image_convert (dialog->image,
-                                GIMP_INDEXED,
-                                dialog->num_colors,
-                                dialog->dither_type,
-                                dialog->alpha_dither,
-                                dialog->remove_dups,
-                                dialog->palette_type,
-                                dialog->custom_palette,
-                                progress, &error))
+      if (! gimp_image_convert_type (dialog->image,
+                                     GIMP_INDEXED,
+                                     dialog->num_colors,
+                                     dialog->dither_type,
+                                     dialog->alpha_dither,
+                                     dialog->remove_dups,
+                                     dialog->palette_type,
+                                     dialog->custom_palette,
+                                     progress, &error))
         {
           gimp_message_literal (dialog->image->gimp, G_OBJECT (dialog->dialog),
 				GIMP_MESSAGE_WARNING, error->message);
diff --git a/app/pdb/convert-cmds.c b/app/pdb/convert-cmds.c
index 5f4ef48..35ddb4b 100644
--- a/app/pdb/convert-cmds.c
+++ b/app/pdb/convert-cmds.c
@@ -29,7 +29,7 @@
 
 #include "core/gimp.h"
 #include "core/gimpimage-convert-precision.h"
-#include "core/gimpimage-convert.h"
+#include "core/gimpimage-convert-type.h"
 #include "core/gimpimage.h"
 #include "core/gimpitemstack.h"
 #include "core/gimppalette.h"
@@ -63,9 +63,9 @@ image_convert_rgb_invoker (GimpProcedure         *procedure,
     {
       if (gimp_pdb_image_is_not_base_type (image, GIMP_RGB, error))
         {
-          success = gimp_image_convert (image, GIMP_RGB,
-                                        0, 0, FALSE, FALSE, 0, NULL,
-                                        NULL, error);
+          success = gimp_image_convert_type (image, GIMP_RGB,
+                                             0, 0, FALSE, FALSE, 0, NULL,
+                                             NULL, error);
         }
       else
         {
@@ -94,9 +94,9 @@ image_convert_grayscale_invoker (GimpProcedure         *procedure,
     {
       if (gimp_pdb_image_is_not_base_type (image, GIMP_GRAY, error))
         {
-          success = gimp_image_convert (image, GIMP_GRAY,
-                                        0, 0, FALSE, FALSE, 0, NULL,
-                                        NULL, error);
+          success = gimp_image_convert_type (image, GIMP_GRAY,
+                                             0, 0, FALSE, FALSE, 0, NULL,
+                                             NULL, error);
         }
       else
         {
@@ -175,11 +175,11 @@ image_convert_indexed_invoker (GimpProcedure         *procedure,
         }
 
       if (success)
-        success = gimp_image_convert (image, GIMP_INDEXED,
-                                      num_cols, dither_type,
-                                      alpha_dither, remove_unused,
-                                      palette_type, pal,
-                                      NULL, error);
+        success = gimp_image_convert_type (image, GIMP_INDEXED,
+                                           num_cols, dither_type,
+                                           alpha_dither, remove_unused,
+                                           palette_type, pal,
+                                           NULL, error);
     }
 
   return gimp_procedure_get_return_values (procedure, success,
@@ -209,7 +209,7 @@ image_convert_set_dither_matrix_invoker (GimpProcedure         *procedure,
     {
       if (width == 0 || height == 0 || matrix_length == width * height)
         {
-          gimp_image_convert_set_dither_matrix (matrix, width, height);
+          gimp_image_convert_type_set_dither_matrix (matrix, width, height);
         }
       else
         {
diff --git a/po/POTFILES.in b/po/POTFILES.in
index ba2e8f5..f6e3483 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -128,8 +128,8 @@ app/core/gimp-gui.c
 app/core/gimpimage-arrange.c
 app/core/gimpimage.c
 app/core/gimpimage-colormap.c
-app/core/gimpimage-convert.c
 app/core/gimpimage-convert-precision.c
+app/core/gimpimage-convert-type.c
 app/core/gimpimage-crop.c
 app/core/gimpimagefile.c
 app/core/gimpimage-grid.c
diff --git a/tools/pdbgen/pdb/convert.pdb b/tools/pdbgen/pdb/convert.pdb
index 9f2baf1..690cfea 100644
--- a/tools/pdbgen/pdb/convert.pdb
+++ b/tools/pdbgen/pdb/convert.pdb
@@ -37,9 +37,9 @@ HELP
 {
   if (gimp_pdb_image_is_not_base_type (image, GIMP_RGB, error))
     {
-      success = gimp_image_convert (image, GIMP_RGB,
-                                    0, 0, FALSE, FALSE, 0, NULL,
-                                    NULL, error);
+      success = gimp_image_convert_type (image, GIMP_RGB,
+                                         0, 0, FALSE, FALSE, 0, NULL,
+                                         NULL, error);
     }
   else
     {
@@ -71,9 +71,9 @@ HELP
 {
   if (gimp_pdb_image_is_not_base_type (image, GIMP_GRAY, error))
     {
-      success = gimp_image_convert (image, GIMP_GRAY,
-				    0, 0, FALSE, FALSE, 0, NULL,
-				    NULL, error);
+      success = gimp_image_convert_type (image, GIMP_GRAY,
+				         0, 0, FALSE, FALSE, 0, NULL,
+				         NULL, error);
     }
   else
     {
@@ -168,11 +168,11 @@ HELP
     }
 
   if (success)
-    success = gimp_image_convert (image, GIMP_INDEXED,
-                                  num_cols, dither_type,
-                                  alpha_dither, remove_unused,
-				  palette_type, pal,
-                                  NULL, error);
+    success = gimp_image_convert_type (image, GIMP_INDEXED,
+                                       num_cols, dither_type,
+                                       alpha_dither, remove_unused,
+				       palette_type, pal,
+                                       NULL, error);
 }
 CODE
     );
@@ -205,7 +205,7 @@ HELP
 {
   if (width == 0 || height == 0 || matrix_length == width * height)
     {
-      gimp_image_convert_set_dither_matrix (matrix, width, height);
+      gimp_image_convert_type_set_dither_matrix (matrix, width, height);
     }
   else
     {
@@ -259,8 +259,8 @@ CODE
 
 @headers = qw("core/gimp.h"
               "core/gimpimage.h"
-              "core/gimpimage-convert.h"
               "core/gimpimage-convert-precision.h"
+              "core/gimpimage-convert-type.h"
               "core/gimpitemstack.h"
               "core/gimppalette.h"
               "plug-in/gimpplugin.h"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]