[gnome-control-center/gnome-3-14] notifications: Do not show nameless apps
- From: Marek Kašík <mkasik src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gnome-3-14] notifications: Do not show nameless apps
- Date: Mon, 11 May 2015 16:16:25 +0000 (UTC)
commit 63a20d81ff3b2023281ca389c24956e8cfef4248
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 7d3adfd..a04b05a 100644
--- a/panels/notifications/cc-notifications-panel.c
+++ b/panels/notifications/cc-notifications-panel.c
@@ -193,6 +193,11 @@ add_application (CcNotificationsPanel *panel,
{
GtkWidget *box, *w, *row;
GIcon *icon;
+ const gchar *app_name;
+
+ 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)
@@ -214,7 +219,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]