Commit 1bd3c654 authored by Sven Neumann's avatar Sven Neumann
Browse files

removed warnings, cleaned up the source, unmarked

internal error messages for translation


--Sven
parent 0e0cb8b5
Sun Feb 27 13:07:31 CET 2000 Sven Neumann <sven@gimp.org>
* app/gimpimage.c
* app/layer.c: removed warnings, cleaned up the source,
unmarked internal error messages for translation
Sat Feb 26 23:58:27 GMT 2000 Andy Thomas <alt@gimp.org>
 
* gimp/app/nav_window.c
* gimp/app/nav_window.c
 
Now takes note of the users set preview size when close to the
edge of the screen.
......
......@@ -532,18 +532,16 @@ gimp_image_scale (GimpImage *gimage,
Layer *layer;
Layer *floating_layer;
GSList *list;
GSList *marklist = NULL;
GSList *remove = NULL;
GList *glist;
Guide *guide;
gint old_width, old_height;
gint old_offset_x, old_offset_y;
gint layer_width, layer_height;
gdouble img_scale_w = 1.0;
gdouble img_scale_h = 1.0;
if((new_width == 0) || (new_height == 0))
if ((new_width == 0) || (new_height == 0))
{
g_message(_("gimp_image_scale: Layer with zero width or height has been rejected."));
g_message (("gimp_image_scale: Scaling to zero width or height has been rejected."));
return;
}
......@@ -567,16 +565,14 @@ gimp_image_scale (GimpImage *gimage,
old_height = gimage->height;
gimage->width = new_width;
gimage->height = new_height;
img_scale_w = (gdouble)new_width/(gdouble)old_width;
img_scale_h = (gdouble)new_height/(gdouble)old_height;
img_scale_w = (gdouble)new_width / (gdouble)old_width;
img_scale_h = (gdouble)new_height / (gdouble)old_height;
/* Scale all channels */
list = gimage->channels;
while (list)
for (list = gimage->channels; list; list = g_slist_next (list))
{
channel = (Channel *) list->data;
channel_scale (channel, new_width, new_height);
list = g_slist_next (list);
}
/* Don't forget the selection mask! */
......@@ -585,40 +581,34 @@ gimp_image_scale (GimpImage *gimage,
/* Scale all layers */
list = gimage->layers;
while (list)
for (list = gimage->layers; list; list = g_slist_next (list))
{
layer = (Layer *) list->data;
if(FALSE == layer_scale_by_factors(layer, img_scale_w, img_scale_h))
layer = (Layer *) list->data;
if (layer_scale_by_factors (layer, img_scale_w, img_scale_h) == FALSE)
{
/* Since 0 < img_scale_w, img_scale_h, failure due to one or more */
/* vanishing scaled layer dimensions. Implicit delete implemented */
/* here. Upstream warning implemented in resize_check_layer_scaling() */
/* [resize.c line 1295], which offers the user the chance to bail out.*/
marklist = g_list_append(marklist, layer);
remove = g_slist_append (remove, layer);
}
list = g_slist_next (list);
}
/* We defer removing layers lost to scaling until now */
/* so as not to mix the operations of iterating over and removal */
/* from gimage->layers. */
if(marklist != NULL)
for (list = remove; list; list = g_slist_next (list))
{
while(marklist)
{
layer = marklist->data;
gimage_remove_layer(gimage, layer);
marklist = g_slist_remove(marklist, layer);
}
layer = remove->data;
gimage_remove_layer (gimage, layer);
}
g_slist_free (remove);
/* Scale any Guides */
glist = gimage->guides;
while (glist)
for (glist = gimage->guides; glist; glist = g_list_next (glist))
{
guide = (Guide*) glist->data;
glist = g_list_next (glist);
switch (guide->orientation)
{
......
......@@ -532,18 +532,16 @@ gimp_image_scale (GimpImage *gimage,
Layer *layer;
Layer *floating_layer;
GSList *list;
GSList *marklist = NULL;
GSList *remove = NULL;
GList *glist;
Guide *guide;
gint old_width, old_height;
gint old_offset_x, old_offset_y;
gint layer_width, layer_height;
gdouble img_scale_w = 1.0;
gdouble img_scale_h = 1.0;
if((new_width == 0) || (new_height == 0))
if ((new_width == 0) || (new_height == 0))
{
g_message(_("gimp_image_scale: Layer with zero width or height has been rejected."));
g_message (("gimp_image_scale: Scaling to zero width or height has been rejected."));
return;
}
......@@ -567,16 +565,14 @@ gimp_image_scale (GimpImage *gimage,
old_height = gimage->height;
gimage->width = new_width;
gimage->height = new_height;
img_scale_w = (gdouble)new_width/(gdouble)old_width;
img_scale_h = (gdouble)new_height/(gdouble)old_height;
img_scale_w = (gdouble)new_width / (gdouble)old_width;
img_scale_h = (gdouble)new_height / (gdouble)old_height;
/* Scale all channels */
list = gimage->channels;
while (list)
for (list = gimage->channels; list; list = g_slist_next (list))
{
channel = (Channel *) list->data;
channel_scale (channel, new_width, new_height);
list = g_slist_next (list);
}
/* Don't forget the selection mask! */
......@@ -585,40 +581,34 @@ gimp_image_scale (GimpImage *gimage,
/* Scale all layers */
list = gimage->layers;
while (list)
for (list = gimage->layers; list; list = g_slist_next (list))
{
layer = (Layer *) list->data;
if(FALSE == layer_scale_by_factors(layer, img_scale_w, img_scale_h))
layer = (Layer *) list->data;
if (layer_scale_by_factors (layer, img_scale_w, img_scale_h) == FALSE)
{
/* Since 0 < img_scale_w, img_scale_h, failure due to one or more */
/* vanishing scaled layer dimensions. Implicit delete implemented */
/* here. Upstream warning implemented in resize_check_layer_scaling() */
/* [resize.c line 1295], which offers the user the chance to bail out.*/
marklist = g_list_append(marklist, layer);
remove = g_slist_append (remove, layer);
}
list = g_slist_next (list);
}
/* We defer removing layers lost to scaling until now */
/* so as not to mix the operations of iterating over and removal */
/* from gimage->layers. */
if(marklist != NULL)
for (list = remove; list; list = g_slist_next (list))
{
while(marklist)
{
layer = marklist->data;
gimage_remove_layer(gimage, layer);
marklist = g_slist_remove(marklist, layer);
}
layer = remove->data;
gimage_remove_layer (gimage, layer);
}
g_slist_free (remove);
/* Scale any Guides */
glist = gimage->guides;
while (glist)
for (glist = gimage->guides; glist; glist = g_list_next (glist))
{
guide = (Guide*) glist->data;
glist = g_list_next (glist);
switch (guide->orientation)
{
......
......@@ -532,18 +532,16 @@ gimp_image_scale (GimpImage *gimage,
Layer *layer;
Layer *floating_layer;
GSList *list;
GSList *marklist = NULL;
GSList *remove = NULL;
GList *glist;
Guide *guide;
gint old_width, old_height;
gint old_offset_x, old_offset_y;
gint layer_width, layer_height;
gdouble img_scale_w = 1.0;
gdouble img_scale_h = 1.0;
if((new_width == 0) || (new_height == 0))
if ((new_width == 0) || (new_height == 0))
{
g_message(_("gimp_image_scale: Layer with zero width or height has been rejected."));
g_message (("gimp_image_scale: Scaling to zero width or height has been rejected."));
return;
}
......@@ -567,16 +565,14 @@ gimp_image_scale (GimpImage *gimage,
old_height = gimage->height;
gimage->width = new_width;
gimage->height = new_height;
img_scale_w = (gdouble)new_width/(gdouble)old_width;
img_scale_h = (gdouble)new_height/(gdouble)old_height;
img_scale_w = (gdouble)new_width / (gdouble)old_width;
img_scale_h = (gdouble)new_height / (gdouble)old_height;
/* Scale all channels */
list = gimage->channels;
while (list)
for (list = gimage->channels; list; list = g_slist_next (list))
{
channel = (Channel *) list->data;
channel_scale (channel, new_width, new_height);
list = g_slist_next (list);
}
/* Don't forget the selection mask! */
......@@ -585,40 +581,34 @@ gimp_image_scale (GimpImage *gimage,
/* Scale all layers */
list = gimage->layers;
while (list)
for (list = gimage->layers; list; list = g_slist_next (list))
{
layer = (Layer *) list->data;
if(FALSE == layer_scale_by_factors(layer, img_scale_w, img_scale_h))
layer = (Layer *) list->data;
if (layer_scale_by_factors (layer, img_scale_w, img_scale_h) == FALSE)
{
/* Since 0 < img_scale_w, img_scale_h, failure due to one or more */
/* vanishing scaled layer dimensions. Implicit delete implemented */
/* here. Upstream warning implemented in resize_check_layer_scaling() */
/* [resize.c line 1295], which offers the user the chance to bail out.*/
marklist = g_list_append(marklist, layer);
remove = g_slist_append (remove, layer);
}
list = g_slist_next (list);
}
/* We defer removing layers lost to scaling until now */
/* so as not to mix the operations of iterating over and removal */
/* from gimage->layers. */
if(marklist != NULL)
for (list = remove; list; list = g_slist_next (list))
{
while(marklist)
{
layer = marklist->data;
gimage_remove_layer(gimage, layer);
marklist = g_slist_remove(marklist, layer);
}
layer = remove->data;
gimage_remove_layer (gimage, layer);
}
g_slist_free (remove);
/* Scale any Guides */
glist = gimage->guides;
while (glist)
for (glist = gimage->guides; glist; glist = g_list_next (glist))
{
guide = (Guide*) glist->data;
glist = g_list_next (glist);
switch (guide->orientation)
{
......
......@@ -532,18 +532,16 @@ gimp_image_scale (GimpImage *gimage,
Layer *layer;
Layer *floating_layer;
GSList *list;
GSList *marklist = NULL;
GSList *remove = NULL;
GList *glist;
Guide *guide;
gint old_width, old_height;
gint old_offset_x, old_offset_y;
gint layer_width, layer_height;
gdouble img_scale_w = 1.0;
gdouble img_scale_h = 1.0;
if((new_width == 0) || (new_height == 0))
if ((new_width == 0) || (new_height == 0))
{
g_message(_("gimp_image_scale: Layer with zero width or height has been rejected."));
g_message (("gimp_image_scale: Scaling to zero width or height has been rejected."));
return;
}
......@@ -567,16 +565,14 @@ gimp_image_scale (GimpImage *gimage,
old_height = gimage->height;
gimage->width = new_width;
gimage->height = new_height;
img_scale_w = (gdouble)new_width/(gdouble)old_width;
img_scale_h = (gdouble)new_height/(gdouble)old_height;
img_scale_w = (gdouble)new_width / (gdouble)old_width;
img_scale_h = (gdouble)new_height / (gdouble)old_height;
/* Scale all channels */
list = gimage->channels;
while (list)
for (list = gimage->channels; list; list = g_slist_next (list))
{
channel = (Channel *) list->data;
channel_scale (channel, new_width, new_height);
list = g_slist_next (list);
}
/* Don't forget the selection mask! */
......@@ -585,40 +581,34 @@ gimp_image_scale (GimpImage *gimage,
/* Scale all layers */
list = gimage->layers;
while (list)
for (list = gimage->layers; list; list = g_slist_next (list))
{
layer = (Layer *) list->data;
if(FALSE == layer_scale_by_factors(layer, img_scale_w, img_scale_h))
layer = (Layer *) list->data;
if (layer_scale_by_factors (layer, img_scale_w, img_scale_h) == FALSE)
{
/* Since 0 < img_scale_w, img_scale_h, failure due to one or more */
/* vanishing scaled layer dimensions. Implicit delete implemented */
/* here. Upstream warning implemented in resize_check_layer_scaling() */
/* [resize.c line 1295], which offers the user the chance to bail out.*/
marklist = g_list_append(marklist, layer);
remove = g_slist_append (remove, layer);
}
list = g_slist_next (list);
}
/* We defer removing layers lost to scaling until now */
/* so as not to mix the operations of iterating over and removal */
/* from gimage->layers. */
if(marklist != NULL)
for (list = remove; list; list = g_slist_next (list))
{
while(marklist)
{
layer = marklist->data;
gimage_remove_layer(gimage, layer);
marklist = g_slist_remove(marklist, layer);
}
layer = remove->data;
gimage_remove_layer (gimage, layer);
}
g_slist_free (remove);
/* Scale any Guides */
glist = gimage->guides;
while (glist)
for (glist = gimage->guides; glist; glist = g_list_next (glist))
{
guide = (Guide*) glist->data;
glist = g_list_next (glist);
switch (guide->orientation)
{
......
......@@ -532,18 +532,16 @@ gimp_image_scale (GimpImage *gimage,
Layer *layer;
Layer *floating_layer;
GSList *list;
GSList *marklist = NULL;
GSList *remove = NULL;
GList *glist;
Guide *guide;
gint old_width, old_height;
gint old_offset_x, old_offset_y;
gint layer_width, layer_height;
gdouble img_scale_w = 1.0;
gdouble img_scale_h = 1.0;
if((new_width == 0) || (new_height == 0))
if ((new_width == 0) || (new_height == 0))
{
g_message(_("gimp_image_scale: Layer with zero width or height has been rejected."));
g_message (("gimp_image_scale: Scaling to zero width or height has been rejected."));
return;
}
......@@ -567,16 +565,14 @@ gimp_image_scale (GimpImage *gimage,
old_height = gimage->height;
gimage->width = new_width;
gimage->height = new_height;
img_scale_w = (gdouble)new_width/(gdouble)old_width;
img_scale_h = (gdouble)new_height/(gdouble)old_height;
img_scale_w = (gdouble)new_width / (gdouble)old_width;
img_scale_h = (gdouble)new_height / (gdouble)old_height;
/* Scale all channels */
list = gimage->channels;
while (list)
for (list = gimage->channels; list; list = g_slist_next (list))
{
channel = (Channel *) list->data;
channel_scale (channel, new_width, new_height);
list = g_slist_next (list);
}
/* Don't forget the selection mask! */
......@@ -585,40 +581,34 @@ gimp_image_scale (GimpImage *gimage,
/* Scale all layers */
list = gimage->layers;
while (list)
for (list = gimage->layers; list; list = g_slist_next (list))
{
layer = (Layer *) list->data;
if(FALSE == layer_scale_by_factors(layer, img_scale_w, img_scale_h))
layer = (Layer *) list->data;
if (layer_scale_by_factors (layer, img_scale_w, img_scale_h) == FALSE)
{
/* Since 0 < img_scale_w, img_scale_h, failure due to one or more */
/* vanishing scaled layer dimensions. Implicit delete implemented */
/* here. Upstream warning implemented in resize_check_layer_scaling() */
/* [resize.c line 1295], which offers the user the chance to bail out.*/
marklist = g_list_append(marklist, layer);
remove = g_slist_append (remove, layer);
}
list = g_slist_next (list);
}
/* We defer removing layers lost to scaling until now */
/* so as not to mix the operations of iterating over and removal */
/* from gimage->layers. */
if(marklist != NULL)
for (list = remove; list; list = g_slist_next (list))
{
while(marklist)
{
layer = marklist->data;
gimage_remove_layer(gimage, layer);
marklist = g_slist_remove(marklist, layer);
}
layer = remove->data;
gimage_remove_layer (gimage, layer);
}
g_slist_free (remove);
/* Scale any Guides */
glist = gimage->guides;
while (glist)
for (glist = gimage->guides; glist; glist = g_list_next (glist))
{
guide = (Guide*) glist->data;
glist = g_list_next (glist);
switch (guide->orientation)
{
......
......@@ -532,18 +532,16 @@ gimp_image_scale (GimpImage *gimage,
Layer *layer;
Layer *floating_layer;
GSList *list;
GSList *marklist = NULL;
GSList *remove = NULL;
GList *glist;
Guide *guide;
gint old_width, old_height;
gint old_offset_x, old_offset_y;
gint layer_width, layer_height;
gdouble img_scale_w = 1.0;
gdouble img_scale_h = 1.0;
if((new_width == 0) || (new_height == 0))
if ((new_width == 0) || (new_height == 0))
{
g_message(_("gimp_image_scale: Layer with zero width or height has been rejected."));
g_message (("gimp_image_scale: Scaling to zero width or height has been rejected."));
return;
}
......@@ -567,16 +565,14 @@ gimp_image_scale (GimpImage *gimage,
old_height = gimage->height;
gimage->width = new_width;
gimage->height = new_height;
img_scale_w = (gdouble)new_width/(gdouble)old_width;
img_scale_h = (gdouble)new_height/(gdouble)old_height;
img_scale_w = (gdouble)new_width / (gdouble)old_width;
img_scale_h = (gdouble)new_height / (gdouble)old_height;
/* Scale all channels */
list = gimage->channels;
while (list)
for (list = gimage->channels; list; list = g_slist_next (list))
{
channel = (Channel *) list->data;
channel_scale (channel, new_width, new_height);
list = g_slist_next (list);
}
/* Don't forget the selection mask! */
......@@ -585,40 +581,34 @@ gimp_image_scale (GimpImage *gimage,
/* Scale all layers */
list = gimage->layers;
while (list)
for (list = gimage->layers; list; list = g_slist_next (list))
{
layer = (Layer *) list->data;
if(FALSE == layer_scale_by_factors(layer, img_scale_w, img_scale_h))
layer = (Layer *) list->data;
if (layer_scale_by_factors (layer, img_scale_w, img_scale_h) == FALSE)
{
/* Since 0 < img_scale_w, img_scale_h, failure due to one or more */
/* vanishing scaled layer dimensions. Implicit delete implemented */
/* here. Upstream warning implemented in resize_check_layer_scaling() */
/* [resize.c line 1295], which offers the user the chance to bail out.*/
marklist = g_list_append(marklist, layer);
remove = g_slist_append (remove, layer);
}
list = g_slist_next (list);
}
/* We defer removing layers lost to scaling until now */
/* so as not to mix the operations of iterating over and removal */
/* from gimage->layers. */
if(marklist != NULL)
for (list = remove; list; list = g_slist_next (list))
{
while(marklist)
{
layer = marklist->data;
gimage_remove_layer(gimage, layer);
marklist = g_slist_remove(marklist, layer);
}
layer = remove->data;
gimage_remove_layer (gimage, layer);
}
g_slist_free (remove);
/* Scale any Guides */
glist = gimage->guides;
while (glist)
for (glist = gimage->guides; glist; glist = g_list_next (glist))
{
guide = (Guide*) glist->data;
glist = g_list_next (glist);
switch (guide->orientation)
{
......
......@@ -346,7 +346,7 @@ layer_copy (Layer *layer,
new_type, layer_name, layer->opacity, layer->mode);
if (!new_layer)
{
g_message (_("layer_copy: could not allocate new layer"));
g_message ("layer_copy: could not allocate new layer");
goto cleanup;
}
......@@ -421,7 +421,7 @@ layer_new_from_tiles (GimpImage *gimage,
if (!new_layer)
{
g_message (_("layer_new_from_tiles: could not allocate new layer"));
g_message ("layer_new_from_tiles: could not allocate new layer");
return NULL;
}
......@@ -628,7 +628,8 @@ layer_translate_lowlevel (Layer *layer,
}
/* update the affected region */
drawable_update (GIMP_DRAWABLE(layer), 0, 0, GIMP_DRAWABLE(layer)->width, GIMP_DRAWABLE(layer)->height);
drawable_update (GIMP_DRAWABLE(layer), 0, 0,
GIMP_DRAWABLE(layer)->width, GIMP_DRAWABLE(layer)->height);
if (!temporary)
{
......@@ -739,7 +740,8 @@ layer_scale_lowlevel(Layer *layer,
GIMP_DRAWABLE(layer)->width, GIMP_DRAWABLE(layer)->height);
/* Configure the pixel regions */
pixel_region_init (&srcPR, GIMP_DRAWABLE(layer)->tiles, 0, 0,