app/widgets/gtkvwrapbox.c use GSlice to allocate structs.

2007-05-22  Sven Neumann  <sven@gimp.org>

	* app/widgets/gtkvwrapbox.c
	* app/widgets/gtkhwrapbox.c: use GSlice to allocate structs.

svn path=/trunk/; revision=22570
This commit is contained in:
Sven Neumann 2007-05-22 14:57:21 +00:00 committed by Sven Neumann
parent 28329e7976
commit b8fe16c193
3 changed files with 30 additions and 23 deletions

View File

@ -1,3 +1,8 @@
2007-05-22 Sven Neumann <sven@gimp.org>
* app/widgets/gtkvwrapbox.c
* app/widgets/gtkhwrapbox.c: use GSlice to allocate structs.
2007-05-22 Sven Neumann <sven@gimp.org>
* plug-ins/script-fu/script-fu-scripts.c

View File

@ -443,7 +443,7 @@ struct _Line
GSList *children;
guint16 min_size;
guint expand : 1;
Line *next;
Line *next;
};
static void
@ -470,7 +470,7 @@ layout_rows (GtkWrapBox *wbox,
children_per_line = g_slist_length (slist);
while (slist)
{
Line *line = g_new (Line, 1);
Line *line = g_slice_new (Line);
line->children = slist;
line->min_size = min_height;
@ -577,9 +577,10 @@ layout_rows (GtkWrapBox *wbox,
line->expand);
g_slist_free (line->children);
g_free (line);
line = next_line;
}
g_slice_free_chain (Line, line_list, next);
}
}

View File

@ -470,7 +470,7 @@ layout_cols (GtkWrapBox *wbox,
children_per_line = g_slist_length (slist);
while (slist)
{
Line *line = g_new (Line, 1);
Line *line = g_slice_new (Line);
line->children = slist;
line->min_size = min_width;
@ -577,9 +577,10 @@ layout_cols (GtkWrapBox *wbox,
line->expand);
g_slist_free (line->children);
g_free (line);
line = next_line;
}
g_slice_free_chain (Line, line_list, next);
}
}