[Xfce4-commits] r30225 - in xfce4-appfinder/trunk: . src

Nick Schermer nickschermer at gmail.com
Thu Jul 9 11:09:32 CEST 2009


My take on this one:

tooltip_str = g_string_sized_new (512);

categories = xfce_menu_item_get_categories (item);
 if (categories != NULL)
   {
      g_string_append (tooltip_str, _("<b>Categories:</b> "));

      for (lp = categories; lp != NULL; lp = lp->next)
        {
          g_string_append (tooltip_str, (gchar *) lp->data);
          if (lp->next != NULL)
            g_string_append (tooltip_str, ", ");
        }
    }

command = xfce_menu_item_get_command (item);
if (command != NULL && *command != '\0')
  {
    if (categories != NULL)
       g_string_append_c (tooltip_str, '\n');

    g_string_append_printf (tooltip_str, _("<b>Command:</b> %s"), command);
  }

Nick



More information about the Xfce4-dev mailing list