]> Pileus Git - ~andy/gtk/commitdiff
Apply the tip only if we have a displayable name for the item. (#365031,
authorEmmanuele Bassi <ebassi@gnome.org>
Thu, 16 Nov 2006 10:10:44 +0000 (10:10 +0000)
committerEmmanuele Bassi <ebassi@src.gnome.org>
Thu, 16 Nov 2006 10:10:44 +0000 (10:10 +0000)
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)

ChangeLog
gtk/gtkrecentchoosermenu.c

index 4b2d6bd8a58a5f95c054c8152206e1020f749002..171e5937862b4a6711ac0c1035a15006a80d10c5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index 8413633a07697e58d4e5cf02d240c575ce711ab4..7dbd7999db797ec37c6c77e0fad49220850ef0ce 100644 (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 *