From 7797504facc6bb176c07b692abfbb7eadc76b5a6 Mon Sep 17 00:00:00 2001
From: Ted Gould <ted@gould.cx>
Date: Tue, 5 Jul 2011 16:13:05 -0500
Subject: Adding the naming hint to the entry structure

---
 libindicator/indicator-object.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libindicator/indicator-object.h b/libindicator/indicator-object.h
index 5faeff5..be7d43e 100644
--- a/libindicator/indicator-object.h
+++ b/libindicator/indicator-object.h
@@ -150,6 +150,8 @@ struct _IndicatorObject {
 	@menu: The menu to be added to the menubar
 	@accessible_desc: The accessible description
 		of the indicator
+	@name_hint: A name to describe the indicator being placed to allow
+		the caller to be more aware of the individual entries.
 
 	@reserved1: Reserved for future use
 	@reserved2: Reserved for future use
@@ -161,6 +163,7 @@ struct _IndicatorObjectEntry {
 	GtkImage * image;
 	GtkMenu  * menu;
 	const gchar * accessible_desc;
+	const gchar * name_hint;
 
 	void       (*reserved1)     (void);
 	void       (*reserved2)     (void);
-- 
cgit v1.2.3


From 26c580fe6b0196d9bfb1eb136af7ae07eae017d8 Mon Sep 17 00:00:00 2001
From: Ted Gould <ted@gould.cx>
Date: Tue, 5 Jul 2011 16:15:14 -0500
Subject: Adding a get name hint function as well.

---
 libindicator/indicator-object.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libindicator/indicator-object.h b/libindicator/indicator-object.h
index be7d43e..a285949 100644
--- a/libindicator/indicator-object.h
+++ b/libindicator/indicator-object.h
@@ -77,6 +77,8 @@ typedef struct _IndicatorObjectEntry   IndicatorObjectEntry;
 		object.
 	@get_accessible_desc: Gets the accessible descriptionfor this
 		object.
+	@get_name_hint: Gets the hint of the type of indicator that this
+		is for the caller.
 	@get_entries: Gets all of the entires for this object returning
 		a #GList of #IndicatorObjectEntries.  The list should be
 		under the ownership of the caller but the entires will
@@ -106,6 +108,7 @@ struct _IndicatorObjectClass {
 	GtkImage * (*get_image) (IndicatorObject * io);
 	GtkMenu  * (*get_menu)  (IndicatorObject * io);
 	const gchar * (*get_accessible_desc) (IndicatorObject * io);
+	const gchar * (*get_name_hint) (IndicatorObject * io);
 
 	GList *    (*get_entries) (IndicatorObject * io);
 	guint      (*get_location) (IndicatorObject * io, IndicatorObjectEntry * entry);
-- 
cgit v1.2.3


From f837b4b6102108a10bc897bdc1484882b5747316 Mon Sep 17 00:00:00 2001
From: Ted Gould <ted@gould.cx>
Date: Tue, 5 Jul 2011 16:18:56 -0500
Subject: Clearing our local name_hint and ensuring we fill it if a function is
 provided.

---
 libindicator/indicator-object.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libindicator/indicator-object.c b/libindicator/indicator-object.c
index a91251c..2fe8dd1 100644
--- a/libindicator/indicator-object.c
+++ b/libindicator/indicator-object.c
@@ -240,6 +240,7 @@ indicator_object_init (IndicatorObject *self)
 	self->priv->entry.label = NULL;
 	self->priv->entry.image = NULL;
 	self->priv->entry.accessible_desc = NULL;
+	self->priv->entry.name_hint = NULL;
 
 	self->priv->gotten_entries = FALSE;
 
@@ -435,6 +436,10 @@ get_entries_default (IndicatorObject * io)
 			g_warning("IndicatorObject class does not have an accessible description.");
 		}
 
+		if (class->get_name_hint) {
+			priv->entry.name_hint = class->get_name_hint(io);
+		}
+
 		priv->gotten_entries = TRUE;
 	}
 
-- 
cgit v1.2.3