diff options
author | Ted Gould <ted@gould.cx> | 2009-12-20 17:28:02 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2009-12-20 17:28:02 -0600 |
commit | 3915de95c9d64765cae653d02d124ca82127235e (patch) | |
tree | f3cd3a4e9d5b6abdce6accb4df45669d885c16ba /src/indicator-application.c | |
parent | 9185eeee48ad6fc91b023127e9f92f7348a0c6aa (diff) | |
download | ayatana-indicator-application-3915de95c9d64765cae653d02d124ca82127235e.tar.gz ayatana-indicator-application-3915de95c9d64765cae653d02d124ca82127235e.tar.bz2 ayatana-indicator-application-3915de95c9d64765cae653d02d124ca82127235e.zip |
Adding the icon path to the app entry struct
Diffstat (limited to 'src/indicator-application.c')
-rw-r--r-- | src/indicator-application.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/indicator-application.c b/src/indicator-application.c index 436a743..02c13c8 100644 --- a/src/indicator-application.c +++ b/src/indicator-application.c @@ -80,6 +80,7 @@ struct _IndicatorApplicationPrivate { typedef struct _ApplicationEntry ApplicationEntry; struct _ApplicationEntry { IndicatorObjectEntry entry; + gchar * icon_path; }; #define INDICATOR_APPLICATION_GET_PRIVATE(o) \ @@ -275,6 +276,7 @@ application_added (DBusGProxy * proxy, const gchar * iconname, gint position, co IndicatorApplicationPrivate * priv = INDICATOR_APPLICATION_GET_PRIVATE(application); ApplicationEntry * app = g_new(ApplicationEntry, 1); + app->icon_path = g_strdup(icon_path); app->entry.image = GTK_IMAGE(gtk_image_new_from_icon_name(iconname, GTK_ICON_SIZE_MENU)); app->entry.label = NULL; app->entry.menu = GTK_MENU(dbusmenu_gtkmenu_new((gchar *)dbusaddress, (gchar *)dbusobject)); @@ -304,6 +306,9 @@ application_removed (DBusGProxy * proxy, gint position, IndicatorApplication * a priv->applications = g_list_remove(priv->applications, app); g_signal_emit(G_OBJECT(application), INDICATOR_OBJECT_SIGNAL_ENTRY_REMOVED_ID, 0, &(app->entry), TRUE); + if (app->icon_path != NULL) { + g_free(app->icon_path); + } if (app->entry.image != NULL) { g_object_unref(G_OBJECT(app->entry.image)); } |