From 9215e19e801f59a2abd4dd92563cfe50f366f635 Mon Sep 17 00:00:00 2001 From: Luke Yelavich Date: Tue, 18 Jan 2011 16:50:37 +1100 Subject: Add accessible_name variable in indicator entry structure --- libindicator/indicator-object.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libindicator/indicator-object.c') diff --git a/libindicator/indicator-object.c b/libindicator/indicator-object.c index 988a8ae..c190cd7 100644 --- a/libindicator/indicator-object.c +++ b/libindicator/indicator-object.c @@ -90,6 +90,7 @@ indicator_object_class_init (IndicatorObjectClass *klass) klass->get_label = NULL; klass->get_menu = NULL; klass->get_image = NULL; + klass->get_accessible_name = NULL; klass->get_entries = get_entries_default; klass->get_location = NULL; @@ -215,6 +216,7 @@ indicator_object_init (IndicatorObject *self) self->priv->entry.menu = NULL; self->priv->entry.label = NULL; self->priv->entry.image = NULL; + self->priv->entry.accessible_name = NULL; self->priv->gotten_entries = FALSE; @@ -395,6 +397,14 @@ get_entries_default (IndicatorObject * io) return NULL; } + if (class->get_accessible_name) { + priv->entry.accessible_name = class->get_accessible_name(io); + } + + if (priv->entry.accessible_name == NULL) { + g_warning("IndicatorObject class does not have an accessible name."); + } + priv->gotten_entries = TRUE; } -- cgit v1.2.3