Commit 5b205f17 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

make the file_save dialog sensitive again if the user clicked "No" when

2000-08-23  Sven Neumann  <sven@gimp.org>

	* app/fileops.c: make the file_save dialog sensitive again if the
	user clicked "No" when asked if he wishes to overwrite a file.

	* app/gimpimage.c: when saving an undoable parasite, just do it
	without calling undo_push_cantundo(). Undoable parasites are used
	by many save plug-ins to attach a comment, but this operation
	shouldn't prevent the user from using the undo_stack afterwards.
	The JPEG plug-in has an additional bug that I couldn't solve, so
	undoing after a Save As JPEG is still impossible.

	* app/undo_history.c: lame attempt to draw the clean symbol at the
	correct undo step. Not perfect but much better as before...
parent 722f600e
2000-08-23 Sven Neumann <sven@gimp.org>
* app/fileops.c: make the file_save dialog sensitive again if the
user clicked "No" when asked if he wishes to overwrite a file.
* app/gimpimage.c: when saving an undoable parasite, just do it
without calling undo_push_cantundo(). Undoable parasites are used
by many save plug-ins to attach a comment, but this operation
shouldn't prevent the user from using the undo_stack afterwards.
The JPEG plug-in has an additional bug that I couldn't solve, so
undoing after a Save As JPEG is still impossible.
* app/undo_history.c: lame attempt to draw the clean symbol at the
correct undo step. Not perfect but much better as before...
Wed Aug 23 20:15:21 BST 2000 Adam D. Moss <adam@gimp.org>
 
