aboutsummaryrefslogtreecommitdiff
path: root/libindicator/indicator-object.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-02-17 10:19:45 -0600
committerTed Gould <ted@gould.cx>2011-02-17 10:19:45 -0600
commit7840128ffb7df770b4ff84c2ec6472e3fcb43d3d (patch)
tree13a2e25db352c4589611f18c4603f76517ec1b36 /libindicator/indicator-object.c
parentb22f471a026de778bc2594b23768d1a3024f27c3 (diff)
parent27d079891cdcc65bc1e7174a2d8dfe6bb2f639df (diff)
downloadlibayatana-indicator-7840128ffb7df770b4ff84c2ec6472e3fcb43d3d.tar.gz
libayatana-indicator-7840128ffb7df770b4ff84c2ec6472e3fcb43d3d.tar.bz2
libayatana-indicator-7840128ffb7df770b4ff84c2ec6472e3fcb43d3d.zip
Import upstream version 0.3.19
Diffstat (limited to 'libindicator/indicator-object.c')
-rw-r--r--libindicator/indicator-object.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/libindicator/indicator-object.c b/libindicator/indicator-object.c
index 95ab08a..73c1ca7 100644
--- a/libindicator/indicator-object.c
+++ b/libindicator/indicator-object.c
@@ -61,6 +61,7 @@ enum {
SCROLL_ENTRY,
MENU_SHOW,
SHOW_NOW_CHANGED,
+ ACCESSIBLE_DESC_UPDATE,
LAST_SIGNAL
};
@@ -91,6 +92,7 @@ indicator_object_class_init (IndicatorObjectClass *klass)
klass->get_label = NULL;
klass->get_menu = NULL;
klass->get_image = NULL;
+ klass->get_accessible_desc = NULL;
klass->get_entries = get_entries_default;
klass->get_location = NULL;
@@ -221,6 +223,24 @@ indicator_object_class_init (IndicatorObjectClass *klass)
_indicator_object_marshal_VOID__POINTER_BOOLEAN,
G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_BOOLEAN);
+ /**
+ IndicatorObject::accessible-desc-update::
+ @arg0: The #IndicatorObject object
+ @arg1: A pointer to the #IndicatorObjectEntry whos
+ accessible description has been updated.
+
+ Signaled when an indicator's accessible description
+ has been updated, so that the displayer of the
+ indicator can fetch the new description.
+ */
+ signals[ACCESSIBLE_DESC_UPDATE] = g_signal_new (INDICATOR_OBJECT_SIGNAL_ACCESSIBLE_DESC_UPDATE,
+ G_TYPE_FROM_CLASS(klass),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (IndicatorObjectClass, accessible_desc_update),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__POINTER,
+ G_TYPE_NONE, 1, G_TYPE_POINTER, G_TYPE_NONE);
+
return;
}
@@ -236,6 +256,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_desc = NULL;
self->priv->gotten_entries = FALSE;
@@ -416,6 +437,14 @@ get_entries_default (IndicatorObject * io)
return NULL;
}
+ if (class->get_accessible_desc) {
+ priv->entry.accessible_desc = class->get_accessible_desc(io);
+ }
+
+ if (priv->entry.accessible_desc == NULL) {
+ g_warning("IndicatorObject class does not have an accessible description.");
+ }
+
priv->gotten_entries = TRUE;
}