GNOME Bugzilla – Bug 693622
don't show nameless faceless apps
Last modified: 2015-05-11 16:27:43 UTC
Created attachment 235750 [details] screenshot I have three lines without an icon or name in my notification panel, see screenshot. IMO, we shouldn't show apps that we can't find a proper desktop file for.
Created attachment 302650 [details] do not show nameless apps
Comment on attachment 302650 [details] do not show nameless apps This is garbage, not a patch. Looks like a VIM buffer.
Created attachment 302651 [details] [review] do not show nameless apps My bad, got little distracted by advanced working hour.
Review of attachment 302651 [details] [review]: ::: panels/notifications/cc-notifications-panel.c @@ +260,3 @@ + app_name = g_app_info_get_name (app->app_info); + if (strlen (app_name) == 0) That will crash if app_name is NULL. if (app_name == NULL || *app_name == '\0') return; This checks for whether app_name is NULL or an empty string.
Created attachment 302837 [details] [review] do not show nameless apps Good point. Fixed.
Review of attachment 302837 [details] [review]: ::: panels/notifications/cc-notifications-panel.c @@ +260,3 @@ + app_name = g_app_info_get_name (app->app_info); + if (app_name == NULL || app_name[0] == '\0') I prefer "*app_name == '\0' instead (otherwise I would have used that in my review comment...)
Created attachment 302840 [details] [review] do not show nameless apps
Created attachment 302841 [details] [review] do not show nameless apps
Review of attachment 302841 [details] [review]: Looks good. Please cherry-pick in gnome-3-14 as well.
Comment on attachment 302841 [details] [review] do not show nameless apps (In reply to Bastien Nocera from comment #9) > Review of attachment 302841 [details] [review] [review]: > > Looks good. Please cherry-pick in gnome-3-14 as well. I've pushed the patch into master and gnome-3-14 branches. I've also added 'const' in front of the 'gchar *app_name' to avoid the warning about discarding of const qualifier.