From 91c8b42fb87ae1919dddc1384ba1e3fc18e3d5e1 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 4 Aug 2010 14:27:42 -0500 Subject: If we get passed a label let's make a GTK one for fun. --- src/indicator-application.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/indicator-application.c b/src/indicator-application.c index be47be6..2597973 100644 --- a/src/indicator-application.c +++ b/src/indicator-application.c @@ -476,7 +476,15 @@ application_added (DBusGProxy * proxy, const gchar * iconname, gint position, co app->entry.image = indicator_image_helper(longname); g_free(longname); - app->entry.label = NULL; + if (label == NULL || label[0] == '\0') { + app->entry.label = NULL; + } else { + app->entry.label = GTK_LABEL(gtk_label_new(label)); + gtk_widget_show(GTK_WIDGET(app->entry.label)); + + /* TODO: Use guide to size the label better */ + } + app->entry.menu = GTK_MENU(dbusmenu_gtkmenu_new((gchar *)dbusaddress, (gchar *)dbusobject)); /* Keep copies of these for ourself, just in case. */ -- cgit v1.2.3