[Xfce4-commits] <xfce4-appfinder:master> Avoid (null) comment in tooltip.

Nick Schermer noreply at xfce.org
Tue Dec 27 21:24:02 CET 2011


Updating branch refs/heads/master
         to 23f905b73a157c6d83a4ce905c0376da86cac76c (commit)
       from 25313fd53100c3d2bce626dcfeaaad672bfd6b09 (commit)

commit 23f905b73a157c6d83a4ce905c0376da86cac76c
Author: Nick Schermer <nick at xfce.org>
Date:   Tue Dec 27 16:29:07 2011 +0100

    Avoid (null) comment in tooltip.

 src/appfinder-model.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/appfinder-model.c b/src/appfinder-model.c
index b90d825..13f0f8f 100644
--- a/src/appfinder-model.c
+++ b/src/appfinder-model.c
@@ -522,13 +522,17 @@ xfce_appfinder_model_get_value (GtkTreeModel *tree_model,
           cat_str = g_strjoinv ("; ", cat_arr);
           g_free (cat_arr);
 
+          comment = garcon_menu_item_get_comment (item->item);
+          if (comment == NULL)
+            comment = "";
+
           item->tooltip = g_markup_printf_escaped ("<b>%s:</b> %s\n"
                                                    "<b>%s:</b> %s\n"
                                                    "<b>%s:</b> %s\n"
                                                    "<b>%s:</b> %s\n"
                                                    "<b>%s:</b> %s",
                                                    _("Name"), garcon_menu_item_get_name (item->item),
-                                                   _("Comment"), garcon_menu_item_get_comment (item->item),
+                                                   _("Comment"), comment,
                                                    _("Command"), garcon_menu_item_get_command (item->item),
                                                    _("Categories"), cat_str,
                                                    _("Filename"), parse_name);


More information about the Xfce4-commits mailing list