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

don't g_free() a GdkPixbuf, it's an object. Removed trailing whitespace.

2004-07-05  Sven Neumann  <sven@gimp.org>

	* plug-ins/gfig/gfig-dialog.c: don't g_free() a GdkPixbuf, it's an
	object. Removed trailing whitespace.

	* plug-ins/gfig/gfig-preview.c (draw_background): fixed declaration.
parent 5ce611e0
2004-07-05 Sven Neumann <sven@gimp.org>
* plug-ins/gfig/gfig-dialog.c: don't g_free() a GdkPixbuf, it's an
object. Removed trailing whitespace.
* plug-ins/gfig/gfig-preview.c (draw_background): fixed declaration.
2004-07-05 Michael Natterer <mitch@gimp.org>
* app/tools/gimpcolorizetool.c (gimp_colorize_tool_initialize):
......
......@@ -214,9 +214,6 @@ gfig_dialog (void)
{
GtkWidget *main_hbox;
GtkWidget *vbox;
gint tmpwidth, tmpheight;
gint bpp, rowstride;
guchar *back_data;
GFigObj *gfig;
GimpParasite *parasite;
gint newlayer;
......@@ -234,9 +231,6 @@ gfig_dialog (void)
img_width = gimp_drawable_width (gfig_context->drawable_id);
img_height = gimp_drawable_height (gfig_context->drawable_id);
tmpwidth = preview_width;
tmpheight = preview_height;
/*
* See if there is a "gfig" parasite. If so, this is a gfig layer,
* and we start by clearing it to transparent.
......@@ -278,28 +272,6 @@ gfig_dialog (void)
gfig_drawable = gimp_drawable_get (gfig_context->drawable_id);
/*
* Make a thumbnail of the image to use as a background for the preview.
*/
/* back_data = gimp_image_get_thumbnail_data (gfig_context->image_id, */
/* &tmpwidth, &tmpheight, &bpp); */
/* rowstride = tmpwidth * bpp; */
/* /\* we only handle RGB because GdkPixbuf doesn't do grayscale *\/ */
/* if (bpp == 3) */
/* back_pixbuf = gdk_pixbuf_new_from_data (back_data, GDK_COLORSPACE_RGB, FALSE, */
/* 8, tmpwidth, tmpheight, rowstride, */
/* NULL, NULL); */
/* else if (bpp == 4) */
/* back_pixbuf = gdk_pixbuf_new_from_data (back_data, GDK_COLORSPACE_RGB, TRUE, */
/* 8, tmpwidth, tmpheight, rowstride, */
/* NULL, NULL); */
/* back_pixbuf = gimp_image_get_thumbnail (gfig_context->image_id, */
/* tmpwidth, tmpheight, */
/* GIMP_PIXBUF_LARGE_CHECKS); */
back_pixbuf = NULL;
gfig_stock_init ();
gfig_path = gimp_gimprc_query ("gfig-path");
......@@ -1758,8 +1730,12 @@ gfig_paint_callback (void)
gimp_displays_flush ();
g_free (back_pixbuf);
if (back_pixbuf)
{
g_object_unref (back_pixbuf);
back_pixbuf = NULL;
}
gfig_preview_expose (gfig_context->preview, NULL);
}
......
......@@ -337,7 +337,7 @@ gfig_preview_realize (GtkWidget *widget)
}
static void
draw_background ()
draw_background (void)
{
if (! back_pixbuf)
back_pixbuf = gimp_image_get_thumbnail (gfig_context->image_id,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment