[gimp] app: rename gimp_image_base_type() to gimp_image_get_base_type()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: rename gimp_image_base_type() to gimp_image_get_base_type()
- Date: Mon, 7 May 2012 19:58:00 +0000 (UTC)
commit 20f3cba2b60e213f3509950d546ae81a31c0df84
Author: Michael Natterer <mitch gimp org>
Date: Mon May 7 21:57:33 2012 +0200
app: rename gimp_image_base_type() to gimp_image_get_base_type()
app/actions/colormap-actions.c | 2 +-
app/actions/image-actions.c | 4 ++--
app/actions/image-commands.c | 2 +-
app/actions/layers-actions.c | 2 +-
app/core/gimpimage-convert-precision.c | 2 +-
app/core/gimpimage-convert.c | 4 ++--
app/core/gimpimage-duplicate.c | 4 ++--
app/core/gimpimage-scale.c | 4 ++--
app/core/gimpimage.c | 10 +++++-----
app/core/gimpimage.h | 2 +-
app/core/gimpimageundo.c | 6 +++---
app/core/gimplayer.c | 2 +-
app/core/gimppalette-import.c | 2 +-
app/core/gimptemplate.c | 2 +-
app/dialogs/palette-import-dialog.c | 4 ++--
app/dialogs/scale-dialog.c | 2 +-
app/display/gimpdisplayshell-title.c | 2 +-
app/file/file-open.c | 2 +-
app/pdb/gimppdb-utils.c | 6 +++---
app/pdb/image-cmds.c | 2 +-
app/plug-in/plug-in-icc-profile.c | 2 +-
app/widgets/gimpcolormapeditor.c | 4 ++--
app/widgets/gimpcomponenteditor.c | 2 +-
app/widgets/gimpimagepropview.c | 2 +-
app/xcf/xcf-load.c | 2 +-
app/xcf/xcf-save.c | 2 +-
tools/pdbgen/pdb/image.pdb | 2 +-
27 files changed, 41 insertions(+), 41 deletions(-)
---
diff --git a/app/actions/colormap-actions.c b/app/actions/colormap-actions.c
index 6cd2ead..03944e0 100644
--- a/app/actions/colormap-actions.c
+++ b/app/actions/colormap-actions.c
@@ -93,7 +93,7 @@ colormap_actions_update (GimpActionGroup *group,
if (image)
{
- indexed = gimp_image_base_type (image) == GIMP_INDEXED;
+ indexed = (gimp_image_get_base_type (image) == GIMP_INDEXED);
num_colors = gimp_image_get_colormap_size (image);
}
diff --git a/app/actions/image-actions.c b/app/actions/image-actions.c
index 3fe7fd7..55bdc3e 100644
--- a/app/actions/image-actions.c
+++ b/app/actions/image-actions.c
@@ -276,7 +276,7 @@ image_actions_update (GimpActionGroup *group,
GimpContainer *layers;
const gchar *action = NULL;
- switch (gimp_image_base_type (image))
+ switch (gimp_image_get_base_type (image))
{
case GIMP_RGB: action = "image-convert-rgb"; break;
case GIMP_GRAY: action = "image-convert-grayscale"; break;
@@ -298,7 +298,7 @@ image_actions_update (GimpActionGroup *group,
gimp_action_group_set_action_active (group, action, TRUE);
- is_indexed = (gimp_image_base_type (image) == GIMP_INDEXED);
+ is_indexed = (gimp_image_get_base_type (image) == GIMP_INDEXED);
is_u8 = (gimp_image_get_precision (image) == GIMP_PRECISION_U8);
aux = (gimp_image_get_active_channel (image) != NULL);
lp = ! gimp_image_is_empty (image);
diff --git a/app/actions/image-commands.c b/app/actions/image-commands.c
index 4732da8..520a1b7 100644
--- a/app/actions/image-commands.c
+++ b/app/actions/image-commands.c
@@ -165,7 +165,7 @@ image_convert_base_type_cmd_callback (GtkAction *action,
value = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
- if (value == gimp_image_base_type (image))
+ if (value == gimp_image_get_base_type (image))
return;
switch (value)
diff --git a/app/actions/layers-actions.c b/app/actions/layers-actions.c
index 6400f6c..772bde1 100644
--- a/app/actions/layers-actions.c
+++ b/app/actions/layers-actions.c
@@ -539,7 +539,7 @@ layers_actions_update (GimpActionGroup *group,
fs = (gimp_image_get_floating_selection (image) != NULL);
ac = (gimp_image_get_active_channel (image) != NULL);
sel = ! gimp_channel_is_empty (gimp_image_get_mask (image));
- indexed = (gimp_image_base_type (image) == GIMP_INDEXED);
+ indexed = (gimp_image_get_base_type (image) == GIMP_INDEXED);
layer = gimp_image_get_active_layer (image);
diff --git a/app/core/gimpimage-convert-precision.c b/app/core/gimpimage-convert-precision.c
index e8eee2d..27ab6dc 100644
--- a/app/core/gimpimage-convert-precision.c
+++ b/app/core/gimpimage-convert-precision.c
@@ -49,7 +49,7 @@ gimp_image_convert_precision (GimpImage *image,
g_return_if_fail (GIMP_IS_IMAGE (image));
g_return_if_fail (precision != gimp_image_get_precision (image));
g_return_if_fail (precision == GIMP_PRECISION_U8 ||
- gimp_image_base_type (image) != GIMP_INDEXED);
+ gimp_image_get_base_type (image) != GIMP_INDEXED);
g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
all_drawables = g_list_concat (gimp_image_get_layer_list (image),
diff --git a/app/core/gimpimage-convert.c b/app/core/gimpimage-convert.c
index 7625295..1574cb0 100644
--- a/app/core/gimpimage-convert.c
+++ b/app/core/gimpimage-convert.c
@@ -752,7 +752,7 @@ gimp_image_convert (GimpImage *image,
gint nth_layer, n_layers;
g_return_val_if_fail (GIMP_IS_IMAGE (image), FALSE);
- g_return_val_if_fail (new_type != gimp_image_base_type (image), FALSE);
+ g_return_val_if_fail (new_type != gimp_image_get_base_type (image), FALSE);
g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
@@ -807,7 +807,7 @@ gimp_image_convert (GimpImage *image,
gimp_image_undo_push_image_type (image, NULL);
/* Set the new base type */
- old_type = gimp_image_base_type (image);
+ old_type = gimp_image_get_base_type (image);
g_object_set (image, "base-type", new_type, NULL);
diff --git a/app/core/gimpimage-duplicate.c b/app/core/gimpimage-duplicate.c
index 03ef12d..df7078e 100644
--- a/app/core/gimpimage-duplicate.c
+++ b/app/core/gimpimage-duplicate.c
@@ -90,7 +90,7 @@ gimp_image_duplicate (GimpImage *image)
new_image = gimp_create_image (image->gimp,
gimp_image_get_width (image),
gimp_image_get_height (image),
- gimp_image_base_type (image),
+ gimp_image_get_base_type (image),
gimp_image_get_precision (image),
FALSE);
gimp_image_undo_disable (new_image);
@@ -178,7 +178,7 @@ static void
gimp_image_duplicate_colormap (GimpImage *image,
GimpImage *new_image)
{
- if (gimp_image_base_type (new_image) == GIMP_INDEXED)
+ if (gimp_image_get_base_type (new_image) == GIMP_INDEXED)
gimp_image_set_colormap (new_image,
gimp_image_get_colormap (image),
gimp_image_get_colormap_size (image),
diff --git a/app/core/gimpimage-scale.c b/app/core/gimpimage-scale.c
index f83cb2a..8ab7c6d 100644
--- a/app/core/gimpimage-scale.c
+++ b/app/core/gimpimage-scale.c
@@ -303,12 +303,12 @@ gimp_image_scale_check (const GimpImage *image,
g_list_free (drawables);
scalable_size +=
- gimp_projection_estimate_memsize (gimp_image_base_type (image),
+ gimp_projection_estimate_memsize (gimp_image_get_base_type (image),
gimp_image_get_width (image),
gimp_image_get_height (image));
scaled_size +=
- gimp_projection_estimate_memsize (gimp_image_base_type (image),
+ gimp_projection_estimate_memsize (gimp_image_get_base_type (image),
new_width, new_height);
GIMP_LOG (IMAGE_SCALE,
diff --git a/app/core/gimpimage.c b/app/core/gimpimage.c
index 3b34909..719da3e 100644
--- a/app/core/gimpimage.c
+++ b/app/core/gimpimage.c
@@ -1225,7 +1225,7 @@ gimp_image_real_colormap_changed (GimpImage *image,
private->n_colors);
}
- if (gimp_image_base_type (image) == GIMP_INDEXED)
+ if (gimp_image_get_base_type (image) == GIMP_INDEXED)
{
/* A colormap alteration affects the whole image */
gimp_image_invalidate (image,
@@ -1511,7 +1511,7 @@ gimp_image_new (Gimp *gimp,
}
GimpImageBaseType
-gimp_image_base_type (const GimpImage *image)
+gimp_image_get_base_type (const GimpImage *image)
{
g_return_val_if_fail (GIMP_IS_IMAGE (image), -1);
@@ -1567,7 +1567,7 @@ gimp_image_get_layer_format (const GimpImage *image,
g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
return gimp_image_get_format (image,
- gimp_image_base_type (image),
+ gimp_image_get_base_type (image),
gimp_image_get_precision (image),
with_alpha);
}
@@ -2153,7 +2153,7 @@ gimp_image_get_component_index (const GimpImage *image,
case GIMP_GRAY_CHANNEL: return GRAY;
case GIMP_INDEXED_CHANNEL: return INDEXED;
case GIMP_ALPHA_CHANNEL:
- switch (gimp_image_base_type (image))
+ switch (gimp_image_get_base_type (image))
{
case GIMP_RGB: return ALPHA;
case GIMP_GRAY: return ALPHA_G;
@@ -2243,7 +2243,7 @@ gimp_image_get_active_mask (const GimpImage *image)
private = GIMP_IMAGE_GET_PRIVATE (image);
- switch (gimp_image_base_type (image))
+ switch (gimp_image_get_base_type (image))
{
case GIMP_RGB:
mask |= (private->active[RED]) ? GIMP_COMPONENT_RED : 0;
diff --git a/app/core/gimpimage.h b/app/core/gimpimage.h
index 5c77606..2077e1d 100644
--- a/app/core/gimpimage.h
+++ b/app/core/gimpimage.h
@@ -110,7 +110,7 @@ GimpImage * gimp_image_new (Gimp *gimp,
GimpImageBaseType base_type,
GimpPrecision precision);
-GimpImageBaseType gimp_image_base_type (const GimpImage *image);
+GimpImageBaseType gimp_image_get_base_type (const GimpImage *image);
GimpPrecision gimp_image_get_precision (const GimpImage *image);
CombinationMode gimp_image_get_combination_mode (GimpImageType dest_type,
gint src_bytes);
diff --git a/app/core/gimpimageundo.c b/app/core/gimpimageundo.c
index 72b312c..0df67a2 100644
--- a/app/core/gimpimageundo.c
+++ b/app/core/gimpimageundo.c
@@ -158,7 +158,7 @@ gimp_image_undo_constructed (GObject *object)
switch (GIMP_UNDO (object)->undo_type)
{
case GIMP_UNDO_IMAGE_TYPE:
- image_undo->base_type = gimp_image_base_type (image);
+ image_undo->base_type = gimp_image_get_base_type (image);
break;
case GIMP_UNDO_IMAGE_PRECISION:
@@ -312,12 +312,12 @@ gimp_image_undo_pop (GimpUndo *undo,
GimpImageBaseType base_type;
base_type = image_undo->base_type;
- image_undo->base_type = gimp_image_base_type (image);
+ image_undo->base_type = gimp_image_get_base_type (image);
g_object_set (image, "base-type", base_type, NULL);
gimp_image_colormap_changed (image, -1);
- if (image_undo->base_type != gimp_image_base_type (image))
+ if (image_undo->base_type != gimp_image_get_base_type (image))
accum->mode_changed = TRUE;
}
break;
diff --git a/app/core/gimplayer.c b/app/core/gimplayer.c
index 52e459f..65cb70b 100644
--- a/app/core/gimplayer.c
+++ b/app/core/gimplayer.c
@@ -623,7 +623,7 @@ gimp_layer_convert (GimpItem *item,
GimpPrecision new_precision;
old_base_type = gimp_drawable_get_base_type (drawable);
- new_base_type = gimp_image_base_type (dest_image);
+ new_base_type = gimp_image_get_base_type (dest_image);
old_precision = gimp_drawable_get_precision (drawable);
new_precision = gimp_image_get_precision (dest_image);
diff --git a/app/core/gimppalette-import.c b/app/core/gimppalette-import.c
index 2a15cd3..8280425 100644
--- a/app/core/gimppalette-import.c
+++ b/app/core/gimppalette-import.c
@@ -411,7 +411,7 @@ gimp_palette_import_from_indexed_image (GimpImage *image,
g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
- g_return_val_if_fail (gimp_image_base_type (image) == GIMP_INDEXED, NULL);
+ g_return_val_if_fail (gimp_image_get_base_type (image) == GIMP_INDEXED, NULL);
g_return_val_if_fail (palette_name != NULL, NULL);
palette = GIMP_PALETTE (gimp_palette_new (context, palette_name));
diff --git a/app/core/gimptemplate.c b/app/core/gimptemplate.c
index af6946f..d2d5c6a 100644
--- a/app/core/gimptemplate.c
+++ b/app/core/gimptemplate.c
@@ -367,7 +367,7 @@ gimp_template_set_from_image (GimpTemplate *template,
gimp_image_get_resolution (image, &xresolution, &yresolution);
- base_type = gimp_image_base_type (image);
+ base_type = gimp_image_get_base_type (image);
if (base_type == GIMP_INDEXED)
base_type = GIMP_RGB;
diff --git a/app/dialogs/palette-import-dialog.c b/app/dialogs/palette-import-dialog.c
index 2c4a04e..05edf14 100644
--- a/app/dialogs/palette-import-dialog.c
+++ b/app/dialogs/palette-import-dialog.c
@@ -516,7 +516,7 @@ palette_import_image_changed (GimpContext *context,
palette_import_make_palette (dialog);
- if (gimp_image_base_type (image) != GIMP_INDEXED)
+ if (gimp_image_get_base_type (image) != GIMP_INDEXED)
sensitive = TRUE;
}
@@ -804,7 +804,7 @@ palette_import_make_palette (ImportDialog *dialog)
gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON (dialog->selection_only_toggle));
- if (gimp_image_base_type (image) == GIMP_INDEXED)
+ if (gimp_image_get_base_type (image) == GIMP_INDEXED)
{
palette = gimp_palette_import_from_indexed_image (image,
dialog->context,
diff --git a/app/dialogs/scale-dialog.c b/app/dialogs/scale-dialog.c
index 23702a7..d937ccd 100644
--- a/app/dialogs/scale-dialog.c
+++ b/app/dialogs/scale-dialog.c
@@ -199,7 +199,7 @@ scale_dialog_new (GimpViewable *viewable,
gimp_int_combo_box_set_active (GIMP_INT_COMBO_BOX (private->combo),
private->interpolation);
- if (gimp_image_base_type (image) == GIMP_INDEXED)
+ if (gimp_image_get_base_type (image) == GIMP_INDEXED)
{
GtkWidget *box = gimp_message_box_new (GIMP_STOCK_INFO);
diff --git a/app/display/gimpdisplayshell-title.c b/app/display/gimpdisplayshell-title.c
index 2df59ee..e0a724b 100644
--- a/app/display/gimpdisplayshell-title.c
+++ b/app/display/gimpdisplayshell-title.c
@@ -132,7 +132,7 @@ gimp_display_shell_title_image_type (GimpImage *image)
const gchar *name = "";
gimp_enum_get_value (GIMP_TYPE_IMAGE_BASE_TYPE,
- gimp_image_base_type (image), NULL, NULL, &name, NULL);
+ gimp_image_get_base_type (image), NULL, NULL, &name, NULL);
return name;
}
diff --git a/app/file/file-open.c b/app/file/file-open.c
index a77accf..e4f8d59 100644
--- a/app/file/file-open.c
+++ b/app/file/file-open.c
@@ -710,7 +710,7 @@ file_open_profile_apply_rgb (GimpImage *image,
GimpColorConfig *config = image->gimp->config->color_management;
GError *error = NULL;
- if (gimp_image_base_type (image) == GIMP_GRAY)
+ if (gimp_image_get_base_type (image) == GIMP_GRAY)
return;
if (config->mode == GIMP_COLOR_MANAGEMENT_OFF)
diff --git a/app/pdb/gimppdb-utils.c b/app/pdb/gimppdb-utils.c
index 4786d13..eb36f30 100644
--- a/app/pdb/gimppdb-utils.c
+++ b/app/pdb/gimppdb-utils.c
@@ -591,7 +591,7 @@ gimp_pdb_image_is_base_type (GimpImage *image,
g_return_val_if_fail (GIMP_IS_IMAGE (image), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
- if (gimp_image_base_type (image) == type)
+ if (gimp_image_get_base_type (image) == type)
return TRUE;
g_set_error (error, GIMP_PDB_ERROR, GIMP_PDB_ERROR_INVALID_ARGUMENT,
@@ -600,7 +600,7 @@ gimp_pdb_image_is_base_type (GimpImage *image,
gimp_image_get_display_name (image),
gimp_image_get_ID (image),
gimp_pdb_enum_value_get_nick (GIMP_TYPE_IMAGE_BASE_TYPE,
- gimp_image_base_type (image)),
+ gimp_image_get_base_type (image)),
gimp_pdb_enum_value_get_nick (GIMP_TYPE_IMAGE_BASE_TYPE, type));
return FALSE;
@@ -614,7 +614,7 @@ gimp_pdb_image_is_not_base_type (GimpImage *image,
g_return_val_if_fail (GIMP_IS_IMAGE (image), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
- if (gimp_image_base_type (image) != type)
+ if (gimp_image_get_base_type (image) != type)
return TRUE;
g_set_error (error, GIMP_PDB_ERROR, GIMP_PDB_ERROR_INVALID_ARGUMENT,
diff --git a/app/pdb/image-cmds.c b/app/pdb/image-cmds.c
index d04b28e..4ac448f 100644
--- a/app/pdb/image-cmds.c
+++ b/app/pdb/image-cmds.c
@@ -294,7 +294,7 @@ image_base_type_invoker (GimpProcedure *procedure,
if (success)
{
- base_type = gimp_image_base_type (image);
+ base_type = gimp_image_get_base_type (image);
}
return_vals = gimp_procedure_get_return_values (procedure, success,
diff --git a/app/plug-in/plug-in-icc-profile.c b/app/plug-in/plug-in-icc-profile.c
index 77e498d..f23c477 100644
--- a/app/plug-in/plug-in-icc-profile.c
+++ b/app/plug-in/plug-in-icc-profile.c
@@ -70,7 +70,7 @@ plug_in_icc_profile_apply_rgb (GimpImage *image,
gimp = image->gimp;
- if (gimp_image_base_type (image) == GIMP_GRAY)
+ if (gimp_image_get_base_type (image) == GIMP_GRAY)
return FALSE;
procedure = gimp_pdb_lookup_procedure (gimp->pdb, ICC_PROFILE_APPLY_RGB_PROC);
diff --git a/app/widgets/gimpcolormapeditor.c b/app/widgets/gimpcolormapeditor.c
index b6a6832..1a8ea4c 100644
--- a/app/widgets/gimpcolormapeditor.c
+++ b/app/widgets/gimpcolormapeditor.c
@@ -51,7 +51,7 @@
#define HAVE_COLORMAP(image) \
(image != NULL && \
- gimp_image_base_type (image) == GIMP_INDEXED && \
+ gimp_image_get_base_type (image) == GIMP_INDEXED && \
gimp_image_get_colormap (image) != NULL)
@@ -494,7 +494,7 @@ gimp_colormap_preview_expose (GtkWidget *widget,
gint y;
if (image_editor->image == NULL ||
- gimp_image_base_type (image_editor->image) == GIMP_INDEXED)
+ gimp_image_get_base_type (image_editor->image) == GIMP_INDEXED)
return FALSE;
cr = gdk_cairo_create (event->window);
diff --git a/app/widgets/gimpcomponenteditor.c b/app/widgets/gimpcomponenteditor.c
index a7f266d..d6e5a2b 100644
--- a/app/widgets/gimpcomponenteditor.c
+++ b/app/widgets/gimpcomponenteditor.c
@@ -338,7 +338,7 @@ gimp_component_editor_create_components (GimpComponentEditor *editor)
GEnumClass *enum_class;
gint i;
- switch (gimp_image_base_type (image))
+ switch (gimp_image_get_base_type (image))
{
case GIMP_RGB:
n_components = 3;
diff --git a/app/widgets/gimpimagepropview.c b/app/widgets/gimpimagepropview.c
index 31e172b..6e7718a 100644
--- a/app/widgets/gimpimagepropview.c
+++ b/app/widgets/gimpimagepropview.c
@@ -475,7 +475,7 @@ gimp_image_prop_view_update (GimpImagePropView *view)
gtk_label_set_text (GTK_LABEL (view->resolution_label), buf);
/* color type */
- type = gimp_image_base_type (image);
+ type = gimp_image_get_base_type (image);
gimp_enum_get_value (GIMP_TYPE_IMAGE_BASE_TYPE, type,
NULL, NULL, &desc, NULL);
diff --git a/app/xcf/xcf-load.c b/app/xcf/xcf-load.c
index e87028a..a62ceee 100644
--- a/app/xcf/xcf-load.c
+++ b/app/xcf/xcf-load.c
@@ -466,7 +466,7 @@ xcf_load_image_props (XcfInfo *info,
* just sanity checking to make sure gimp doesn't end up
* with an image state that is impossible.
*/
- if (gimp_image_base_type (image) == GIMP_INDEXED)
+ if (gimp_image_get_base_type (image) == GIMP_INDEXED)
gimp_image_set_colormap (image, cmap, n_colors, FALSE);
}
break;
diff --git a/app/xcf/xcf-save.c b/app/xcf/xcf-save.c
index 84bdfb9..3819cee 100644
--- a/app/xcf/xcf-save.c
+++ b/app/xcf/xcf-save.c
@@ -259,7 +259,7 @@ xcf_save_image (XcfInfo *info,
value = gimp_image_get_height (image);
xcf_write_int32_check_error (info, (guint32 *) &value, 1);
- value = gimp_image_base_type (image);
+ value = gimp_image_get_base_type (image);
xcf_write_int32_check_error (info, &value, 1);
if (info->file_version >= 4)
diff --git a/tools/pdbgen/pdb/image.pdb b/tools/pdbgen/pdb/image.pdb
index f5fc5e5..7a82aed 100644
--- a/tools/pdbgen/pdb/image.pdb
+++ b/tools/pdbgen/pdb/image.pdb
@@ -1510,7 +1510,7 @@ HELP
%invoke = (
code => <<'CODE'
{
- base_type = gimp_image_base_type (image);
+ base_type = gimp_image_get_base_type (image);
}
CODE
);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]