Commit f2df31a5 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

converted tabs to spaces.

2006-04-12  Sven Neumann  <sven@gimp.org>

	* libgimp*/gimp*.[ch]: converted tabs to spaces.
parent 8ed41a7c
2006-04-12 Sven Neumann <sven@gimp.org>
* libgimp*/gimp*.[ch]: converted tabs to spaces.
2006-04-12 Sven Neumann <sven@gimp.org>
* tools/pdbgen/lib.pl: create code with spaces instead of tabs.
......
......@@ -42,13 +42,13 @@ enum
static void gimp_aspect_preview_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gimp_aspect_preview_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_aspect_preview_style_set (GtkWidget *widget,
GtkStyle *prev_style);
static void gimp_aspect_preview_draw (GimpPreview *preview);
......@@ -57,7 +57,7 @@ static void gimp_aspect_preview_draw_buffer (GimpPreview *preview,
gint rowstride);
static void gimp_aspect_preview_set_drawable (GimpAspectPreview *preview,
GimpDrawable *drawable);
GimpDrawable *drawable);
G_DEFINE_TYPE (GimpAspectPreview, gimp_aspect_preview, GIMP_TYPE_PREVIEW);
......@@ -87,8 +87,8 @@ gimp_aspect_preview_class_init (GimpAspectPreviewClass *klass)
*/
g_object_class_install_property (object_class, PROP_DRAWABLE,
g_param_spec_pointer ("drawable", NULL, NULL,
GIMP_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY));
GIMP_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY));
}
static void
......@@ -102,9 +102,9 @@ gimp_aspect_preview_init (GimpAspectPreview *preview)
static void
gimp_aspect_preview_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec)
guint property_id,
GValue *value,
GParamSpec *pspec)
{
GimpAspectPreview *preview = GIMP_ASPECT_PREVIEW (object);
......@@ -122,9 +122,9 @@ gimp_aspect_preview_get_property (GObject *object,
static void
gimp_aspect_preview_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec)
guint property_id,
const GValue *value,
GParamSpec *pspec)
{
GimpAspectPreview *preview = GIMP_ASPECT_PREVIEW (object);
......@@ -132,7 +132,7 @@ gimp_aspect_preview_set_property (GObject *object,
{
case PROP_DRAWABLE:
gimp_aspect_preview_set_drawable (preview,
g_value_get_pointer (value));
g_value_get_pointer (value));
break;
default:
......@@ -238,7 +238,7 @@ gimp_aspect_preview_draw_buffer (GimpPreview *preview,
static void
gimp_aspect_preview_set_drawable (GimpAspectPreview *preview,
GimpDrawable *drawable)
GimpDrawable *drawable)
{
gint width, height;
gint max_width, max_height;
......@@ -259,12 +259,12 @@ gimp_aspect_preview_set_drawable (GimpAspectPreview *preview,
max_width = (width * max_height) / height;
}
gimp_preview_set_bounds (GIMP_PREVIEW (preview),
0, 0, max_width, max_height);
0, 0, max_width, max_height);
if (height > 0)
g_object_set (GIMP_PREVIEW (preview)->frame,
"ratio", (gdouble) width / (gdouble) height,
NULL);
"ratio", (gdouble) width / (gdouble) height,
NULL);
}
static void
......@@ -295,8 +295,8 @@ gimp_aspect_preview_new (GimpDrawable *drawable,
g_return_val_if_fail (drawable != NULL, NULL);
preview = g_object_new (GIMP_TYPE_ASPECT_PREVIEW,
"drawable", drawable,
NULL);
"drawable", drawable,
NULL);
if (toggle)
{
......
......@@ -376,10 +376,10 @@ gimp_brush_select_widget_clicked (GtkWidget *widget,
{
/* calling gimp_brushes_set_popup() raises the dialog */
gimp_brushes_set_popup (brush_sel->temp_brush_callback,
brush_sel->brush_name,
brush_sel->opacity,
brush_sel->spacing,
brush_sel->paint_mode);
brush_sel->brush_name,
brush_sel->opacity,
brush_sel->spacing,
brush_sel->paint_mode);
}
else
{
......@@ -433,30 +433,30 @@ gimp_brush_select_preview_events (GtkWidget *widget,
if (brush_sel->mask_data)
{
switch (event->type)
{
case GDK_BUTTON_PRESS:
bevent = (GdkEventButton *) event;
if (bevent->button == 1)
{
gtk_grab_add (widget);
gimp_brush_select_popup_open (brush_sel, bevent->x, bevent->y);
}
break;
case GDK_BUTTON_RELEASE:
bevent = (GdkEventButton *) event;
if (bevent->button == 1)
{
gtk_grab_remove (widget);
gimp_brush_select_popup_close (brush_sel);
}
break;
default:
break;
}
{
case GDK_BUTTON_PRESS:
bevent = (GdkEventButton *) event;
if (bevent->button == 1)
{
gtk_grab_add (widget);
gimp_brush_select_popup_open (brush_sel, bevent->x, bevent->y);
}
break;
case GDK_BUTTON_RELEASE:
bevent = (GdkEventButton *) event;
if (bevent->button == 1)
{
gtk_grab_remove (widget);
gimp_brush_select_popup_close (brush_sel);
}
break;
default:
break;
}
}
return FALSE;
......
......@@ -86,17 +86,17 @@ gimp_brush_select_new (const gchar *title,
gchar *brush_callback = gimp_procedural_db_temp_name ();
gimp_install_temp_proc (brush_callback,
"Temporary brush popup callback procedure",
"",
"Andy Thomas",
"Andy Thomas",
"1997",
NULL,
"RGB*, GRAY*",
GIMP_TEMPORARY,
G_N_ELEMENTS (args), 0,
args, NULL,
gimp_temp_brush_run);
"Temporary brush popup callback procedure",
"",
"Andy Thomas",
"Andy Thomas",
"1997",
NULL,
"RGB*, GRAY*",
GIMP_TEMPORARY,
G_N_ELEMENTS (args), 0,
args, NULL,
gimp_temp_brush_run);
if (gimp_brushes_popup (brush_callback, title, brush_name,
opacity, spacing, paint_mode))
......
......@@ -47,16 +47,16 @@
*/
gint32
gimp_channel_new (gint32 image_ID,
const gchar *name,
guint width,
guint height,
gdouble opacity,
const GimpRGB *color)
const gchar *name,
guint width,
guint height,
gdouble opacity,
const GimpRGB *color)
{
return _gimp_channel_new (image_ID,
width,
height,
name,
opacity,
color);
width,
height,
name,
opacity,
color);
}
......@@ -28,11 +28,11 @@ G_BEGIN_DECLS
gint32 gimp_channel_new (gint32 image_ID,
const gchar *name,
guint width,
guint height,
gdouble opacity,
const GimpRGB *color);
const gchar *name,
guint width,
guint height,
gdouble opacity,
const GimpRGB *color);
G_END_DECLS
......
......@@ -145,9 +145,9 @@ gimp_drawable_flush (GimpDrawable *drawable)
GimpTile *
gimp_drawable_get_tile (GimpDrawable *drawable,
gboolean shadow,
gint row,
gint col)
gboolean shadow,
gint row,
gint col)
{
GimpTile *tiles;
guint right_tile;
......@@ -210,9 +210,9 @@ gimp_drawable_get_tile (GimpDrawable *drawable,
GimpTile *
gimp_drawable_get_tile2 (GimpDrawable *drawable,
gboolean shadow,
gint x,
gint y)
gboolean shadow,
gint x,
gint y)
{
gint row;
gint col;
......@@ -264,9 +264,9 @@ gimp_drawable_get_color_uchar (gint32 drawable_ID,
guchar *
gimp_drawable_get_thumbnail_data (gint32 drawable_ID,
gint *width,
gint *height,
gint *bpp)
gint *width,
gint *height,
gint *bpp)
{
gint ret_width;
gint ret_height;
......@@ -274,13 +274,13 @@ gimp_drawable_get_thumbnail_data (gint32 drawable_ID,
gint data_size;
_gimp_drawable_thumbnail (drawable_ID,
*width,
*height,
&ret_width,
&ret_height,
bpp,
&data_size,
&image_data);
*width,
*height,
&ret_width,
&ret_height,
bpp,
&data_size,
&image_data);
*width = ret_width;
*height = ret_height;
......@@ -338,10 +338,10 @@ gimp_drawable_get_sub_thumbnail_data (gint32 drawable_ID,
*/
gboolean
gimp_drawable_attach_new_parasite (gint32 drawable_ID,
const gchar *name,
gint flags,
gint size,
gconstpointer data)
const gchar *name,
gint flags,
gint size,
gconstpointer data)
{
GimpParasite *parasite = gimp_parasite_new (name, flags, size, data);
gboolean success;
......
......@@ -190,7 +190,7 @@ gimp_drawable_combo_box_new (GimpDrawableConstraintFunc constraint,
G_DEFINE_TYPE(GimpChannelComboBox,
gimp_channel_combo_box,
GIMP_TYPE_INT_COMBO_BOX);
GIMP_TYPE_INT_COMBO_BOX);
static void
gimp_channel_combo_box_class_init (GimpChannelComboBoxClass *klass)
......@@ -269,7 +269,7 @@ gimp_channel_combo_box_new (GimpDrawableConstraintFunc constraint,
G_DEFINE_TYPE(GimpLayerComboBox,
gimp_layer_combo_box,
GIMP_TYPE_INT_COMBO_BOX);
GIMP_TYPE_INT_COMBO_BOX);
static void
gimp_layer_combo_box_class_init (GimpLayerComboBoxClass *klass)
......
......@@ -48,17 +48,17 @@ typedef struct
static GObject * gimp_drawable_preview_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
guint n_params,
GObjectConstructParam *params);
static void gimp_drawable_preview_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gimp_drawable_preview_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_drawable_preview_destroy (GtkObject *object);
static void gimp_drawable_preview_style_set (GtkWidget *widget,
......@@ -74,7 +74,7 @@ static void gimp_drawable_preview_draw_buffer (GimpPreview *preview,
gint rowstride);
static void gimp_drawable_preview_set_drawable (GimpDrawablePreview *preview,
GimpDrawable *drawable);
GimpDrawable *drawable);
G_DEFINE_TYPE (GimpDrawablePreview, gimp_drawable_preview,
......@@ -110,8 +110,8 @@ gimp_drawable_preview_class_init (GimpDrawablePreviewClass *klass)
*/
g_object_class_install_property (object_class, PROP_DRAWABLE,
g_param_spec_pointer ("drawable", NULL, NULL,
GIMP_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY));
GIMP_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY));
}
static void
......@@ -125,8 +125,8 @@ gimp_drawable_preview_init (GimpDrawablePreview *preview)
static GObject *
gimp_drawable_preview_constructor (GType type,
guint n_params,
GObjectConstructParam *params)
guint n_params,
GObjectConstructParam *params)
{
GObject *object;
PreviewSettings settings;
......@@ -145,9 +145,9 @@ gimp_drawable_preview_constructor (GType type,
static void
gimp_drawable_preview_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec)
guint property_id,
GValue *value,
GParamSpec *pspec)
{
GimpDrawablePreview *preview = GIMP_DRAWABLE_PREVIEW (object);
......@@ -155,7 +155,7 @@ gimp_drawable_preview_get_property (GObject *object,
{
case PROP_DRAWABLE:
g_value_set_pointer (value,
gimp_drawable_preview_get_drawable (preview));
gimp_drawable_preview_get_drawable (preview));
break;
default:
......@@ -166,9 +166,9 @@ gimp_drawable_preview_get_property (GObject *object,
static void
gimp_drawable_preview_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec)
guint property_id,
const GValue *value,
GParamSpec *pspec)
{
GimpDrawablePreview *preview = GIMP_DRAWABLE_PREVIEW (object);
......@@ -176,7 +176,7 @@ gimp_drawable_preview_set_property (GObject *object,
{
case PROP_DRAWABLE:
gimp_drawable_preview_set_drawable (preview,
g_value_get_pointer (value));
g_value_get_pointer (value));
break;
default:
......@@ -277,9 +277,9 @@ gimp_drawable_preview_draw_thumb (GimpPreview *preview,
void
_gimp_drawable_preview_area_draw_thumb (GimpPreviewArea *area,
GimpDrawable *drawable,
gint width,
gint height)
GimpDrawable *drawable,
gint width,
gint height)
{
guchar *buffer;
gint x1, y1, x2, y2;
......@@ -317,13 +317,13 @@ _gimp_drawable_preview_area_draw_thumb (GimpPreviewArea *area,
buffer = gimp_drawable_get_sub_thumbnail_data (drawable->drawable_id,
x1, y1, x2 - x1, y2 - y1,
&nav_width, &nav_height,
&bpp);
&bpp);
}
else
{
buffer = gimp_drawable_get_thumbnail_data (drawable->drawable_id,
&nav_width, &nav_height,
&bpp);
&bpp);
}
if (buffer)
......@@ -467,10 +467,10 @@ gimp_drawable_preview_set_drawable (GimpDrawablePreview *drawable_preview,
gboolean
_gimp_drawable_preview_get_bounds (GimpDrawable *drawable,
gint *xmin,
gint *ymin,
gint *xmax,
gint *ymax)
gint *xmin,
gint *ymin,
gint *xmax,
gint *ymax)
{
gint width;
gint height;
......@@ -533,8 +533,8 @@ gimp_drawable_preview_new (GimpDrawable *drawable,
g_return_val_if_fail (drawable != NULL, NULL);
preview = g_object_new (GIMP_TYPE_DRAWABLE_PREVIEW,
"drawable", drawable,
NULL);
"drawable", drawable,
NULL);
if (toggle)
{
......
......@@ -70,14 +70,14 @@ void gimp_drawable_preview_draw_region (GimpDrawablePreview *preview,
/* for internal use only */
void _gimp_drawable_preview_area_draw_thumb (GimpPreviewArea *area,
GimpDrawable *drawable,
gint width,
gint height) G_GNUC_INTERNAL;
GimpDrawable *drawable,
gint width,
gint height) G_GNUC_INTERNAL;
gboolean _gimp_drawable_preview_get_bounds (GimpDrawable *drawable,
gint *xmin,
gint *ymin,
gint *xmax,
gint *ymax) G_GNUC_INTERNAL;
gint *xmin,
gint *ymin,
gint *xmax,
gint *ymax) G_GNUC_INTERNAL;
G_END_DECLS
......
......@@ -31,7 +31,7 @@
typedef void (* ExportFunc) (gint32 imageID,
gint32 *drawable_ID);
gint32 *drawable_ID);
/* the export action structure */
......@@ -49,7 +49,7 @@ typedef struct
static void
export_merge (gint32 image_ID,
gint32 *drawable_ID)
gint32 *drawable_ID)
{
gint32 nlayers;
gint32 nvisible = 0;
......@@ -62,19 +62,19 @@ export_merge (gint32 image_ID,
for (i = 0; i < nlayers; i++)
{
if (gimp_drawable_get_visible (layers[i]))
nvisible++;
nvisible++;
}
if (nvisible <= 1)
{
/* if there is only one (or zero) visible layer, add a new transparent
layer that has the same size as the canvas. The merge that follows
will ensure that the offset, opacity and size are correct */
layer that has the same size as the canvas. The merge that follows
will ensure that the offset, opacity and size are correct */
transp = gimp_layer_new (image_ID, "-",
gimp_image_width (image_ID),
gimp_image_height (image_ID),
gimp_drawable_type (*drawable_ID) | 1,
100.0, GIMP_NORMAL_MODE);
gimp_image_width (image_ID),
gimp_image_height (image_ID),
gimp_drawable_type (*drawable_ID) | 1,
100.0, GIMP_NORMAL_MODE);
gimp_image_add_layer (image_ID, transp, 1);
gimp_selection_none (image_ID);
gimp_edit_clear (transp);
......@@ -87,9 +87,9 @@ export_merge (gint32 image_ID,
merged = gimp_image_merge_visible_layers (image_ID, GIMP_CLIP_TO_IMAGE);
if (merged != -1)
*drawable_ID = merged;
*drawable_ID = merged;
else
return; /* shouldn't happen */
return; /* shouldn't happen */
layers = gimp_image_get_layers (image_ID, &nlayers);
......@@ -111,14 +111,14 @@ export_merge (gint32 image_ID,
for (i = 0; i < nlayers; i++)
{
if (layers[i] != *drawable_ID)
gimp_image_remove_layer (image_ID, layers[i]);
gimp_image_remove_layer (image_ID, layers[i]);
}
g_free (layers);
}
static void
export_flatten (gint32 image_ID,
gint32 *drawable_ID)
gint32 *drawable_ID)
{
gint32 flattened;
......@@ -149,21 +149,21 @@ export_apply_masks (gint32 image_ID,
static void
export_convert_rgb (gint32 image_ID,
gint32 *drawable_ID)
gint32 *drawable_ID)
{
gimp_image_convert_rgb (image_ID);
}
static void
export_convert_grayscale (gint32 image_ID,
gint32 *drawable_ID)
gint32 *drawable_ID)
{
gimp_image_convert_grayscale (image_ID);
}
static void
export_convert_indexed (gint32 image_ID,
gint32 *drawable_ID)
gint32 *drawable_ID)
{
gint32 nlayers;
......@@ -190,7 +190,7 @@ export_convert_bitmap (gint32 image_ID,
static void
export_add_alpha (gint32 image_ID,
gint32 *drawable_ID)
gint32 *drawable_ID)
{
gint32 nlayers;
gint32 i;
......@@ -200,7 +200,7 @@ export_add_alpha (gint32 image_ID,
for (i = 0; i < nlayers; i++)
{
if (!gimp_drawable_has_alpha (layers[i]))
gimp_layer_add_alpha (layers[i]);
gimp_layer_add_alpha (layers[i]);
}
g_free (layers);
}
......@@ -324,7 +324,7 @@ static ExportAction export_action_convert_rgb_or_indexed =
export_convert_indexed,
N_("%s can only handle RGB or indexed images"),
{ N_("Convert to RGB"), N_("Convert to Indexed using default settings\n"
"(Do it manually to tune the result)")},
"(Do it manually to tune the result)")},
0
};
......@@ -353,7 +353,7 @@ static ExportAction export_action_add_alpha =
static void
export_toggle_callback (GtkWidget *widget,
gpointer data)
gpointer data)
{
gint *choice = (gint *) data;
......@@ -365,7 +365,7 @@ export_toggle_callback (GtkWidget *widget,
static GimpExportReturn
confirm_save_dialog (const gchar *message,
const gchar *format_name)
const gchar *format_name)
{
GtkWidget *dialog;
GtkWidget *hbox;
......@@ -380,13 +380,13 @@ confirm_save_dialog (const gchar *message,
dialog = gimp_dialog_new (_("Confirm Save"), "gimp-export-image-confirm",
NULL, 0,
gimp_standard_help_func,
gimp_standard_help_func,
"gimp-export-confirm-dialog",
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
_("Confirm"), GTK_RESPONSE_OK,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
_("Confirm"), GTK_RESPONSE_OK,
NULL);
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
......@@ -445,7 +445,7 @@ confirm_save_dialog (const gchar *message,
static GimpExportReturn
export_dialog (GSList *actions,
const gchar *format_name)
const gchar *format_name)
{
GtkWidget *dialog;
GtkWidget *hbox;
......@@ -463,11 +463,11 @@ export_dialog (GSList *actions,
NULL, 0,
gimp_standard_help_func, "gimp-export-dialog",
_("_Ignore"), GTK_RESPONSE_NO,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
_("_Export"), GTK_RESPONSE_OK,
_("_Ignore"), GTK_RESPONSE_NO,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
_("_Export"), GTK_RESPONSE_OK,
NULL);
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_NO,
......@@ -526,43 +526,43 @@ export_dialog (GSList *actions,
gtk_container_add (GTK_CONTAINER (frame), vbox);