Apply the tip only if we have a displayable name for the item. (#365031,

2006-11-16  Emmanuele Bassi  <ebassi@gnome.org>

	* gtk/gtkrecentchoosermenu.c:
	(gtk_recent_chooser_menu_add_tip): Apply the tip only
	if we have a displayable name for the item. (#365031,
	patch by padraig.obriain(at)sun.com)
This commit is contained in:
Emmanuele Bassi 2006-11-16 10:10:44 +00:00 committed by Emmanuele Bassi
parent cbf6d898fb
commit ade821a03e
2 changed files with 18 additions and 9 deletions

View File

@ -1,3 +1,10 @@
2006-11-16 Emmanuele Bassi <ebassi@gnome.org>
* gtk/gtkrecentchoosermenu.c:
(gtk_recent_chooser_menu_add_tip): Apply the tip only
if we have a displayable name for the item. (#365031,
patch by padraig.obriain(at)sun.com)
2006-11-16 Emmanuele Bassi <ebassi@gnome.org>
* gtk/gtkrecentmanager.c: Provide a fast path returning

View File

@ -847,16 +847,18 @@ gtk_recent_chooser_menu_add_tip (GtkRecentChooserMenu *menu,
return;
path = gtk_recent_info_get_uri_display (info);
tip_text = g_strdup_printf (_("Open '%s'"), path);
gtk_tooltips_set_tip (priv->tooltips,
item,
tip_text,
NULL);
if (path)
{
tip_text = g_strdup_printf (_("Open '%s'"), path);
g_free (path);
g_free (tip_text);
gtk_tooltips_set_tip (priv->tooltips,
item,
tip_text,
NULL);
g_free (path);
g_free (tip_text);
}
}
static GtkWidget *