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

plugged a mem-leak.

2004-11-03  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpfiledialog.c (gimp_file_dialog_add_filters):
	plugged a mem-leak.

	* app/widgets/gimpviewrendererimagefile.c
	(gimp_view_renderer_imagefile_render): don't leak the pixbuf.

	* app/widgets/gimpviewrenderer-frame.c: added a comment.
parent e2120e2c
2004-11-03 Sven Neumann <sven@gimp.org>
* app/widgets/gimpfiledialog.c (gimp_file_dialog_add_filters):
plugged a mem-leak.
* app/widgets/gimpviewrendererimagefile.c
(gimp_view_renderer_imagefile_render): don't leak the pixbuf here.
* app/widgets/gimpviewrenderer-frame.c: added a comment.
2004-11-03 Michael Natterer <mitch@gimp.org>
* app/paint-funcs/paint-funcs.c (combine_sub_region): applied
......
......@@ -503,13 +503,17 @@ gimp_file_dialog_add_filters (GimpFileDialog *dialog,
if (file_proc->extensions_list)
{
const gchar *domain;
GString *label;
gchar *label;
GString *str;
GSList *ext;
gboolean first = TRUE;
domain = plug_ins_locale_domain (gimp, file_proc->prog, NULL);
label = g_string_new (plug_in_proc_def_get_label (file_proc, domain));
label = plug_in_proc_def_get_label (file_proc, domain);
str = g_string_new (label);
g_free (label);
filter = gtk_file_filter_new ();
......@@ -524,16 +528,16 @@ gimp_file_dialog_add_filters (GimpFileDialog *dialog,
if (first)
{
g_string_append (label, " (*.");
g_string_append (str, " (*.");
first = FALSE;
}
g_string_append (label, extension);
g_string_append (label, ext->next ? ", *." : ")");
g_string_append (str, extension);
g_string_append (str, ext->next ? ", *." : ")");
}
gtk_file_filter_set_name (filter, label->str);
g_string_free (label, TRUE);
gtk_file_filter_set_name (filter, str->str);
g_string_free (str, TRUE);
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
}
......
......@@ -256,6 +256,8 @@ gimp_view_renderer_get_frame_pixbuf (GimpViewRenderer *renderer,
if (!pixbuf)
return NULL;
/* as fallback, render the preview with a 1 pixel wide black border */
x = 1;
y = 1;
w = gdk_pixbuf_get_width (pixbuf);
......
......@@ -118,7 +118,7 @@ gimp_view_renderer_imagefile_render (GimpViewRenderer *renderer,
GtkFilePath *path;
file_system = GIMP_VIEW_RENDERER_IMAGEFILE (renderer)->file_system;
2
path = gtk_file_system_uri_to_path (file_system, uri);
pixbuf = gtk_file_system_render_icon (file_system, path, widget,
......@@ -133,6 +133,7 @@ gimp_view_renderer_imagefile_render (GimpViewRenderer *renderer,
if (pixbuf)
{
gimp_view_renderer_render_pixbuf (renderer, pixbuf);
g_object_unref (pixbuf);
}
else
{
......
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