small cosmetic changes, such as removing tabs.

This commit is contained in:
David Odin 2003-12-23 22:07:06 +00:00
parent 0632251cff
commit 39bf72558c
18 changed files with 2858 additions and 2847 deletions

View File

@ -1,3 +1,24 @@
2003-12-22 DindinX <david@dindinx.org>
* plug-ins/common/AlienMap.c:
* plug-ins/common/AlienMap2.c:
* plug-ins/common/CEL.c:
* plug-ins/common/aa.c:
* plug-ins/common/align_layers.c:
* plug-ins/common/animationplay.c:
* plug-ins/common/animoptimize.c:
* plug-ins/common/apply_lens.c:
* plug-ins/common/autocrop.c:
* plug-ins/common/blinds.c:
* plug-ins/common/blur.c:
* plug-ins/common/borderaverage.c:
* plug-ins/common/bumpmap.c:
* plug-ins/common/bz2.c:
* plug-ins/common/c_astretch.c:
* plug-ins/common/channel_mixer.c:
* plug-ins/common/nova.c: small cosmetic changes, such as removing
tabs.
2003-12-22 DindinX <david@dindinx.org> 2003-12-22 DindinX <david@dindinx.org>
* app/gui/user-install-dialog.c (user_install_dialog_run): added a * app/gui/user-install-dialog.c (user_install_dialog_run): added a

View File

