diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2006-11-16 10:10:44 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@src.gnome.org> | 2006-11-16 10:10:44 +0000 |
commit | ade821a03ee2cf23665a8dd54d1ba9605c416db7 (patch) | |
tree | 25c9da1c85089e569959fa992e1f75af76f723df /gtk/gtkrecentchoosermenu.c | |
parent | cbf6d898fb44589a12d8df49a005291259311d45 (diff) | |
download | gtk+-ade821a03ee2cf23665a8dd54d1ba9605c416db7.tar.gz |
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)
Diffstat (limited to 'gtk/gtkrecentchoosermenu.c')
-rw-r--r-- | gtk/gtkrecentchoosermenu.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/gtk/gtkrecentchoosermenu.c b/gtk/gtkrecentchoosermenu.c index 8413633a07..7dbd7999db 100644 --- a/gtk/gtkrecentchoosermenu.c +++ b/gtk/gtkrecentchoosermenu.c @@ -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 * |