diff options
author | Ted Gould <ted@gould.cx> | 2010-01-13 16:23:08 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-01-13 16:23:08 -0600 |
commit | 9489aa2cbda25bb1ed87e87d2fcf550ac0b6142a (patch) | |
tree | 358272a40233edece65e4e5d2d64b9f97410d136 | |
parent | bf390ec6d9aa02fe5fed6278f6f9bb249557e210 (diff) | |
download | libayatana-appindicator-9489aa2cbda25bb1ed87e87d2fcf550ac0b6142a.tar.gz libayatana-appindicator-9489aa2cbda25bb1ed87e87d2fcf550ac0b6142a.tar.bz2 libayatana-appindicator-9489aa2cbda25bb1ed87e87d2fcf550ac0b6142a.zip |
Adding in a get_menu function.
-rw-r--r-- | docs/reference/libappindicator-sections.txt | 1 | ||||
-rw-r--r-- | src/libappindicator/app-indicator.c | 22 | ||||
-rw-r--r-- | src/libappindicator/app-indicator.h | 1 |
3 files changed, 23 insertions, 1 deletions
diff --git a/docs/reference/libappindicator-sections.txt b/docs/reference/libappindicator-sections.txt index 68b120a..70df0b8 100644 --- a/docs/reference/libappindicator-sections.txt +++ b/docs/reference/libappindicator-sections.txt @@ -28,5 +28,6 @@ app_indicator_get_category app_indicator_get_status app_indicator_get_icon app_indicator_get_attention_icon +app_indicator_get_menu </SECTION> diff --git a/src/libappindicator/app-indicator.c b/src/libappindicator/app-indicator.c index e38e760..4852633 100644 --- a/src/libappindicator/app-indicator.c +++ b/src/libappindicator/app-indicator.c @@ -776,7 +776,7 @@ fallback (AppIndicator * self) static void status_icon_activate (GtkStatusIcon * icon, gpointer data) { - g_debug("Status Icon Activate"); + return; } @@ -1267,3 +1267,23 @@ app_indicator_get_attention_icon (AppIndicator *self) return self->priv->attention_icon_name; } + +/** + app_indicator_get_menu: + @self: The #AppIndicator object to use + + Gets the menu being used for this application indicator. + + Return value: A menu object or #NULL if one hasn't been set. +*/ +GtkMenu * +app_indicator_get_menu (AppIndicator *self) +{ + AppIndicatorPrivate *priv; + + g_return_val_if_fail (IS_APP_INDICATOR (self), NULL); + + priv = self->priv; + + return GTK_MENU(priv->menu); +} diff --git a/src/libappindicator/app-indicator.h b/src/libappindicator/app-indicator.h index a8d82ab..03656ce 100644 --- a/src/libappindicator/app-indicator.h +++ b/src/libappindicator/app-indicator.h @@ -228,6 +228,7 @@ AppIndicatorCategory app_indicator_get_category (AppIndicator * AppIndicatorStatus app_indicator_get_status (AppIndicator *self); const gchar * app_indicator_get_icon (AppIndicator *self); const gchar * app_indicator_get_attention_icon (AppIndicator *self); +GtkMenu * app_indicator_get_menu (AppIndicator *self); G_END_DECLS |