@ -1349,7 +1349,7 @@ alienmap_logo_dialog (GtkWidget *parent)
gchar *text; gchar *text;
guchar *temp, *temp2; guchar *temp, *temp2;
guchar *datapointer; guchar *datapointer;
gint y,x; gint y, x;
if (logodlg) if (logodlg)
{ {

View File

@ -1384,7 +1384,7 @@ alienmap2_logo_dialog (GtkWidget *parent)
gchar *text; gchar *text;
guchar *temp, *temp2; guchar *temp, *temp2;
guchar *datapointer; guchar *datapointer;
gint y,x; gint y, x;
if (logodlg) if (logodlg)
{ {

View File

@ -164,7 +164,7 @@ run (const gchar *name,
gimp_get_data ("file_cel_save:length", &data_length); gimp_get_data ("file_cel_save:length", &data_length);
if (data_length > 0) if (data_length > 0)
{ {
palette_file = (char *) g_malloc(data_length); palette_file = g_malloc(data_length);
gimp_get_data ("file_cel_save:data", palette_file); gimp_get_data ("file_cel_save:data", palette_file);
} }
else else

View File

@ -99,8 +99,8 @@ typedef struct
gint h_base; gint h_base;
gint v_style; gint v_style;
gint v_base; gint v_base;
gint ignore_bottom; gboolean ignore_bottom;
gint base_is_bottom_layer; gboolean base_is_bottom_layer;
gint grid_size; gint grid_size;
} ValueType; } ValueType;

View File

@ -211,9 +211,13 @@ static gint ncolours;
static GtkWidget *psbutton; static GtkWidget *psbutton;
/* for shaping */ /* for shaping */
typedef struct
{
gint x, y;
} CursorOffset;
static gchar *shape_preview_mask; static gchar *shape_preview_mask;
static GtkWidget *shape_window; static GtkWidget *shape_window;
typedef struct _cursoroffset {gint x,y;} CursorOffset;
static gint shaping = 0; static gint shaping = 0;
static GdkWindow *root_win = NULL; static GdkWindow *root_win = NULL;
@ -348,7 +352,7 @@ shape_released (GtkWidget *widget)
{ {
gtk_grab_remove (widget); gtk_grab_remove (widget);
gdk_display_pointer_ungrab (gtk_widget_get_display (widget), 0); gdk_display_pointer_ungrab (gtk_widget_get_display (widget), 0);
gdk_flush(); gdk_flush ();
return FALSE; return FALSE;
} }
@ -358,13 +362,11 @@ shape_motion (GtkWidget *widget,
GdkEventMotion *event) GdkEventMotion *event)
{ {
gint xp, yp; gint xp, yp;
CursorOffset * p; CursorOffset *p;
GdkModifierType mask; GdkModifierType mask;
gdk_window_get_pointer (root_win, &xp, &yp, &mask); gdk_window_get_pointer (root_win, &xp, &yp, &mask);
/* printf("%u %d\n", mask, event->state);fflush(stdout); */
/* if a button is still held by the time we process this event... */ /* if a button is still held by the time we process this event... */
if (mask & (GDK_BUTTON1_MASK| if (mask & (GDK_BUTTON1_MASK|
GDK_BUTTON2_MASK| GDK_BUTTON2_MASK|
@ -392,7 +394,6 @@ repaint_da (GtkWidget *darea,
GdkEventExpose *event, GdkEventExpose *event,
gpointer data) gpointer data)
{ {
/* printf("Repaint! Woohoo!\n");*/
gdk_draw_rgb_image (drawing_area->window, gdk_draw_rgb_image (drawing_area->window,
drawing_area->style->white_gc, drawing_area->style->white_gc,
0, 0, width, height, 0, 0, width, height,
@ -408,7 +409,6 @@ repaint_sda (GtkWidget *darea,
GdkEventExpose *event, GdkEventExpose *event,
gpointer data) gpointer data)
{ {
/*printf("Repaint! Woohoo!\n");*/
gdk_draw_rgb_image (shape_drawing_area->window, gdk_draw_rgb_image (shape_drawing_area->window,
shape_drawing_area->style->white_gc, shape_drawing_area->style->white_gc,
0, 0, width, height, 0, 0, width, height,
@ -441,15 +441,15 @@ preview_pressed (GtkWidget *widget,
gtk_widget_show (shape_window); gtk_widget_show (shape_window);
gdk_window_set_back_pixmap(shape_window->window, NULL, 0); gdk_window_set_back_pixmap (shape_window->window, NULL, 0);
gdk_window_set_back_pixmap(shape_drawing_area->window, NULL, 1); gdk_window_set_back_pixmap (shape_drawing_area->window, NULL, 1);
show_frame(); show_frame ();
shaping = 1; shaping = 1;
memset(shape_preview_mask, 0, (width*height)/8 + height); memset (shape_preview_mask, 0, (width*height)/8 + height);
render_frame(frame_number); render_frame (frame_number);
show_frame(); show_frame ();
repaint_da (NULL, NULL, NULL); repaint_da (NULL, NULL, NULL);
@ -463,16 +463,16 @@ static void
build_dialog (GimpImageBaseType basetype, build_dialog (GimpImageBaseType basetype,
gchar *imagename) gchar *imagename)
{ {
gchar* windowname; gchar *windowname;
CursorOffset* icon_pos; CursorOffset *icon_pos;
GtkWidget* button; GtkWidget *button;
GtkWidget* frame; GtkWidget *frame;
GtkWidget* frame2; GtkWidget *frame2;
GtkWidget* vbox; GtkWidget *vbox;
GtkWidget* hbox; GtkWidget *hbox;
GtkWidget* hbox2; GtkWidget *hbox2;
GtkWidget* eventbox; GtkWidget *eventbox;
GdkCursor* cursor; GdkCursor *cursor;
gimp_ui_init ("animationplay", TRUE); gimp_ui_init ("animationplay", TRUE);
@ -494,19 +494,13 @@ build_dialog (GimpImageBaseType basetype,
{ {
/* The 'playback' half of the dialog */ /* The 'playback' half of the dialog */
windowname = g_malloc (strlen (_("Playback: ")) + strlen (imagename) + 1);
if (total_frames > 1) if (total_frames > 1)
{ windowname = g_strconcat (_("Playback: "), imagename);
strcpy (windowname, _("Playback: "));
strcat (windowname, imagename);
}
else else
{ windowname = g_strdup (imagename);
strcpy (windowname, imagename);
}
frame = gtk_frame_new (windowname); frame = gtk_frame_new (windowname);
g_free (windowname); g_free (windowname);
gtk_container_set_border_width (GTK_CONTAINER (frame), 3); gtk_container_set_border_width (GTK_CONTAINER (frame), 3);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox),
frame, TRUE, TRUE, 0); frame, TRUE, TRUE, 0);
@ -701,14 +695,13 @@ render_frame (gint32 whichframe)
{ {
GimpPixelRgn pixel_rgn; GimpPixelRgn pixel_rgn;
static guchar *rawframe = NULL; static guchar *rawframe = NULL;
static gint rawwidth=0, rawheight=0, rawbpp=0; static gint rawwidth = 0, rawheight = 0, rawbpp = 0;
gint rawx=0, rawy=0; gint rawx = 0, rawy = 0;
guchar* srcptr; guchar *srcptr;
guchar* destptr; guchar *destptr;
gint i,j,k; /* imaginative loop variables */ gint i, j, k; /* imaginative loop variables */
DisposeType dispose; DisposeType dispose;
if (whichframe >= total_frames) if (whichframe >= total_frames)
{ {
printf( "playback: Asked for frame number %d in a %d-frame animation!\n", printf( "playback: Asked for frame number %d in a %d-frame animation!\n",
@ -724,17 +717,17 @@ render_frame (gint32 whichframe)
return; return;
} }
dispose = get_frame_disposal(frame_number); dispose = get_frame_disposal (frame_number);
/* Image has been closed/etc since we got the layer list? */ /* Image has been closed/etc since we got the layer list? */
/* FIXME - How do we tell if a gimp_drawable_get() fails? */ /* FIXME - How do we tell if a gimp_drawable_get() fails? */
if (gimp_drawable_width(drawable->drawable_id)==0) if (gimp_drawable_width (drawable->drawable_id) == 0)
gtk_dialog_response (GTK_DIALOG (dlg), GTK_RESPONSE_CLOSE); gtk_dialog_response (GTK_DIALOG (dlg), GTK_RESPONSE_CLOSE);
if (((dispose==DISPOSE_REPLACE)||(whichframe==0)) && if (((dispose==DISPOSE_REPLACE)||(whichframe==0)) &&
gimp_drawable_has_alpha(drawable->drawable_id)) gimp_drawable_has_alpha (drawable->drawable_id))
{ {
total_alpha_preview(preview_data); total_alpha_preview (preview_data);
} }
@ -747,7 +740,8 @@ render_frame (gint32 whichframe)
gimp_drawable_height(drawable->drawable_id)* gimp_drawable_height(drawable->drawable_id)*
gimp_drawable_bpp(drawable->drawable_id)))) gimp_drawable_bpp(drawable->drawable_id))))
{ {
if (rawframe != NULL) g_free(rawframe); if (rawframe != NULL)
g_free(rawframe);
rawframe = g_malloc((gimp_drawable_width(drawable->drawable_id)) * rawframe = g_malloc((gimp_drawable_width(drawable->drawable_id)) *
(gimp_drawable_height(drawable->drawable_id)) * (gimp_drawable_height(drawable->drawable_id)) *
(gimp_drawable_bpp(drawable->drawable_id))); (gimp_drawable_bpp(drawable->drawable_id)));
@ -832,7 +826,6 @@ render_frame (gint32 whichframe)
{ {
if ((rawwidth==width)&&(rawheight==height)) if ((rawwidth==width)&&(rawheight==height))
{ {
/*printf("quickie\n");fflush(stdout);*/
memcpy(preview_data, rawframe, width*height*3); memcpy(preview_data, rawframe, width*height*3);
} }
@ -989,8 +982,8 @@ render_frame (gint32 whichframe)
gdk_draw_rgb_image (drawing_area->window, gdk_draw_rgb_image (drawing_area->window,
drawing_area->style->white_gc, drawing_area->style->white_gc,
0, 0, width, height, 0, 0, width, height,
(total_frames==1)?GDK_RGB_DITHER_MAX: (total_frames==1)?GDK_RGB_DITHER_MAX
DITHERTYPE, :DITHERTYPE,
preview_data, width * 3); preview_data, width * 3);
} }
} }
@ -1074,8 +1067,8 @@ render_frame (gint32 whichframe)
gdk_draw_rgb_image (shape_drawing_area->window, gdk_draw_rgb_image (shape_drawing_area->window,
shape_drawing_area->style->white_gc, shape_drawing_area->style->white_gc,
0, 0, width, height, 0, 0, width, height,
(total_frames==1)?GDK_RGB_DITHER_MAX: (total_frames==1)?GDK_RGB_DITHER_MAX
DITHERTYPE, :DITHERTYPE,
preview_data, width * 3); preview_data, width * 3);
} }
else else
@ -1083,8 +1076,8 @@ render_frame (gint32 whichframe)
gdk_draw_rgb_image (drawing_area->window, gdk_draw_rgb_image (drawing_area->window,
drawing_area->style->white_gc, drawing_area->style->white_gc,
0, 0, width, height, 0, 0, width, height,
(total_frames==1)?GDK_RGB_DITHER_MAX: (total_frames==1)?GDK_RGB_DITHER_MAX
DITHERTYPE, :DITHERTYPE,
preview_data, width * 3); preview_data, width * 3);
} }
} }
@ -1423,7 +1416,7 @@ step_callback (GtkWidget *widget,
static DisposeType static DisposeType
get_frame_disposal (const guint whichframe) get_frame_disposal (const guint whichframe)
{ {
gchar* layer_name; gchar *layer_name;
DisposeType disposal; DisposeType disposal;
layer_name = gimp_drawable_get_name(layers[total_frames-(whichframe+1)]); layer_name = gimp_drawable_get_name(layers[total_frames-(whichframe+1)]);
@ -1438,7 +1431,7 @@ get_frame_disposal (const guint whichframe)
static guint32 static guint32
get_frame_duration (const guint whichframe) get_frame_duration (const guint whichframe)
{ {
gchar* layer_name; gchar *layer_name;
gint duration = 0; gint duration = 0;
layer_name = gimp_drawable_get_name(layers[total_frames-(whichframe+1)]); layer_name = gimp_drawable_get_name(layers[total_frames-(whichframe+1)]);
@ -1577,3 +1570,4 @@ parse_disposal_tag (const char *str)
return (DISPOSE_UNDEFINED); /* FIXME */ return (DISPOSE_UNDEFINED); /* FIXME */
} }

View File

@ -393,10 +393,10 @@ compose_row (gint frame_num,
if (line_buf) if (line_buf)
{ {
g_free(line_buf); g_free (line_buf);
line_buf = NULL; line_buf = NULL;
} }
line_buf = g_malloc(rawwidth * rawbpp); line_buf = g_malloc (rawwidth * rawbpp);
/* Initialise and fetch the raw new frame row */ /* Initialise and fetch the raw new frame row */
@ -445,7 +445,7 @@ do_optimizations (GimpRunMode run_mode,
static guchar *rawframe = NULL; static guchar *rawframe = NULL;
guchar *srcptr; guchar *srcptr;
guchar *destptr; guchar *destptr;
gint row,this_frame_num; gint row, this_frame_num;
guint32 frame_sizebytes; guint32 frame_sizebytes;
gint32 new_layer_id; gint32 new_layer_id;
DisposeType dispose; DisposeType dispose;
@ -484,10 +484,10 @@ do_optimizations (GimpRunMode run_mode,
break; break;
} }
width = gimp_image_width(image_id); width = gimp_image_width (image_id);
height = gimp_image_height(image_id); height = gimp_image_height (image_id);
layers = gimp_image_get_layers (image_id, &total_frames); layers = gimp_image_get_layers (image_id, &total_frames);
imagetype = gimp_image_base_type(image_id); imagetype = gimp_image_base_type (image_id);
pixelstep = (imagetype == GIMP_RGB) ? 4 : 2; pixelstep = (imagetype == GIMP_RGB) ? 4 : 2;
/* gimp_tile_cache_ntiles(total_frames * (width / gimp_tile_width() + 1) );*/ /* gimp_tile_cache_ntiles(total_frames * (width / gimp_tile_width() + 1) );*/
@ -666,19 +666,19 @@ do_optimizations (GimpRunMode run_mode,
for (this_frame_num=0; this_frame_num<total_frames; this_frame_num++) for (this_frame_num=0; this_frame_num<total_frames; this_frame_num++)
{ {
g_free(these_rows[this_frame_num]); g_free (these_rows[this_frame_num]);
g_free(red[this_frame_num]); g_free (red[this_frame_num]);
g_free(green[this_frame_num]); g_free (green[this_frame_num]);
g_free(blue[this_frame_num]); g_free (blue[this_frame_num]);
g_free(count[this_frame_num]); g_free (count[this_frame_num]);
} }
g_free(these_rows); g_free (these_rows);
g_free(red); g_free (red);
g_free(green); g_free (green);
g_free(blue); g_free (blue);
g_free(count); g_free (count);
g_free(num_colours); g_free (num_colours);
} }
#endif #endif
@ -728,7 +728,7 @@ do_optimizations (GimpRunMode run_mode,
for (row = 0; row < height; row++) for (row = 0; row < height; row++)
{ {
compose_row(this_frame_num, compose_row (this_frame_num,
dispose, dispose,
row, row,
&this_frame[pixelstep*width * row], &this_frame[pixelstep*width * row],
@ -1301,7 +1301,7 @@ is_disposal_tag (const gchar *str,
return TRUE; return TRUE;
} }
return 0; return FALSE;
} }

View File

@ -150,8 +150,8 @@ static void
indexed_c_astretch (gint32 image_ID) indexed_c_astretch (gint32 image_ID)
{ {
guchar *cmap; guchar *cmap;
gint ncols,i; gint ncols, i;
gint rhi=0,ghi=0,bhi=0,rlo=255,glo=255,blo=255; gint rhi=0, ghi=0, bhi=0, rlo=255, glo=255, blo=255;
cmap = gimp_image_get_cmap (image_ID, &ncols); cmap = gimp_image_get_cmap (image_ID, &ncols);
@ -197,7 +197,7 @@ find_min_max (const guchar *src,
gint bpp, gint bpp,
gpointer data) gpointer data)
{ {
AutoStretchParam_t *param = (AutoStretchParam_t*) data; AutoStretchParam_t *param = data;
gint b; gint b;
for (b = 0; b < param->alpha; b++) for (b = 0; b < param->alpha; b++)
@ -218,7 +218,7 @@ c_astretch_func (const guchar *src,
gint bpp, gint bpp,
gpointer data) gpointer data)
{ {
AutoStretchParam_t *param = (AutoStretchParam_t*) data; AutoStretchParam_t *param = data;
gint b; gint b;
for (b = 0; b < param->alpha; b++) for (b = 0; b < param->alpha; b++)

View File

@ -61,10 +61,8 @@
#include "config.h" #include "config.h"
#include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <time.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
@ -647,9 +645,7 @@ nova_center_preview_expose (GtkWidget *widget,
GdkEvent *event, GdkEvent *event,
gpointer data) gpointer data)
{ {
printf("Before\n");
nova_center_draw ((NovaCenter*) data, ALL); nova_center_draw ((NovaCenter*) data, ALL);
printf("After\n");
return FALSE; return FALSE;
} }