* plug-ins/common/psd.c: removed some more debugging output. Zzz.
......
......@@ -172,7 +172,7 @@ gimp_image_init (GimpImage *gimage)
gimage->disp_count = 0;
gimage->instance_count = 0;
gimage->shadow = NULL;
gimage->dirty = 1; /* Why is that? I doubt this is correct. --Sven */
gimage->dirty = 1;
gimage->undo_on = TRUE;
gimage->construct_flag = -1;
gimage->tattoo_state = 0;
......@@ -1170,17 +1170,24 @@ void
gimp_image_parasite_attach (GimpImage *gimage,
GimpParasite *parasite)
{
g_return_if_fail (GIMP_IS_IMAGE (gimage));
g_return_if_fail (GIMP_IS_IMAGE (gimage) && parasite != NULL);
/* only set the dirty bit manually if we can be saved and the new
parasite differs from the current one and we aren't undoable */
if (gimp_parasite_is_undoable (parasite))
undo_push_image_parasite (gimage, parasite);
if (gimp_parasite_is_persistent (parasite) &&
!gimp_parasite_compare (parasite,
gimp_image_parasite_find (gimage,
gimp_parasite_name (parasite))))
/* We used to push an cantundo on te stack here. This made the undo stack
unusable (NULL on the stack) and prevented people from undoing after a
save (since most save plug-ins attach an undoable comment parasite).
Now we simply attach the parasite without pushing an undo. That way it's
undoable but does not block the undo system. --Sven
else if (gimp_parasite_is_persistent (parasite) &&
!gimp_parasite_compare (parasite,
gimp_image_parasite_find (gimage,
gimp_parasite_name (parasite))))
undo_push_cantundo (gimage, _("attach parasite to image"));
*/
parasite_list_add (gimage->parasites, parasite);
......@@ -1197,15 +1204,18 @@ gimp_image_parasite_detach (GimpImage *gimage,
{
GimpParasite *p;
g_return_if_fail (GIMP_IS_IMAGE (gimage));
g_return_if_fail (GIMP_IS_IMAGE (gimage) && parasite != NULL);
if (!(p = parasite_list_find (gimage->parasites, parasite)))
return;
if (gimp_parasite_is_undoable (p))
undo_push_image_parasite_remove (gimage, gimp_parasite_name (p));
/* see comment in function gimp_image_parasite_attach()
else if (gimp_parasite_is_persistent (p))
undo_push_cantundo (gimage, _("detach parasite from image"));
*/
parasite_list_remove (gimage->parasites, parasite);
}
......@@ -3447,6 +3457,8 @@ gimp_image_undo_freeze (GimpImage *gimage)
gboolean
gimp_image_undo_thaw (GimpImage *gimage)
{
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), FALSE);
gimage->undo_on = TRUE;
return TRUE;
......
......@@ -172,7 +172,7 @@ gimp_image_init (GimpImage *gimage)
gimage->disp_count = 0;
gimage->instance_count = 0;
gimage->shadow = NULL;
gimage->dirty = 1; /* Why is that? I doubt this is correct. --Sven */
gimage->dirty = 1;
gimage->undo_on = TRUE;
gimage->construct_flag = -1;
gimage->tattoo_state = 0;
......@@ -1170,17 +1170,24 @@ void
gimp_image_parasite_attach (GimpImage *gimage,
GimpParasite *parasite)
{
g_return_if_fail (GIMP_IS_IMAGE (gimage));
g_return_if_fail (GIMP_IS_IMAGE (gimage) && parasite != NULL);
/* only set the dirty bit manually if we can be saved and the new
parasite differs from the current one and we aren't undoable */
if (gimp_parasite_is_undoable (parasite))
undo_push_image_parasite (gimage, parasite);
if (gimp_parasite_is_persistent (parasite) &&
!gimp_parasite_compare (parasite,
gimp_image_parasite_find (gimage,
gimp_parasite_name (parasite))))
/* We used to push an cantundo on te stack here. This made the undo stack
unusable (NULL on the stack) and prevented people from undoing after a
save (since most save plug-ins attach an undoable comment parasite).
Now we simply attach the parasite without pushing an undo. That way it's
undoable but does not block the undo system. --Sven
else if (gimp_parasite_is_persistent (parasite) &&
!gimp_parasite_compare (parasite,
gimp_image_parasite_find (gimage,
gimp_parasite_name (parasite))))
undo_push_cantundo (gimage, _("attach parasite to image"));
*/
parasite_list_add (gimage->parasites, parasite);
......@@ -1197,15 +1204,18 @@ gimp_image_parasite_detach (GimpImage *gimage,
{
GimpParasite *p;
g_return_if_fail (GIMP_IS_IMAGE (gimage));
g_return_if_fail (GIMP_IS_IMAGE (gimage) && parasite != NULL);
if (!(p = parasite_list_find (gimage->parasites, parasite)))
return;
if (gimp_parasite_is_undoable (p))
undo_push_image_parasite_remove (gimage, gimp_parasite_name (p));
/* see comment in function gimp_image_parasite_attach()
else if (gimp_parasite_is_persistent (p))
undo_push_cantundo (gimage, _("detach parasite from image"));
*/
parasite_list_remove (gimage->parasites, parasite);
}
......@@ -3447,6 +3457,8 @@ gimp_image_undo_freeze (GimpImage *gimage)
gboolean
gimp_image_undo_thaw (GimpImage *gimage)
{
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), FALSE);
gimage->undo_on = TRUE;
return TRUE;
......
......@@ -172,7 +172,7 @@ gimp_image_init (GimpImage *gimage)
gimage->disp_count = 0;
gimage->instance_count = 0;
gimage->shadow = NULL;
gimage->dirty = 1; /* Why is that? I doubt this is correct. --Sven */
gimage->dirty = 1;
gimage->undo_on = TRUE;
gimage->construct_flag = -1;
gimage->tattoo_state = 0;
......@@ -1170,17 +1170,24 @@ void
gimp_image_parasite_attach (GimpImage *gimage,
GimpParasite *parasite)
{
g_return_if_fail (GIMP_IS_IMAGE (gimage));
g_return_if_fail (GIMP_IS_IMAGE (gimage) && parasite != NULL);
/* only set the dirty bit manually if we can be saved and the new
parasite differs from the current one and we aren't undoable */
if (gimp_parasite_is_undoable (parasite))
undo_push_image_parasite (gimage, parasite);
if (gimp_parasite_is_persistent (parasite) &&
!gimp_parasite_compare (parasite,
gimp_image_parasite_find (gimage,
gimp_parasite_name (parasite))))
/* We used to push an cantundo on te stack here. This made the undo stack
unusable (NULL on the stack) and prevented people from undoing after a
save (since most save plug-ins attach an undoable comment parasite).
Now we simply attach the parasite without pushing an undo. That way it's
undoable but does not block the undo system. --Sven
else if (gimp_parasite_is_persistent (parasite) &&
!gimp_parasite_compare (parasite,
gimp_image_parasite_find (gimage,
gimp_parasite_name (parasite))))
undo_push_cantundo (gimage, _("attach parasite to image"));
*/
parasite_list_add (gimage->parasites, parasite);
......@@ -1197,15 +1204,18 @@ gimp_image_parasite_detach (GimpImage *gimage,
{
GimpParasite *p;
g_return_if_fail (GIMP_IS_IMAGE (gimage));
g_return_if_fail (GIMP_IS_IMAGE (gimage) && parasite != NULL);
if (!(p = parasite_list_find (gimage->parasites, parasite)))
return;
if (gimp_parasite_is_undoable (p))
undo_push_image_parasite_remove (gimage, gimp_parasite_name (p));
/* see comment in function gimp_image_parasite_attach()
else if (gimp_parasite_is_persistent (p))
undo_push_cantundo (gimage, _("detach parasite from image"));
*/
parasite_list_remove (gimage->parasites, parasite);
}
......@@ -3447,6 +3457,8 @@ gimp_image_undo_freeze (GimpImage *gimage)
gboolean
gimp_image_undo_thaw (GimpImage *gimage)
{
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), FALSE);
gimage->undo_on = TRUE;
return TRUE;
......
......@@ -172,7 +172,7 @@ gimp_image_init (GimpImage *gimage)
gimage->disp_count = 0;
gimage->instance_count = 0;
gimage->shadow = NULL;
gimage->dirty = 1; /* Why is that? I doubt this is correct. --Sven */
gimage->dirty = 1;
gimage->undo_on = TRUE;
gimage->construct_flag = -1;
gimage->tattoo_state = 0;
......@@ -1170,17 +1170,24 @@ void
gimp_image_parasite_attach (GimpImage *gimage,
GimpParasite *parasite)
{
g_return_if_fail (GIMP_IS_IMAGE (gimage));
g_return_if_fail (GIMP_IS_IMAGE (gimage) && parasite != NULL);
/* only set the dirty bit manually if we can be saved and the new
parasite differs from the current one and we aren't undoable */
if (gimp_parasite_is_undoable (parasite))
undo_push_image_parasite (gimage, parasite);
if (gimp_parasite_is_persistent (parasite) &&
!gimp_parasite_compare (parasite,
gimp_image_parasite_find (gimage,
gimp_parasite_name (parasite))))
/* We used to push an cantundo on te stack here. This made the undo stack
unusable (NULL on the stack) and prevented people from undoing after a
save (since most save plug-ins attach an undoable comment parasite).
Now we simply attach the parasite without pushing an undo. That way it's
undoable but does not block the undo system. --Sven
else if (gimp_parasite_is_persistent (parasite) &&
!gimp_parasite_compare (parasite,
gimp_image_parasite_find (gimage,
gimp_parasite_name (parasite))))
undo_push_cantundo (gimage, _("attach parasite to image"));
*/
parasite_list_add (gimage->parasites, parasite);
......@@ -1197,15 +1204,18 @@ gimp_image_parasite_detach (GimpImage *gimage,
{
GimpParasite *p;
g_return_if_fail (GIMP_IS_IMAGE (gimage));
g_return_if_fail (GIMP_IS_IMAGE (gimage) && parasite != NULL);
if (!(p = parasite_list_find (gimage->parasites, parasite)))
return;
if (gimp_parasite_is_undoable (p))
undo_push_image_parasite_remove (gimage, gimp_parasite_name (p));
/* see comment in function gimp_image_parasite_attach()
else if (gimp_parasite_is_persistent (p))
undo_push_cantundo (gimage, _("detach parasite from image"));
*/
parasite_list_remove (gimage->parasites, parasite);
}
......@@ -3447,6 +3457,8 @@ gimp_image_undo_freeze (GimpImage *gimage)
gboolean
gimp_image_undo_thaw (GimpImage *gimage)
{
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), FALSE);
gimage->undo_on = TRUE;
return TRUE;
......
......@@ -172,7 +172,7 @@ gimp_image_init (GimpImage *gimage)
gimage->disp_count = 0;
gimage->instance_count = 0;
gimage->shadow = NULL;
gimage->dirty = 1; /* Why is that? I doubt this is correct. --Sven */
gimage->dirty = 1;
gimage->undo_on = TRUE;
gimage->construct_flag = -1;
gimage->tattoo_state = 0;
......@@ -1170,17 +1170,24 @@ void
gimp_image_parasite_attach (GimpImage *gimage,
GimpParasite *parasite)
{
g_return_if_fail (GIMP_IS_IMAGE (gimage));
g_return_if_fail (GIMP_IS_IMAGE (gimage) && parasite != NULL);
/* only set the dirty bit manually if we can be saved and the new
parasite differs from the current one and we aren't undoable */
if (gimp_parasite_is_undoable (parasite))
undo_push_image_parasite (gimage, parasite);
if (gimp_parasite_is_persistent (parasite) &&
!gimp_parasite_compare (parasite,
gimp_image_parasite_find (gimage,
gimp_parasite_name (parasite))))
/* We used to push an cantundo on te stack here. This made the undo stack
unusable (NULL on the stack) and prevented people from undoing after a
save (since most save plug-ins attach an undoable comment parasite).
Now we simply attach the parasite without pushing an undo. That way it's
undoable but does not block the undo system. --Sven
else if (gimp_parasite_is_persistent (parasite) &&
!gimp_parasite_compare (parasite,
gimp_image_parasite_find (gimage,
gimp_parasite_name (parasite))))
undo_push_cantundo (gimage, _("attach parasite to image"));
*/
parasite_list_add (gimage->parasites, parasite);
......@@ -1197,15 +1204,18 @@ gimp_image_parasite_detach (GimpImage *gimage,
{
GimpParasite *p;
g_return_if_fail (GIMP_IS_IMAGE (gimage));
g_return_if_fail (GIMP_IS_IMAGE (gimage) && parasite != NULL);
if (!(p = parasite_list_find (gimage->parasites, parasite)))
return;
if (gimp_parasite_is_undoable (p))
undo_push_image_parasite_remove (gimage, gimp_parasite_name (p));
/* see comment in function gimp_image_parasite_attach()
else if (gimp_parasite_is_persistent (p))
undo_push_cantundo (gimage, _("detach parasite from image"));
*/
parasite_list_remove (gimage->parasites, parasite);
}
......@@ -3447,6 +3457,8 @@ gimp_image_undo_freeze (GimpImage *gimage)
gboolean
gimp_image_undo_thaw (GimpImage *gimage)
{
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), FALSE);
gimage->undo_on = TRUE;
return TRUE;
......
......@@ -172,7 +172,7 @@ gimp_image_init (GimpImage *gimage)
gimage->disp_count = 0;
gimage->instance_count = 0;
gimage->shadow = NULL;
gimage->dirty = 1; /* Why is that? I doubt this is correct. --Sven */
gimage->dirty = 1;
gimage->undo_on = TRUE;
gimage->construct_flag = -1;
gimage->tattoo_state = 0;
......@@ -1170,17 +1170,24 @@ void
gimp_image_parasite_attach (GimpImage *gimage,
GimpParasite *parasite)
{
g_return_if_fail (GIMP_IS_IMAGE (gimage));
g_return_if_fail (GIMP_IS_IMAGE (gimage) && parasite != NULL);
/* only set the dirty bit manually if we can be saved and the new
parasite differs from the current one and we aren't undoable */
if (gimp_parasite_is_undoable (parasite))
undo_push_image_parasite (gimage, parasite);
if (gimp_parasite_is_persistent (parasite) &&
!gimp_parasite_compare (parasite,
gimp_image_parasite_find (gimage,
gimp_parasite_name (parasite))))
/* We used to push an cantundo on te stack here. This made the undo stack
unusable (NULL on the stack) and prevented people from undoing after a
save (since most save plug-ins attach an undoable comment parasite).
Now we simply attach the parasite without pushing an undo. That way it's
undoable but does not block the undo system. --Sven
else if (gimp_parasite_is_persistent (parasite) &&
!gimp_parasite_compare (parasite,
gimp_image_parasite_find (gimage,
gimp_parasite_name (parasite))))
undo_push_cantundo (gimage, _("attach parasite to image"));
*/
parasite_list_add (gimage->parasites, parasite);
......@@ -1197,15 +1204,18 @@ gimp_image_parasite_detach (GimpImage *gimage,
{
GimpParasite *p;
g_return_if_fail (GIMP_IS_IMAGE (gimage));
g_return_if_fail (GIMP_IS_IMAGE (gimage) && parasite != NULL);
if (!(p = parasite_list_find (gimage->parasites, parasite)))
return;
if (gimp_parasite_is_undoable (p))
undo_push_image_parasite_remove (gimage, gimp_parasite_name (p));
/* see comment in function gimp_image_parasite_attach()
else if (gimp_parasite_is_persistent (p))
undo_push_cantundo (gimage, _("detach parasite from image"));
*/
parasite_list_remove (gimage->parasites, parasite);
}
......@@ -3447,6 +3457,8 @@ gimp_image_undo_freeze (GimpImage *gimage)
gboolean
gimp_image_undo_thaw (GimpImage *gimage)
{
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), FALSE);
gimage->undo_on = TRUE;
return TRUE;
......
......@@ -172,7 +172,7 @@ gimp_image_init (GimpImage *gimage)
gimage->disp_count = 0;
gimage->instance_count = 0;
gimage->shadow = NULL;
gimage->dirty = 1; /* Why is that? I doubt this is correct. --Sven */
gimage->dirty = 1;
gimage->undo_on = TRUE;
gimage->construct_flag = -1;
gimage->tattoo_state = 0;
......@@ -1170,17 +1170,24 @@ void
gimp_image_parasite_attach (GimpImage *gimage,
GimpParasite *parasite)
{
g_return_if_fail (GIMP_IS_IMAGE (gimage));
g_return_if_fail (GIMP_IS_IMAGE (gimage) && parasite != NULL);
/* only set the dirty bit manually if we can be saved and the new
parasite differs from the current one and we aren't undoable */
if (gimp_parasite_is_undoable (parasite))
undo_push_image_parasite (gimage, parasite);
if (gimp_parasite_is_persistent (parasite) &&
!gimp_parasite_compare (parasite,
gimp_image_parasite_find (gimage,
gimp_parasite_name (parasite))))
/* We used to push an cantundo on te stack here. This made the undo stack
unusable (NULL on the stack) and prevented people from undoing after a
save (since most save plug-ins attach an undoable comment parasite).
Now we simply attach the parasite without pushing an undo. That way it's
undoable but does not block the undo system. --Sven
else if (gimp_parasite_is_persistent (parasite) &&
!gimp_parasite_compare (parasite,
gimp_image_parasite_find (gimage,
gimp_parasite_name (parasite))))
undo_push_cantundo (gimage, _("attach parasite to image"));
*/
parasite_list_add (gimage->parasites, parasite);
......@@ -1197,15 +1204,18 @@ gimp_image_parasite_detach (GimpImage *gimage,
{
GimpParasite *p;
g_return_if_fail (GIMP_IS_IMAGE (gimage));
g_return_if_fail (GIMP_IS_IMAGE (gimage) && parasite != NULL);
if (!(p = parasite_list_find (gimage->parasites, parasite)))
return;
if (gimp_parasite_is_undoable (p))
undo_push_image_parasite_remove (gimage, gimp_parasite_name (p));
/* see comment in function gimp_image_parasite_attach()
else if (gimp_parasite_is_persistent (p))
undo_push_cantundo (gimage, _("detach parasite from image"));
*/
parasite_list_remove (gimage->parasites, parasite);
}
......@@ -3447,6 +3457,8 @@ gimp_image_undo_freeze (GimpImage *gimage)
gboolean
gimp_image_undo_thaw (GimpImage *gimage)
{
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), FALSE);
gimage->undo_on = TRUE;
return TRUE;
......
......@@ -1753,6 +1753,8 @@ file_save_ok_callback (GtkWidget *widget,
gtk_widget_set_sensitive (GTK_WIDGET (fs), FALSE);
file_save_with_proc (the_gimage, filename, raw_filename, save_file_proc);
gtk_widget_set_sensitive (GTK_WIDGET (fs), TRUE);
}
}
......@@ -1831,6 +1833,9 @@ file_overwrite_callback (GtkWidget *widget,
save_file_proc);
}
/* always make file save dialog sensitive */
gtk_widget_set_sensitive (GTK_WIDGET (filesave), TRUE);
g_free (overwrite_data->full_filename);
g_free (overwrite_data->raw_filename);
g_free (overwrite_data);
......
......@@ -172,7 +172,7 @@ gimp_image_init (GimpImage *gimage)
gimage->disp_count = 0;
gimage->instance_count = 0;
gimage->shadow = NULL;
gimage->dirty = 1; /* Why is that? I doubt this is correct. --Sven */
gimage->dirty = 1;
gimage->undo_on = TRUE;
gimage->construct_flag = -1;
gimage->tattoo_state = 0;
......@@ -1170,17 +1170,24 @@ void
gimp_image_parasite_attach (GimpImage *gimage,
GimpParasite *parasite)
{
g_return_if_fail (GIMP_IS_IMAGE (gimage));
g_return_if_fail (GIMP_IS_IMAGE (gimage) && parasite != NULL);
/* only set the dirty bit manually if we can be saved and the new
parasite differs from the current one and we aren't undoable */
if (gimp_parasite_is_undoable (parasite))
undo_push_image_parasite (gimage, parasite);
if (gimp_parasite_is_persistent (parasite) &&
!gimp_parasite_compare (parasite,
gimp_image_parasite_find (gimage,
gimp_parasite_name (parasite))))
/* We used to push an cantundo on te stack here. This made the undo stack
unusable (NULL on the stack) and prevented people from undoing after a
save (since most save plug-ins attach an undoable comment parasite).
Now we simply attach the parasite without pushing an undo. That way it's
undoable but does not block the undo system. --Sven
else if (gimp_parasite_is_persistent (parasite) &&
!gimp_parasite_compare (parasite,
gimp_image_parasite_find (gimage,
gimp_parasite_name (parasite))))
undo_push_cantundo (gimage, _("attach parasite to image"));
*/
parasite_list_add (gimage->parasites, parasite);
......@@ -1197,15 +1204,18 @@ gimp_image_parasite_detach (GimpImage *gimage,
{
GimpParasite *p;
g_return_if_fail (GIMP_IS_IMAGE (gimage));
g_return_if_fail (GIMP_IS_IMAGE (gimage) && parasite != NULL);
if (!(p = parasite_list_find (gimage->parasites, parasite)))
return;
if (gimp_parasite_is_undoable (p))
undo_push_image_parasite_remove (gimage, gimp_parasite_name (p));
/* see comment in function gimp_image_parasite_attach()
else if (gimp_parasite_is_persistent (p))
undo_push_cantundo (gimage, _("detach parasite from image"));
*/
parasite_list_remove (gimage->parasites, parasite);
}
......@@ -3447,6 +3457,8 @@ gimp_image_undo_freeze (GimpImage *gimage)
gboolean
gimp_image_undo_thaw (GimpImage *gimage)
{
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), FALSE);
gimage->undo_on = TRUE;
return TRUE;
......
......@@ -148,16 +148,16 @@ mask_render_preview (GImage *gimage,
Channel * mask;
MaskBuf * scaled_buf = NULL;
PixelRegion srcPR, destPR;
int subsample;
int width, height;
int scale;
gint subsample;
gint width, height;
gint scale;
mask = gimage_get_mask (gimage);
if ((drawable_width (GIMP_DRAWABLE(mask)) > *pwidth) ||
(drawable_height (GIMP_DRAWABLE(mask)) > *pheight))
{
if (((float) drawable_width (GIMP_DRAWABLE (mask)) / (float) *pwidth) >
((float) drawable_height (GIMP_DRAWABLE (mask)) / (float) *pheight))
if (((gfloat) drawable_width (GIMP_DRAWABLE (mask)) / (gfloat) *pwidth) >
((gfloat) drawable_height (GIMP_DRAWABLE (mask)) / (gfloat) *pheight))
{
width = *pwidth;
height = (drawable_height (GIMP_DRAWABLE (mask)) * (*pwidth)) / drawable_width (GIMP_DRAWABLE (mask));
......@@ -367,9 +367,9 @@ undo_history_set_pixmap_idle (gpointer data)
g_free (even);
g_free (odd);
if(buf)
if (buf)
temp_buf_free (buf);
if(mbuf)
if (mbuf)
mask_buf_free (mbuf);
gtk_clist_set_row_data (idle->clist, idle->row, (gpointer)2);
......@@ -495,7 +495,7 @@ undo_history_prepend_special (GtkCList *clist)
/* Recalculate which of the undo and redo buttons are meant to be sensitive */
static void
undo_history_set_sensitive (undo_history_st *st,