From b894548cd9498d8a96743ca292287c3746d3545e Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 16 Apr 2012 13:50:43 -0500 Subject: If we don't have a title set, use the application name to output the title --- src/app-indicator.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/app-indicator.c b/src/app-indicator.c index 0d6450c..2e98b48 100644 --- a/src/app-indicator.c +++ b/src/app-indicator.c @@ -1123,7 +1123,18 @@ bus_get_prop (GDBusConnection * connection, const gchar * sender, const gchar * } else if (g_strcmp0(property, "AttentionIconName") == 0) { return g_variant_new_string(priv->attention_icon_name ? priv->attention_icon_name : ""); } else if (g_strcmp0(property, "Title") == 0) { - return g_variant_new_string(priv->title ? priv->title : ""); + const gchar * output = NULL; + if (priv->title == NULL) { + const gchar * name = g_get_application_name(); + if (name != NULL) { + output = name; + } else { + output = ""; + } + } else { + output = priv->title; + } + return g_variant_new_string(output); } else if (g_strcmp0(property, "IconThemePath") == 0) { return g_variant_new_string(priv->icon_theme_path ? priv->icon_theme_path : ""); } else if (g_strcmp0(property, "Menu") == 0) { -- cgit v1.2.3