Author: jannis Date: 2009-07-09 10:40:14 +0000 (Thu, 09 Jul 2009) New Revision: 30228
Modified: xfce4-appfinder/trunk/ChangeLog xfce4-appfinder/trunk/src/xfce-appfinder-window.c Log: * src/xfce-appfinder-window.c: Rework the tooltip string code a little bit. Modified: xfce4-appfinder/trunk/ChangeLog =================================================================== --- xfce4-appfinder/trunk/ChangeLog 2009-07-09 10:03:02 UTC (rev 30227) +++ xfce4-appfinder/trunk/ChangeLog 2009-07-09 10:40:14 UTC (rev 30228) @@ -1,5 +1,10 @@ 2009-07-09 Jannis Pohlmann <jan...@xfce.org> + * src/xfce-appfinder-window.c: Rework the tooltip string code a little + bit. + +2009-07-09 Jannis Pohlmann <jan...@xfce.org> + * src/xfce-appfinder-window.c: Don't use startup notification for now. As we use exo-open to launch desktop entries, people usually end up with annoying waiting cursors and a lot of temporary exo-open items Modified: xfce4-appfinder/trunk/src/xfce-appfinder-window.c =================================================================== --- xfce4-appfinder/trunk/src/xfce-appfinder-window.c 2009-07-09 10:03:02 UTC (rev 30227) +++ xfce4-appfinder/trunk/src/xfce-appfinder-window.c 2009-07-09 10:40:14 UTC (rev 30228) @@ -1089,10 +1089,10 @@ GString *tooltip_str; GList *categories; GList *lp; - const gchar **categories_array; const gchar *name = NULL; const gchar *comment; const gchar *command; + gchar **categories_array; gchar *categories_string; gchar *text; gchar *tooltip = NULL; @@ -1127,20 +1127,26 @@ if (G_LIKELY (categories != NULL)) { - categories_array = g_new0 (const gchar *, g_list_length (categories) + 1); + categories_array = g_new0 (gchar *, g_list_length (categories) + 1); for (lp = categories, n = 0; lp != NULL; lp = lp->next, ++n) categories_array[n] = lp->data; - categories_string = g_strjoinv (", ", (gchar **) categories_array); - g_string_append_printf (tooltip_str, _("<b>Categories:</b> %s\n"), categories_string); + categories_string = g_strjoinv (", ", categories_array); + g_string_append_printf (tooltip_str, _("<b>Categories:</b> %s"), categories_string); g_free (categories_string); g_free (categories_array); } - g_string_append_printf (tooltip_str, _("<b>Command:</b> %s"), command); + 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); + } + tooltip = g_string_free (tooltip_str, FALSE); gtk_list_store_append (window->list_store, &iter); _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits