diff options
author | Ted Gould <ted@gould.cx> | 2010-01-11 16:27:19 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-01-11 16:27:19 -0600 |
commit | f8d6a7d026be10ea4cdb486cfa945ad697403f26 (patch) | |
tree | 332880bbae9ea187b3d75757af1d3bff8750fc69 /src/libappindicator | |
parent | d8c7246f702c687b4f532cfb66c5eeb545aa175d (diff) | |
download | ayatana-indicator-application-f8d6a7d026be10ea4cdb486cfa945ad697403f26.tar.gz ayatana-indicator-application-f8d6a7d026be10ea4cdb486cfa945ad697403f26.tar.bz2 ayatana-indicator-application-f8d6a7d026be10ea4cdb486cfa945ad697403f26.zip |
Initing and destroying the status_icon variable
Diffstat (limited to 'src/libappindicator')
-rw-r--r-- | src/libappindicator/app-indicator.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/libappindicator/app-indicator.c b/src/libappindicator/app-indicator.c index 9f0ca54..2650342 100644 --- a/src/libappindicator/app-indicator.c +++ b/src/libappindicator/app-indicator.c @@ -302,6 +302,8 @@ app_indicator_init (AppIndicator *self) priv->watcher_proxy = NULL; priv->connection = NULL; + priv->status_icon = NULL; + /* Put the object on DBus */ GError * error = NULL; priv->connection = dbus_g_bus_get(DBUS_BUS_SESSION, &error); @@ -325,13 +327,21 @@ app_indicator_init (AppIndicator *self) static void app_indicator_dispose (GObject *object) { - AppIndicator *self = APP_INDICATOR (object); + AppIndicator *self = APP_INDICATOR (object); AppIndicatorPrivate *priv = self->priv; if (priv->status != APP_INDICATOR_STATUS_PASSIVE) { app_indicator_set_status(self, APP_INDICATOR_STATUS_PASSIVE); } + if (priv->status_icon != NULL) { + AppIndicatorClass * class = APP_INDICATOR_CLASS(object); + if (class->unfallback != NULL) { + class->unfallback(self, priv->status_icon); + } + priv->status_icon = NULL; + } + if (priv->menu != NULL) { g_object_unref(G_OBJECT(priv->menu)); priv->menu = NULL; |