Break when an item is found and activated. (#353449, based on a patch by

2006-08-29  Emmanuele Bassi  <ebassi@gnome.org>

	* gtk/gtkrecentchoosermenu.c
	(gtk_recent_chooser_menu_set_current_item): Break when an item
	is found and activated. (#353449, based on a patch by Jan Arne
	Petersen)
This commit is contained in:
Emmanuele Bassi 2006-08-29 18:38:59 +00:00 committed by Emmanuele Bassi
parent 6642123ce2
commit 22add3e02b
2 changed files with 18 additions and 9 deletions

View File

@ -1,3 +1,10 @@
2006-08-29 Emmanuele Bassi <ebassi@gnome.org>
* gtk/gtkrecentchoosermenu.c
(gtk_recent_chooser_menu_set_current_item): Break when an item
is found and activated. (#353449, based on a patch by Jan Arne
Petersen)
Fri Jul 14 16:13:37 2006 Tim Janik <timj@gtk.org>
* gtk/gtkprogressbar.c: introduced ::xspacing and ::yspacing style

View File

@ -411,8 +411,15 @@ gtk_recent_chooser_menu_set_current_uri (GtkRecentChooser *chooser,
if (!info)
continue;
if (0 == strcmp (uri, gtk_recent_info_get_uri (info)))
found = TRUE;
if (strcmp (uri, gtk_recent_info_get_uri (info)) == 0)
{
gtk_menu_shell_activate_item (GTK_MENU_SHELL (menu),
menu_item,
TRUE);
found = TRUE;
break;
}
}
g_list_free (children);
@ -423,14 +430,9 @@ gtk_recent_chooser_menu_set_current_uri (GtkRecentChooser *chooser,
GTK_RECENT_CHOOSER_ERROR_NOT_FOUND,
_("No recently used resource found with URI `%s'"),
uri);
return FALSE;
}
else
{
gtk_menu_shell_activate_item (GTK_MENU_SHELL (menu), menu_item, TRUE);
return TRUE;
}
return found;
}
static gchar *