aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-01-20 16:52:01 -0600
committerTed Gould <ted@gould.cx>2010-01-20 16:52:01 -0600
commita9bf19636361c1d4a912db0a4d51d21d025b4640 (patch)
treef73ea19bcf3e8f4af5e4d94d085a22b8fdc7291e
parentda6242ba497bf70eb2ee8c75e74ddf5ac7f699ca (diff)
downloadayatana-indicator-application-a9bf19636361c1d4a912db0a4d51d21d025b4640.tar.gz
ayatana-indicator-application-a9bf19636361c1d4a912db0a4d51d21d025b4640.tar.bz2
ayatana-indicator-application-a9bf19636361c1d4a912db0a4d51d21d025b4640.zip
Implements the get_location function to place the entires.
-rw-r--r--src/indicator-application.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/indicator-application.c b/src/indicator-application.c
index 5ed7a9e..3ef5688 100644
--- a/src/indicator-application.c
+++ b/src/indicator-application.c
@@ -92,6 +92,7 @@ static void indicator_application_init (IndicatorApplication *self);
static void indicator_application_dispose (GObject *object);
static void indicator_application_finalize (GObject *object);
static GList * get_entries (IndicatorObject * io);
+static guint get_location (IndicatorObject * io, IndicatorObjectEntry * entry);
static void connected (IndicatorServiceManager * sm, gboolean connected, IndicatorApplication * application);
static void application_added (DBusGProxy * proxy, const gchar * iconname, gint position, const gchar * dbusaddress, const gchar * dbusobject, const gchar * icon_path, IndicatorApplication * application);
static void application_removed (DBusGProxy * proxy, gint position , IndicatorApplication * application);
@@ -116,6 +117,7 @@ indicator_application_class_init (IndicatorApplicationClass *klass)
IndicatorObjectClass * io_class = INDICATOR_OBJECT_CLASS(klass);
io_class->get_entries = get_entries;
+ io_class->get_location = get_location;
dbus_g_object_register_marshaller(_application_service_marshal_VOID__STRING_INT_STRING_STRING_STRING,
G_TYPE_NONE,
@@ -298,6 +300,15 @@ get_entries (IndicatorObject * io)
return retval;
}
+/* Finds the location of a specific entry */
+static guint
+get_location (IndicatorObject * io, IndicatorObjectEntry * entry)
+{
+ g_return_val_if_fail(IS_INDICATOR_APPLICATION(io), 0);
+ IndicatorApplicationPrivate * priv = INDICATOR_APPLICATION_GET_PRIVATE(io);
+ return g_list_index(priv->applications, entry);
+}
+
/* Here we respond to new applications by building up the
ApplicationEntry and signaling the indicator host that
we've got a new indicator. */