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:
committed by
Emmanuele Bassi
parent
6642123ce2
commit
22add3e02b
@ -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>
|
Fri Jul 14 16:13:37 2006 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gtk/gtkprogressbar.c: introduced ::xspacing and ::yspacing style
|
* gtk/gtkprogressbar.c: introduced ::xspacing and ::yspacing style
|
||||||
|
|||||||
@ -411,8 +411,15 @@ gtk_recent_chooser_menu_set_current_uri (GtkRecentChooser *chooser,
|
|||||||
if (!info)
|
if (!info)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (0 == strcmp (uri, gtk_recent_info_get_uri (info)))
|
if (strcmp (uri, gtk_recent_info_get_uri (info)) == 0)
|
||||||
found = TRUE;
|
{
|
||||||
|
gtk_menu_shell_activate_item (GTK_MENU_SHELL (menu),
|
||||||
|
menu_item,
|
||||||
|
TRUE);
|
||||||
|
found = TRUE;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
g_list_free (children);
|
g_list_free (children);
|
||||||
@ -423,14 +430,9 @@ gtk_recent_chooser_menu_set_current_uri (GtkRecentChooser *chooser,
|
|||||||
GTK_RECENT_CHOOSER_ERROR_NOT_FOUND,
|
GTK_RECENT_CHOOSER_ERROR_NOT_FOUND,
|
||||||
_("No recently used resource found with URI `%s'"),
|
_("No recently used resource found with URI `%s'"),
|
||||||
uri);
|
uri);
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
gtk_menu_shell_activate_item (GTK_MENU_SHELL (menu), menu_item, TRUE);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return found;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gchar *
|
static gchar *
|
||||||
|
|||||||
Reference in New Issue
Block a user