applied patch from Chris Wilson which replaces a useless loop with

2006-05-29  Michael Natterer  <mitch@imendio.com>

	* gtk/gtktextview.c (gtk_text_view_target_list_notify): applied
	patch from Chris Wilson which replaces a useless loop with
	built-in access to free'd memory by a simple integer comparison.
	Fixes bug #342894.
This commit is contained in:
Michael Natterer 2006-05-29 08:39:00 +00:00 committed by Michael Natterer
parent 249cca433e
commit 3170d5a2a7
3 changed files with 17 additions and 6 deletions

View File

@ -1,3 +1,10 @@
2006-05-29 Michael Natterer <mitch@imendio.com>
* gtk/gtktextview.c (gtk_text_view_target_list_notify): applied
patch from Chris Wilson which replaces a useless loop with
built-in access to free'd memory by a simple integer comparison.
Fixes bug #342894.
2006-05-29 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_move_cursor_up_down): select

View File

@ -1,3 +1,10 @@
2006-05-29 Michael Natterer <mitch@imendio.com>
* gtk/gtktextview.c (gtk_text_view_target_list_notify): applied
patch from Chris Wilson which replaces a useless loop with
built-in access to free'd memory by a simple integer comparison.
Fixes bug #342894.
2006-05-29 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_move_cursor_up_down): select

View File

@ -6883,16 +6883,13 @@ gtk_text_view_target_list_notify (GtkTextBuffer *buffer,
while (list)
{
GtkTargetPair *pair = list->data;
guint info;
list = g_list_next (list); /* get next element before removing */
for (info = GTK_TEXT_BUFFER_TARGET_INFO_BUFFER_CONTENTS;
info >= GTK_TEXT_BUFFER_TARGET_INFO_TEXT;
info--)
if (pair->info >= GTK_TEXT_BUFFER_TARGET_INFO_TEXT &&
pair->info <= GTK_TEXT_BUFFER_TARGET_INFO_BUFFER_CONTENTS)
{
if (pair->info == info)
gtk_target_list_remove (view_list, pair->target);
gtk_target_list_remove (view_list, pair->target);
}
}