[gnome-control-center] notifications: Do not show nameless apps



commit ed37aa2cae1747253fc46fd301c2ffda7d8dc151
Author: Martin Hatina <mhatina redhat com>
Date:   Thu Apr 30 15:12:28 2015 +0200

    notifications: Do not show nameless apps
    
    Apps with no name are not added to list.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=693622

 panels/notifications/cc-notifications-panel.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/panels/notifications/cc-notifications-panel.c b/panels/notifications/cc-notifications-panel.c
index e4ab495..d751d5f 100644
--- a/panels/notifications/cc-notifications-panel.c
+++ b/panels/notifications/cc-notifications-panel.c
@@ -265,8 +265,13 @@ add_application (CcNotificationsPanel *panel,
 {
   GtkWidget *box, *w, *row, *list_box;
   GIcon *icon;
+  const gchar *app_name;
   int size;
 
+  app_name = g_app_info_get_name (app->app_info);
+  if (app_name == NULL || *app_name == '\0')
+    return;
+
   icon = g_app_info_get_icon (app->app_info);
   if (icon == NULL)
     icon = g_themed_icon_new ("application-x-executable");
@@ -294,7 +299,7 @@ add_application (CcNotificationsPanel *panel,
   gtk_container_add (GTK_CONTAINER (box), w);
   g_object_unref (icon);
 
-  w = gtk_label_new (g_app_info_get_name (app->app_info));
+  w = gtk_label_new (app_name);
   gtk_container_add (GTK_CONTAINER (box), w);
 
   w = gtk_label_new ("");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]