diff options
author | Ted Gould <ted@gould.cx> | 2010-08-04 14:27:42 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-08-04 14:27:42 -0500 |
commit | 91c8b42fb87ae1919dddc1384ba1e3fc18e3d5e1 (patch) | |
tree | 076312d8cb5312a12475679ea06278c967c9de93 /src | |
parent | 83f563433d1456da5383529f4be2813e162c6978 (diff) | |
download | libayatana-appindicator-91c8b42fb87ae1919dddc1384ba1e3fc18e3d5e1.tar.gz libayatana-appindicator-91c8b42fb87ae1919dddc1384ba1e3fc18e3d5e1.tar.bz2 libayatana-appindicator-91c8b42fb87ae1919dddc1384ba1e3fc18e3d5e1.zip |
If we get passed a label let's make a GTK one for fun.
Diffstat (limited to 'src')
-rw-r--r-- | src/indicator-application.c | 10 |
1 files changed, 9 insertions, 1 deletions
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. */ |