diff options
author | Ted Gould <ted@gould.cx> | 2010-01-21 14:10:45 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-01-21 14:10:45 -0600 |
commit | 1650aa3b93d3d745edc3c98e8ec6ea06cd607abd (patch) | |
tree | 279bd324a7bd93f41dd5c45c47f10bb8c83aac7e /src/indicator-application.c | |
parent | 2062afe66d50fc10ff839ab7a0d127f5eaaa9197 (diff) | |
parent | 1f9ee733a54090699c731a15b5474cbe0a376336 (diff) | |
download | libayatana-appindicator-1650aa3b93d3d745edc3c98e8ec6ea06cd607abd.tar.gz libayatana-appindicator-1650aa3b93d3d745edc3c98e8ec6ea06cd607abd.tar.bz2 libayatana-appindicator-1650aa3b93d3d745edc3c98e8ec6ea06cd607abd.zip |
* Upstream merge
* Adding in a file to position the indicators
* debian/control: Adding dependency for json-glib to build.
Diffstat (limited to 'src/indicator-application.c')
-rw-r--r-- | src/indicator-application.c | 11 |
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. */ |