aboutsummaryrefslogtreecommitdiff
path: root/libindicator/indicator-object.c
diff options
context:
space:
mode:
Diffstat (limited to 'libindicator/indicator-object.c')
-rw-r--r--libindicator/indicator-object.c10
1 files changed, 10 insertions, 0 deletions
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;
}