diff options
author | Javier Jardón <javier.jardon@codethink.co.uk> | 2011-07-05 11:47:28 +0100 |
---|---|---|
committer | Javier Jardón <javier.jardon@codethink.co.uk> | 2011-07-05 11:47:28 +0100 |
commit | fe2b41fc72b4a039e2d98b502ad3970a2c1876a1 (patch) | |
tree | 75403462074652aef5dcfd7a92942be2ae4b0619 | |
parent | 453148a27b6bf3b85e378b227250a63cc0aaadd4 (diff) | |
download | ayatana-indicator-power-fe2b41fc72b4a039e2d98b502ad3970a2c1876a1.tar.gz ayatana-indicator-power-fe2b41fc72b4a039e2d98b502ad3970a2c1876a1.tar.bz2 ayatana-indicator-power-fe2b41fc72b4a039e2d98b502ad3970a2c1876a1.zip |
notify signal
-rw-r--r-- | src/indicator-power.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/indicator-power.c b/src/indicator-power.c index f93c797..8eb6ae6 100644 --- a/src/indicator-power.c +++ b/src/indicator-power.c @@ -626,6 +626,16 @@ get_image (IndicatorObject *io) return priv->status_image; } +static void +build_menu_cb (GtkWidget * menu, + G_GNUC_UNUSED GParamSpec *pspec, + gpointer user_data) +{ + IndicatorPower *self = INDICATOR_POWER (user_data); + + build_menu (self); +} + static GtkMenu * get_menu (IndicatorObject *io) { @@ -634,6 +644,9 @@ get_menu (IndicatorObject *io) build_menu (self); + g_signal_connect (priv->menu, "notify::visible", + G_CALLBACK (build_menu_cb), self); + return GTK_MENU (priv->menu); } |